Build/Test Tools: Fix the hello e2e test assertion.

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
This commit is contained in:
Riad Benguella 2019-06-28 11:33:13 +00:00
parent 77764a5754
commit ed1233d05f

View File

@ -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 );
} );
} );