-
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
Close the post publish panel only when the post becomes dirty #6822
Conversation
test/e2e/support/utils.js
Outdated
@@ -3,6 +3,7 @@ | |||
*/ | |||
import { join } from 'path'; | |||
import { URL } from 'url'; | |||
import { SSL_OP_CRYPTOPRO_TLSEXT_BUG } from 'constants'; |
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.
oups
d0da8f1
to
eba0562
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.
LGTM 👍
E2e test looks great and covers exactly what I checked manually.
eba0562
to
10e9fa7
Compare
await page.click( '.editor-post-publish-panel__toggle' ); | ||
|
||
// Wait for a second ( wait for the animation ) | ||
await wait( 1000 ); |
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.
Is there a way to express this with waitForSelector
(e.g. a class or pseudo-class on the available button)? How else can we discourage using wait
as a crutch? Could we call this something like waitDurationYesImCertainWaitForSelectorIsNotABetterOption( 1000 )
?
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.
:) haha I like the name.
This PR fixes a regression introduced here #6209 (comment) where we consider post being saved as dirty, so we need to ensure we're not saving the post before closing the post publish panel.
Testing instructions