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

Try fixing CTA test. #3057

Merged
merged 6 commits into from
Aug 21, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/e2e/specs/stories-editor/cta.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
createNewPost,
clickButton,
getAllBlocks,
selectBlockByClientId,
} from '@wordpress/e2e-test-utils';

/**
Expand Down Expand Up @@ -47,9 +48,7 @@ describe( 'Stories Editor Screen', () => {
expect( nodes ).toHaveLength( 1 );
} );

// Disable reason: Test is flaky in headless mode - needs to be investigated.
// eslint-disable-next-line jest/no-disabled-tests
it.skip( 'should display validation error when CTA block is on the first Page', async () => {
it( 'should display validation error when CTA block is on the first Page', async () => {
await createNewPost( { postType: 'amp_story' } );

const firstPageClientId = ( await getAllBlocks() )[ 0 ].clientId;
swissspidy marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -60,6 +59,7 @@ describe( 'Stories Editor Screen', () => {
await goToPreviousPage();

await page.waitForSelector( `#block-${ firstPageClientId }.amp-page-active` );
await selectBlockByClientId( firstPageClientId );

await clickButtonByLabel( 'More options' );
await clickButton( 'Remove Block' );
Expand Down