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
E2E: Wait for the Publish button to not be disabled #50653
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
WunderBart
force-pushed
the
refactor/e2e-tweaks-part-003
branch
from
March 2, 2021 13:08
a7d5072
to
407ab7c
Compare
WunderBart
added
the
[Status] Needs Review
The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
label
Mar 2, 2021
griffbrad
approved these changes
Mar 2, 2021
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. Great catch!
fullofcaffeine
force-pushed
the
refactor/e2e-tweaks-part-001
branch
from
March 2, 2021 22:37
ce1e233
to
0a431e6
Compare
This should fix some flakiness around publishing posts. Sometimes, when the publish panel opens, the editor performs autosave at the same time, which disables the Publish button until the save request is done. The button is not technically `disabled` (meaning it's still clickable) as it only uses the `aria-disabled` attribute. As a result, the "disabled" button gets clicked and nothing happens. The `clickWhenClickable()` helper does not address these kinds of situations (doesn't check whether an element is disabled in any way), so we're fixing this issue by using a more explicit selector and waiting for the button to not be disabled. Whether `clickWhenClickable()` should address these kinds of situations can be discussed in a follow-up PR. Also, I'm replacing the scripted click hack as the fix from #39205 doesn't seem to be necessary anymore.
WunderBart
force-pushed
the
refactor/e2e-tweaks-part-003
branch
from
March 3, 2021 13:29
593c1f0
to
93a7c84
Compare
It's the same situation as with the Publish button - it's clicked while being disabled by the autosave request.
WunderBart
force-pushed
the
refactor/e2e-tweaks-part-003
branch
from
March 3, 2021 13:30
93a7c84
to
4fcf4f4
Compare
WunderBart
added
[Status] Ready to Merge
and removed
[Status] Needs Review
The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
labels
Mar 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix some flakiness around publishing posts. When the editor performs autosave, the Publish buttons get disabled until the save request is done. These buttons are not technically
disabled
though (meaning they're still clickable), as only thearia-disabled
attribute is being set. As a result, theclickWhenClickable()
helper clicks a "disabled" button, then nothing happens and the test fails. TheclickWhenClickable()
helper does not address these kinds of situations (doesn't check whether an element is disabled in any way), so we're fixing this issue by using a more explicit selector and waiting for the button to not be disabled. WhetherclickWhenClickable()
should address these kinds of situations can be discussed in a follow-up PR.Also, I'm reverting the scripted click hack as the fix from #39205 doesn't seem to be necessary anymore.