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

"Multiple use" block validation logic improvement [with Playwright] #57576

Merged
merged 10 commits into from Feb 9, 2024

Conversation

fai-sal
Copy link
Contributor

@fai-sal fai-sal commented Jan 5, 2024

Why

What

Co-authored-by: getdave get_dave@git.wordpress.org
Co-authored-by: Mamaduka mamaduka@git.wordpress.org
Co-authored-by: scruffian scruffian@git.wordpress.org

@Mamaduka Mamaduka added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jan 5, 2024
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thank you, @fai-sal!

The correct directory for Playwright e2e tests is test/e2e/specs/editor/various.

I also would recommend checking the project e2e test best practices documentation - https://developer.wordpress.org/block-editor/contributors/code/testing-overview/e2e/#best-practices.

Copy link
Contributor

@getdave getdave left a comment

Choose a reason for hiding this comment

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

Appreciate all your hard work here 🙇

The e2e tests will need to be rewritten to utilise Playwright APIs such as getByRole.

A lot of the await will be able to be removed as well. You should find it's a lot easier to author the tests as well.

Copy link
Contributor

@getdave getdave 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 migrating to Playwright. A few comments about the test selectors 🙏

@fai-sal fai-sal requested a review from getdave January 13, 2024 07:53
@fai-sal
Copy link
Contributor Author

fai-sal commented Jan 25, 2024

Hi @getdave, If you can allocate some time, can you please review the PR again. Thanks 🙇

@fai-sal fai-sal requested a review from Mamaduka January 25, 2024 13:15
@getdave
Copy link
Contributor

getdave commented Jan 30, 2024

I think we should look to land this in time for WP 6.5. I've put it on the board for that project which should ensure a number of 👀 on it.

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

Left a few nits but this looks good to me.

Co-authored-by: Ben Dwyer <ben@scruffian.com>
Copy link

github-actions bot commented Feb 9, 2024

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @ihdk.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: ihdk.

Co-authored-by: delowardev <delowardev@git.wordpress.org>
Co-authored-by: fai-sal <faisalahmed29@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>

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

Copy link
Contributor

@getdave getdave left a comment

Choose a reason for hiding this comment

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

Let's bring this in. Thank you for the persistence here 🙇

@getdave getdave enabled auto-merge (squash) February 9, 2024 13:40
@getdave getdave merged commit 9ea082b into WordPress:trunk Feb 9, 2024
56 checks passed
@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Feb 9, 2024
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.
Projects
Development

Successfully merging this pull request may close these issues.

Avoid multiple block adding while "multiple" is false in block.json
5 participants