-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try to run e2e tests with the post editor in full screen mode. #69291
base: trunk
Are you sure you want to change the base?
Conversation
Only two tests were failing after switching One failure in |
Size Change: 0 B Total Size: 1.84 MB ℹ️ View Unchanged
|
Turns out the test It is worth reminding that by default on macOS Safari links aren't navigable with the Tab key. There are two preferences to control this behavior:
So when running that test locally on macOS, it may fail because of your preferences. On GitHub, in a first moment I was expecting the test to fail as well. Instead, the test passes and I'm assuming that since GitHub runs webkit on Linux (and not Safari on macOS) that's the expected behavior. |
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. |
28e3eb6
to
0990af0
Compare
@afercia, is there a reason for adding this to the WP 6.8 project board? Testing and tooling-related items don't really require milestones; this code is project-specific and doesn't get synced with WordPress. |
@Mamaduka I wanted this change to be discussed during the core-editor bug scrub, given the concern reported by @t-hamano related to developers who may already being using |
@afercia, it's not a big deal, but we can bring up items outside the project board during the scrub. I generally keep only items concerning WP and the next release on the board. The dev packages like |
const elementToTest = isFullScreenMode | ||
? 'role=link[name=/View Posts/i]' | ||
: 'role=button[name=/Block Inserter/i]'; | ||
|
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.
If it's guaranteed that the e2e tests run with fullscreen mode always enabled, this condition may be unnecessary .
What?
Closes #69276
The Post Editor full screen mode was enabled by default on March 2020 in #20611. However, the e2e tests still run with full screen mode disabled by default.
Why?
The e2e tests should run with the editor UI in the same state provided to users by default. This is particularly important when testing for accessibility feaetures like focus management, tab sequence and the like.
How?
fullscreenMode
preference to true by default in the e2e tests utils configuration.Note: as mentioned by @t-hamano on the associated issue, this change might affect developers who are already using
@worpdress/e2e-test-utils-playwright
for their e2e tests. I'd think a dev note would be OK to inform developers as making the e2e test environment run the UI in a state that faithfully represents the actual UI provided to users outweighs potential backward compatibility issues.Testing Instructions
N/A.Observe the tests pass.
Testing Instructions for Keyboard
Screenshots or screencast