Skip to content
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

Migrate register block test case to playwright #43170

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

pavanpatil1
Copy link
Contributor

What?

Part of #38851.
Migrate register-block-type-hooks.test.js to its Playwright version.

Why?

Part of #38851.

How?

See MIGRATION.md for migration steps.

Testing Instructions

Run npm run test-e2e:playwright test/e2e/specs/editor/plugins/register-block-type-hooks.spec.js

@pavanpatil1
Copy link
Contributor Author

Hi @kevin940726,

Hope you are doing well! Can you please help in reviewing this PR?

@talldan talldan added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Aug 25, 2022

expect(
page.locator(
'.block-editor-block-types-list[aria-label="Widgets"] > .editor-block-list-item-paragraph'
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for working on another migration 😄

It should be ok to use a role selector for this, I think it would be something like this, but I haven't tested to make sure it works:

Suggested change
'.block-editor-block-types-list[aria-label="Widgets"] > .editor-block-list-item-paragraph'
'role=listbox[name="Widgets"i] >> role=option[name="Paragraph"i]'

Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

Thanks!

@talldan talldan merged commit 9bde7eb into WordPress:trunk Aug 25, 2022
@github-actions github-actions bot added this to the Gutenberg 14.1 milestone Aug 25, 2022
@cbravobernal cbravobernal added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 13, 2022
@pavanpatil1 pavanpatil1 deleted the migrate/register-block-test branch September 22, 2022 03:31
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.

3 participants