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

[RNMobile] Invert the expect matcher values of the e2e tests #28770

Merged
merged 4 commits into from Feb 7, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -35,8 +35,8 @@ describe( 'Gutenberg Editor tests for Block insertion', () => {

const html = await editorPage.getHtmlContent();

expect( testData.blockInsertionHtml.toLowerCase() ).toBe(
html.toLowerCase()
expect( html.toLowerCase() ).toBe(
testData.blockInsertionHtml.toLowerCase()
);

// wait for the block editor to load and for accessibility ids to update
Expand Down Expand Up @@ -118,8 +118,8 @@ describe( 'Gutenberg Editor tests for Block insertion', () => {
await paragraphBlockElement.click();
const html = await editorPage.getHtmlContent();

expect( testData.blockInsertionHtmlFromTitle.toLowerCase() ).toBe(
html.toLowerCase()
expect( html.toLowerCase() ).toBe(
testData.blockInsertionHtmlFromTitle.toLowerCase()
);
} );
} );
Expand Up @@ -47,8 +47,8 @@ describe( 'Gutenberg Editor Image Block tests', () => {
if ( ! isAndroid() ) {
const html = await editorPage.getHtmlContent();

expect( testData.imageShorteHtml.toLowerCase() ).toBe(
html.toLowerCase()
expect( html.toLowerCase() ).toBe(
testData.imageShorteHtml.toLowerCase()
);
}
/* eslint-enable jest/no-conditional-expect */
Expand Down
Expand Up @@ -33,7 +33,7 @@ describe( 'Gutenberg Editor tests for List block', () => {

// switch to html and verify html
const html = await editorPage.getHtmlContent();
expect( testData.listHtml.toLowerCase() ).toBe( html.toLowerCase() );
expect( html.toLowerCase() ).toBe( testData.listHtml.toLowerCase() );
} );

// This test depends on being run immediately after 'should be able to add a new List block'
Expand All @@ -50,8 +50,8 @@ describe( 'Gutenberg Editor tests for List block', () => {

// switch to html and verify html
const html = await editorPage.getHtmlContent();
expect( testData.listHtmlOrdered.toLowerCase() ).toBe(
html.toLowerCase()
expect( html.toLowerCase() ).toBe(
testData.listHtmlOrdered.toLowerCase()
);
// Remove list block to return editor to empty state
listBlockElement = await editorPage.getBlockAtPosition(
Expand Down
Expand Up @@ -30,8 +30,9 @@ describe( 'Gutenberg Editor tests for List block (end)', () => {
await editorPage.sendTextToListBlock( listBlockElement, '\n' );

const html = await editorPage.getHtmlContent();
expect( testData.listEndedHtml.toLowerCase() ).toBe(
html.toLowerCase()

expect( html.toLowerCase() ).toBe(
testData.listEndedHtml.toLowerCase()
);
} );
} );
Expand Up @@ -27,11 +27,12 @@ describe( 'Gutenberg Editor tests for List block', () => {

// switch to html and verify html
const html = await editorPage.getHtmlContent();
expect(

expect( html.toLowerCase() ).toBe(
`<!-- wp:list -->
<ul><li> a</li></ul>
<!-- /wp:list -->`
).toBe( html.toLowerCase() );
);

// Remove list block to reset editor to clean state
listBlockElement = await editorPage.getBlockAtPosition(
Expand Down
Expand Up @@ -115,8 +115,9 @@ describe( 'Gutenberg Editor paste tests', () => {

// check styled text by verifying html contents
const html = await editorPage.getHtmlContent();
expect( testData.pasteHtmlTextResult.toLowerCase() ).toBe(
html.toLowerCase()

expect( html.toLowerCase() ).toBe(
testData.pasteHtmlTextResult.toLowerCase()
);
} );
} );
Expand Up @@ -50,8 +50,9 @@ describe( 'Gutenberg Editor tests', () => {
await toggleOrientation( editorPage.driver );

const html = await editorPage.getHtmlContent();
expect( testData.deviceRotationHtml.toLowerCase() ).toBe(
html.toLowerCase()

expect( html.toLowerCase() ).toBe(
testData.deviceRotationHtml.toLowerCase()
);
} );
} );