-
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
Editor: Test that consecutive edits to the same attribute after saving are considered "persistent". #17917
Conversation
I'll give you a review, but the tests don't pass. 😬 Related, I'm not a fan of our |
Interesting, they do pass locally every time.
Yeah, we should at least make it a Custom Matcher so that the right line is logged. |
…g are considered "persistent".
…oid the fickle `assertIsDirty`.
194af5f
to
200924c
Compare
296a3b5
to
679764a
Compare
@mcsf I figured it out! |
Thanks for coming back to this one! Unfortunately I still get failures, at least when run with: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_HEADLESS=false \
PUPPETEER_SLOWMO=80 \
npm run test-e2e -- \
packages/e2e-tests/specs/editor/various/change-detection.test.js \
-t 'consecutive edits to the same' Output:
|
Are you running the latest version of WP trunk? Because it's passing in Travis. It sounds like you are using twentynineteen where the largest font size is called "Huge" instead of "Larger" so the selector misses it. I tried changing the selectors and running your command on twentynineteen and it passed. |
Ooh, yes, I forgot I was on Ninetween! Never mind. Yep, this seems to work! |
It does make me think that tests should be able to define certain expectations, such as that the default theme is active. |
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!
@mcsf What do you think about adding a check in the testing script to verify the active theme before wastefully running the tests? |
Could explore that, sure. I'm wary of harming performance by having checks that need to navigate to other parts of WP-Admin, though, so I wonder how acceptably we could just check for the presence of telltale elements like |
I did something like that here: #18699. It also only runs once before all tests so performance shouldn't be an issue. |
Closes #17914
Description
This PR adds an E2E test to guard against the regression fixed by #17888.
How has this been tested?
It was verified that the test tests the desired behavior and passes.
Checklist: