Skip to content

Commit

Permalink
Remove 'errorDisplayed' assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart authored and fullofcaffeine committed Mar 2, 2021
1 parent cf47b97 commit 0a431e6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 90 deletions.
17 changes: 0 additions & 17 deletions test/e2e/specs/wp-calypso-gutenberg-page-editor-spec.js
Expand Up @@ -70,13 +70,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Pages (${ screenSize })`, funct
const gEditorSidebarComponent = await GutenbergEditorSidebarComponent.Expect( driver );
await gEditorSidebarComponent.enterImageAltText( fileDetails );
await gEditorComponent.closeSidebar();

const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);
} );

/* Skip until sharing is added in Gutenberg editor
Expand Down Expand Up @@ -272,13 +265,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Pages (${ screenSize })`, funct
let gHeaderComponent = await GutenbergEditorComponent.Expect( driver );
await gHeaderComponent.enterTitle( pageTitle );

const errorShown = await gHeaderComponent.errorDisplayed();
assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);

const gSidebarComponent = await GutenbergEditorSidebarComponent.Expect( driver );
await gSidebarComponent.chooseDocumentSettings();
await gSidebarComponent.setVisibilityToPasswordProtected( postPassword );
Expand Down Expand Up @@ -545,9 +531,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Pages (${ screenSize })`, funct
const gPaymentComponent = await SimplePaymentsBlockComponent.Expect( driver, blockId );
await gPaymentComponent.insertPaymentButtonDetails( paymentButtonDetails );

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual( errorShown, false, 'There is an error shown on the editor page!' );

await gEditorComponent.enterTitle( pageTitle );
await gEditorComponent.ensureSaved();
return await gPaymentComponent.ensurePaymentButtonDisplayedInEditor();
Expand Down
54 changes: 1 addition & 53 deletions test/e2e/specs/wp-calypso-gutenberg-post-editor-spec.js
Expand Up @@ -79,13 +79,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gEditorSidebarComponent = await GutenbergEditorSidebarComponent.Expect( driver );
await gEditorSidebarComponent.enterImageAltText( fileDetails );
await gEditorComponent.closeSidebar();

const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);
} );

step( 'Expand Categories and Tags', async function () {
Expand Down Expand Up @@ -270,13 +263,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
await gEditorComponent.initEditor();
await gEditorComponent.enterTitle( blogPostTitle );
await gEditorComponent.enterText( blogPostQuote );

const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);
} );

step( 'Can see the Earn blocks', async function () {
Expand Down Expand Up @@ -363,9 +349,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.enterTitle( blogPostTitle );
await gEditorComponent.enterText( blogPostQuote );

const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual( errorShown, false, 'There is an error shown on the editor page!' );
} );

step( 'Can publish and view content', async function () {
Expand Down Expand Up @@ -412,13 +395,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.enterTitle( blogPostTitle );
await gEditorComponent.enterText( blogPostQuote );

const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the editor page!'
);
} );

step(
Expand Down Expand Up @@ -597,13 +573,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
let gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.enterTitle( blogPostTitle );

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);

const gSidebarComponent = await GutenbergEditorSidebarComponent.Expect( driver );
await gSidebarComponent.chooseDocumentSettings();
await gSidebarComponent.setVisibilityToPasswordProtected( postPassword );
Expand Down Expand Up @@ -905,12 +874,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.enterTitle( originalBlogPostTitle );
await gEditorComponent.enterText( blogPostQuote );
const errorShown = await gEditorComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the editor page!'
);
} );

step( 'Can publish the post', async function () {
Expand Down Expand Up @@ -985,10 +948,8 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
'Can set the new title and update it, and link to the updated post',
async function () {
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );

await gEditorComponent.enterTitle( updatedBlogPostTitle );
const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual( errorShown, false, 'There is an error shown on the editor page!' );

return await gEditorComponent.update( { visit: true } );
}
);
Expand Down Expand Up @@ -1033,9 +994,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
await gEditorComponent.insertContactForm( contactEmail, subject );
await gEditorComponent.ensureSaved();

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual( errorShown, false, 'There is an error shown on the editor page!' );

const contactFormDisplayedInEditor = await gEditorComponent.contactFormDisplayedInEditor();
assert.strictEqual(
contactFormDisplayedInEditor,
Expand Down Expand Up @@ -1089,9 +1047,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gPaymentComponent = await SimplePaymentsBlockComponent.Expect( driver, blockId );
await gPaymentComponent.insertPaymentButtonDetails( paymentButtonDetails );

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual( errorShown, false, 'There is an error shown on the editor page!' );

await gEditorComponent.enterTitle( blogPostTitle );
await gEditorComponent.ensureSaved();
return await gPaymentComponent.ensurePaymentButtonDisplayedInEditor();
Expand Down Expand Up @@ -1185,13 +1140,6 @@ describe( `[${ host }] Calypso Gutenberg Editor: Posts (${ screenSize })`, funct
const gHeaderComponent = await GutenbergEditorComponent.Expect( driver );
await gHeaderComponent.enterTitle( originalBlogPostTitle );
await gHeaderComponent.enterText( blogPostQuote );

const errorShown = await gHeaderComponent.errorDisplayed();
return assert.strictEqual(
errorShown,
false,
'There is an error shown on the Gutenberg editor page!'
);
} );

step( 'Can publish the post', async function () {
Expand Down
5 changes: 0 additions & 5 deletions test/e2e/specs/wp-calypso-gutenberg-upgrade-spec.js
Expand Up @@ -127,11 +127,6 @@ function verifyBlockInEditor( Block ) {
assert( blockDisplayed, `The block "${ Block.blockName }" was not found in the editor.` );
} );

step( 'Block does not error in the editor', async function () {
const errorDisplayed = await editor.errorDisplayed();
assert( ! errorDisplayed, `The block "${ Block.blockName }" errored in the editor.` );
} );

step( 'Block does not invalidate', async function () {
const hasInvalidBlocks = await editor.hasInvalidBlocks();
assert( ! hasInvalidBlocks, `The block "${ Block.blockName }" is invalid.` );
Expand Down
15 changes: 0 additions & 15 deletions test/e2e/specs/wp-signup-spec.js
Expand Up @@ -484,14 +484,6 @@ describe( `[${ host }] Sign Up (${ screenSize }, ${ locale })`, function () {
await myHomePage.updateHomepageFromSiteSetup();
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.initEditor();

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual(
errorShown,
false,
'There is a block editor error when editing the homepage'
);

const hasInvalidBlocks = await gEditorComponent.hasInvalidBlocks();
assert.strictEqual(
hasInvalidBlocks,
Expand Down Expand Up @@ -1114,13 +1106,6 @@ describe( `[${ host }] Sign Up (${ screenSize }, ${ locale })`, function () {
const gEditorComponent = await GutenbergEditorComponent.Expect( driver );
await gEditorComponent.initEditor();

const errorShown = await gEditorComponent.errorDisplayed();
assert.strictEqual(
errorShown,
false,
'There is a block editor error when editing the homepage'
);

const hasInvalidBlocks = await gEditorComponent.hasInvalidBlocks();
assert.strictEqual(
hasInvalidBlocks,
Expand Down

0 comments on commit 0a431e6

Please sign in to comment.