-
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
Add e2e test for publishing a page #9090
Conversation
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.
I made some documentation tweaks but looks good. 👍 We might want to check that other behaviour for pages are covered as well, but this is a great start!
// Start editing again. | ||
await page.type( '.editor-post-title__input', ' (Updated)' ); | ||
|
||
// The post-publishing panel is not visible anymore. |
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.
This doesn't really feel like a test related to the publishing of a post in the first place, but I get it was like that when you got here 😄
@@ -7,22 +7,45 @@ import { | |||
} from '../support/utils'; | |||
|
|||
describe( 'Publishing', () => { | |||
beforeEach( async () => { | |||
await newPost(); | |||
describe( 'a post', () => { |
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.
FWIW we could avoid code duplication by iterating types if all other logic is basically the same:
[ 'post', 'page' ].forEach( ( postType ) => {
describe( postType, () => {
beforeEach( async () => {
await newPost( postType );
} );
// ...
} );
} );
Fix #9087.