[e2e tests] Update locators for Customers page in page-loads spec (#50559)
This commit is contained in:
parent
03049e0d17
commit
7802209887
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
E2E tests: fix flakiness in page-loads customer page test
|
|
@ -53,7 +53,7 @@ if ( process.env.CI ) {
|
||||||
reporter.push( [
|
reporter.push( [
|
||||||
'html',
|
'html',
|
||||||
{
|
{
|
||||||
outputFolder: `${ testsResultsPath }/playwright-report`,
|
outputFolder: `${ testsRootPath }/playwright-report`,
|
||||||
open: 'on-failure',
|
open: 'on-failure',
|
||||||
},
|
},
|
||||||
] );
|
] );
|
||||||
|
|
|
@ -22,8 +22,8 @@ const wcPages = [
|
||||||
{
|
{
|
||||||
name: 'Customers',
|
name: 'Customers',
|
||||||
heading: 'Customers',
|
heading: 'Customers',
|
||||||
element: '#search-inline-input-0',
|
element: '.woocommerce-dropdown-button__labels',
|
||||||
text: 'Move backward for selected items',
|
text: 'All Customers',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Reports',
|
name: 'Reports',
|
||||||
|
@ -206,8 +206,7 @@ for ( const currentPage of wcPages ) {
|
||||||
} ) => {
|
} ) => {
|
||||||
await page
|
await page
|
||||||
.locator(
|
.locator(
|
||||||
`li.wp-menu-open > ul.wp-submenu > li:has-text("${ currentPage.subpages[ i ].name }")`,
|
`li.wp-menu-open > ul.wp-submenu > li:has-text("${ currentPage.subpages[ i ].name }")`
|
||||||
{ waitForLoadState: 'networkidle' }
|
|
||||||
)
|
)
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue