Block styles variations E2E: wait for Save button before editing global styles#62915
Conversation
…in the useSelect store subscription callback
|
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. |
|
Size Change: -339 B (-0.02%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
andrewserong
left a comment
There was a problem hiding this comment.
Looks good to me! 🚀
| } ); | ||
| // The save button has been re-enabled. | ||
|
|
||
| // Wait for the save button to be re-enabled. |
There was a problem hiding this comment.
No blockers here, just making sure I understand the change here:
This change is now checking that that Save is visible, rather than enabled. From looking at the editor manually, while saving, the button says "Saving" rather than "Save", so .toBeVisible() is a good check to use, as it'll only pass if the button says "Save" rather than "Saving". Also, once the revision has been saved the button is in a disabled state, so toBeVisible is a more reliable check than toBeEnabled.
Assuming that's all how it's meant to be, that sounds great to me!
There was a problem hiding this comment.
Exactly what you said, thanks for confirming.
Much better expressed than what my caveman brain was thinking: "Wait for save. Save there. Good save."
…al styles (#62915) * Add blockName to the overrides array so getBlockName() can be called in the useSelect store subscription callback * Update e2e test to wait for save button between styles updates * Revert selector name Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
|
I just cherry-picked this PR to the wp/6.6 branch to get it included in the next release: c6bc947 |
What and how?
Follow up to:
Tweak the E2E test to wait for the Save button to be visible between global styles saves. 🤞🏻 it'll make it less flakey.
Should be backported to wp/6.6 branch because the original tests are also there.
Testing Instructions
E2E CI tests should pass.