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

Merged
merged 1 commit into from May 22, 2018

Conversation

Projects
None yet
2 participants
@danielbachhuber
Member

danielbachhuber commented May 21, 2018

Adds e2e test to prevent future regression.

image

Fixes #6864

@danielbachhuber danielbachhuber added this to the 3.0 milestone May 21, 2018

@@ -14,8 +14,11 @@ function PostFormatCheck( { disablePostFormats, ...props } ) {
}
export default withSelect(
( select ) => ( {
disablePostFormats: select( 'core/editor' ).getEditorSettings(),

This comment has been minimized.

@youknowriad

youknowriad May 22, 2018

Contributor

😅

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

This comment has been minimized.

@youknowriad

youknowriad May 22, 2018

Contributor

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.

This comment has been minimized.

@danielbachhuber

danielbachhuber May 22, 2018

Member

At some point I'd like to flesh out the e2e tests and make sure we have tests for every element.

This comment has been minimized.

@youknowriad

youknowriad May 22, 2018

Contributor

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.

@youknowriad

LGTM 👍

@danielbachhuber danielbachhuber merged commit e925479 into master May 22, 2018

2 checks passed

codecov/project 46.44% (-0.01%) compared to 5a91c0a
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 6864-restore-post-formats branch May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment