Wordpress/tests/e2e/specs/hello.test.js
Riad Benguella ed1233d05f 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
2019-06-28 11:33:13 +00:00

12 lines
311 B
JavaScript

import { visitAdminPage } from '@wordpress/e2e-test-utils';
describe( 'Hello World', () => {
it( 'Should load properly', async () => {
await visitAdminPage( '/' );
const nodes = await page.$x(
'//h2[contains(text(), "Welcome to WordPress!")]'
);
expect( nodes.length ).not.toEqual( 0 );
} );
} );