Skip to content

Commit

Permalink
Build/Test Tools: Fix the hello e2e test assertion.
Browse files Browse the repository at this point in the history
The previous assertion was always valid because we assumed it returned a single object,
while in reality it was returning an array.

Props hideokamoto.
Fixes #47622.


git-svn-id: https://develop.svn.wordpress.org/trunk@45575 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
youknowriad committed Jun 28, 2019
1 parent 77764a5 commit ed1233d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/specs/hello.test.js
Expand Up @@ -3,9 +3,9 @@ import { visitAdminPage } from '@wordpress/e2e-test-utils';
describe( 'Hello World', () => {
it( 'Should load properly', async () => {
await visitAdminPage( '/' );
const title = await page.$x(
const nodes = await page.$x(
'//h2[contains(text(), "Welcome to WordPress!")]'
);
expect( title ).not.toBeNull();
expect( nodes.length ).not.toEqual( 0 );
} );
} );

0 comments on commit ed1233d

Please sign in to comment.