[e2e tests] Update locators for Customers page in page-loads spec (#50559)

This commit is contained in:
Adrian Moldovan 2024-08-13 11:04:41 +01:00 committed by GitHub
parent 03049e0d17
commit 7802209887
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
E2E tests: fix flakiness in page-loads customer page test

View File

@ -53,7 +53,7 @@ if ( process.env.CI ) {
reporter.push( [
'html',
{
outputFolder: `${ testsResultsPath }/playwright-report`,
outputFolder: `${ testsRootPath }/playwright-report`,
open: 'on-failure',
},
] );

View File

@ -22,8 +22,8 @@ const wcPages = [
{
name: 'Customers',
heading: 'Customers',
element: '#search-inline-input-0',
text: 'Move backward for selected items',
element: '.woocommerce-dropdown-button__labels',
text: 'All Customers',
},
{
name: 'Reports',
@ -206,8 +206,7 @@ for ( const currentPage of wcPages ) {
} ) => {
await page
.locator(
`li.wp-menu-open > ul.wp-submenu > li:has-text("${ currentPage.subpages[ i ].name }")`,
{ waitForLoadState: 'networkidle' }
`li.wp-menu-open > ul.wp-submenu > li:has-text("${ currentPage.subpages[ i ].name }")`
)
.click();