Fix: Use `waitUntil` instead of `waitForLoadState` in page.goto() (#37831)
* fix: use correct argument in playwright test use waitUntil instead of waitForLoadState. * chore: add log for change * chore: revert changes in e2e test * Update analytics-overview.spec.js Remove waits, failing on CI --------- Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
This commit is contained in:
parent
83e6b55642
commit
2239270edd
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Use waitUntil instead of waitForLoadState in page.goto() and page.click().
|
|
@ -6,8 +6,7 @@ test.describe( 'Analytics pages', () => {
|
|||
test.afterEach( async ( { page } ) => {
|
||||
// do some cleanup after each test to make sure things are where they should be
|
||||
await page.goto(
|
||||
'wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview',
|
||||
{ waitForLoadState: 'networkidle' }
|
||||
'wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview'
|
||||
);
|
||||
|
||||
// Grab all of the section headings
|
||||
|
@ -52,8 +51,7 @@ test.describe( 'Analytics pages', () => {
|
|||
// Create an array of the sections we're expecting to find.
|
||||
const arrExpectedSections = [ 'Charts', 'Leaderboards', 'Performance' ];
|
||||
await page.goto(
|
||||
'wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview',
|
||||
{ waitForLoadState: 'networkidle' }
|
||||
'wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview'
|
||||
);
|
||||
|
||||
for ( const expectedSection of arrExpectedSections ) {
|
||||
|
|
Loading…
Reference in New Issue