Skip to content
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

Merged
merged 2 commits into from
Aug 17, 2018
Merged

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented Aug 17, 2018

Fix #9087.

@oandregal oandregal requested a review from tofumatt August 17, 2018 12:54
@oandregal oandregal self-assigned this Aug 17, 2018
Copy link
Member

@tofumatt tofumatt left a 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.
Copy link
Member

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 😄

@oandregal oandregal added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Aug 17, 2018
@oandregal oandregal merged commit 0c36e7f into master Aug 17, 2018
@oandregal oandregal deleted the add/e2e-test-publish-page branch August 17, 2018 14:31
@@ -7,22 +7,45 @@ import {
} from '../support/utils';

describe( 'Publishing', () => {
beforeEach( async () => {
await newPost();
describe( 'a post', () => {
Copy link
Member

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 );
		} );

		// ...
	} );
} );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants