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
Restore Post Formats UI by fixing editorSettings variable reference #6879
Changes from all commits
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 |
---|---|---|
|
@@ -12,10 +12,15 @@ describe( 'hello', () => { | |
|
||
it( 'Should show the New Post Page in Gutenberg', async () => { | ||
expect( page.url() ).toEqual( expect.stringContaining( 'post-new.php' ) ); | ||
// Should display the title. | ||
const title = await page.$( '[placeholder="Add title"]' ); | ||
expect( title ).not.toBeNull(); | ||
// Should display the Preview button. | ||
const postPreviewButton = await page.$( '.editor-post-preview.components-button' ); | ||
expect( postPreviewButton ).not.toBeNull(); | ||
// Should display the Post Formats UI. | ||
const postFormatsUi = await page.$( '.editor-post-format' ); | ||
expect( postFormatsUi ).not.toBeNull(); | ||
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 for the e2e test, I wonder if this test should be separate for clarity :) Actually, even testing the preview button seems odd in this "hello world" test but I guess it's fine for now. 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. At some point I'd like to flesh out the e2e tests and make sure we have tests for every element. 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 personally don't think we should have e2e tests for everything :). e2e have maintenability and debugging costs that sometimes I prefer more granular unit tests while keeping the e2e tests for the main regressions we want to prevent from. |
||
} ); | ||
|
||
it( 'Should have no history', async () => { | ||
|
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.
😅