Skip to content

E2E: Split list view keyboard shortcuts into multiple tests #69231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Feb 18, 2025

What, Why and How?

Part of #64305

This PR splits List View > should cut, copy, paste, select, duplicate, insert, delete, and deselect blocks using keyboard into the following tests:

  1. should duplicate block using keyboard
  2. should copy and paste blocks using keyboard
  3. should cut and paste blocks using keyboard
  4. should select blocks using keyboard
  5. should deselect blocks using keyboard
  6. should insert blocks using keyboard
  7. should delete blocks using keyboard

Testing Instructions

  1. In a local environment, run the following command:
npm run test:e2e -- /test/e2e/specs/editor/various/list-view.spec.js
  1. Confirm all the tests corresponding to the list-view.spec.js pass.

Screenshot

e2e

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review February 18, 2025 11:20
Copy link

github-actions bot commented Feb 18, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: [Type] Automated Testing, [Type] Code Quality.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

Copy link

github-actions bot commented Feb 18, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Code Quality Issues or PRs that relate to code quality labels Feb 20, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Overall it looks good, but some of the tests are still long and I'm wondering if we could split it up a bit more.

  • should duplicate block using keyboard
  • should copy and paste blocks using keyboard
  • should cut and paste blocks using keyboard
  • should select and deselect blocks using keyboard
  • should insert and delete blocks using keyboard

Split these into the following:

  • should duplicate block using keyboard
  • should copy and paste blocks using keyboard
  • should cut and paste blocks using keyboard
  • should select blocks using keyboard
  • should deselect blocks using keyboard
  • should insert blocks using keyboard
  • should delete blocks using keyboard

@yogeshbhutkar yogeshbhutkar force-pushed the task-64305/refactor-list-view branch from 5c70c9e to 7ba2d1a Compare February 24, 2025 07:19
@yogeshbhutkar
Copy link
Contributor Author

Thanks for the review!

I've refactored the tests based on your suggestions. When you have a moment, please take a look. Appreciate it!

@yogeshbhutkar yogeshbhutkar force-pushed the task-64305/refactor-list-view branch from 7a8ff9f to 3b8d3bb Compare March 10, 2025 13:12
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply.

I have analyzed all the tests and they are all split correctly and there should be no missing tests 👍

Could you rebase this PR before merging? Thank you!

@yogeshbhutkar yogeshbhutkar force-pushed the task-64305/refactor-list-view branch from 3b8d3bb to 88ee477 Compare April 8, 2025 06:39
@t-hamano t-hamano merged commit bdd0097 into WordPress:trunk Apr 8, 2025
59 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.7 milestone Apr 8, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…s#69231)

* e2e: split list view keyboard shortcuts into multiple tests

* refactor: split `select` and `deselect` e2e tests

* refactor: split `insert` and `delete` e2e tests

* revert: use previously better written comment

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants