-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles revisions: display text if no revisions are found #52865
Changes from 1 commit
e9d2277
104b83c
2ddedb2
b16b034
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -27,6 +27,19 @@ test.describe( 'Global styles revisions', () => { | |||||||
await editor.canvas.click( 'body' ); | ||||||||
} ); | ||||||||
|
||||||||
test( 'should display no revisions message if landing via command center', async ( { | ||||||||
page, | ||||||||
} ) => { | ||||||||
await page.keyboard.press( 'Meta+k' ); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on failure traces, the command doesn't open the Command Palette. You can use https://trace.playwright.dev/ to check the Playwright - https://trace.playwright.dev/. The reasons could be that there is no focus on the editor's body or keyboard shortcuts must be corrected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, interesting. Thanks for the tips. It's passing locally, so I'll try a few things and push them 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it helps, but it looks like the gutenberg/test/e2e/specs/site-editor/command-center.spec.js Lines 23 to 25 in a3d81f6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thanks @andrewserong That was actually the first thing I tried (copy paste 😄 ) but it wasn't passing locally with that line. Maybe I'll add it and YOLO it up to CI There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's because that button only exists in view mode. I'm opening the canvas in edit mode. 👍🏻 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could just click the button if we're already locating it 😄 But as long as it works, I'm fine with it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I ❤️ copy 🍝 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🍝 goes well with e2e tests 😁 |
||||||||
await page.keyboard.type( 'styles revisions' ); | ||||||||
await page | ||||||||
.getByRole( 'option', { name: 'Open styles revisions' } ) | ||||||||
.click(); | ||||||||
await expect( | ||||||||
page.getByTestId( 'global-styles-no-revisions' ) | ||||||||
).toHaveText( 'There are currently no style revisions.' ); | ||||||||
} ); | ||||||||
|
||||||||
test( 'should display revisions UI when there is more than 1 revision', async ( { | ||||||||
page, | ||||||||
editor, | ||||||||
|
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 this a new string? Since we're in the RC period, I was wondering if it's an issue that it's being added. If so, could we temporarily reuse an existing string from somewhere?
No results found.
isn't very friendly, but appears to already exist, in case that's useful.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.
It will be an issue, you're right. Thanks for flagging and suggesting a new string. I YOLO'ed the RC label. I'll try to find an existing string.