-
Notifications
You must be signed in to change notification settings - Fork 4.4k
E2E Tests: Add test case for Link
color support
#69141
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
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @t-hamano , When you get a chance please review my PR |
05c8450
to
106531f
Compare
There was a problem hiding this 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!
If I understand correctly, the regression that #30458 wants to prevent is the problem that the link UI is available, but the color is not applied on the front end.
On the other hand, this PR does the following three things:
- Whether the inline link UI works correctly
- Whether the attribute for the link is added to the block
- Whether an element or an anchor element with a class called has-link-color exist on the front end
In other words, it does not test at all whether the color is actually applied on the front end.
It would be a good idea to first organize what we really need to test.
Thanks for the review @t-hamano , I assumed here that if the class ' Originally commented here: #30452 (review) Original Comment
Edit: I have updated the test case to now check accurately both in editor(this was done previously also) and now the frontend too by checking the link styling are applied or not. I would appreciate it if you could review the latest changes on this PR. I look forward to your feedback. |
a0540f7
to
b1089df
Compare
Generally speaking, I'd recommend:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* feat: Add initial test case setup for link color support * fix: Add waitFor and timeout in button click * fix: Change API to click button * fix: Change API to click button * feat: Check link color is applied in FE and editor * fix: Renamed file to color-support for future continuity * feat: Use accesible selectors for selecting menu options * feat: Remove redundant code for applying link manually * refactor: use api toMatchObject to check and compare styles applied in editor * fix: Removed use of force option while clicking button * fix: Changed to use custom link color options and not default ones for longetivity * fix: Use accesible selector for link selection snippet * fix: Use toHaveCSS instead of boiler plate code to check CSS applied in the frontend * chore: Update the Test comment for frontend CSS assert Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
What?
Closes #30458
Related comment: #30452 (review)
Adds an E2E test to ensure that the selected link color is correctly applied in traditional (PHP-based) themes that use add_theme_support( 'experimental-link-color' );.
Why?
This E2E test ensures that link colors in traditional themes are correctly applied in the editor and frontend, preventing future regressions.
How?
Testing Instructions
Ensure the tests pass
To run this specific test:
Screenshot