E2E Tweaks - Stricter selector and smart wait (#48471)
* Strict selector * Wait for element * Add changefile(s) from automation for the following project(s): woocommerce * Linter * Tweak * Use a different selector * Tweak selector * Wait for Delete Users to be visible * Trigger CI --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
2165bfd29f
commit
29ee0ab6cf
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
</details> Improve E2E selector by making it stricter. Wait for text due to AJAX call. <details> <summary>E2E test tweaks</summary>
|
|
@ -171,6 +171,9 @@ for ( const productType of Object.keys( productData ) ) {
|
|||
if ( productData[ productType ].shipping ) {
|
||||
await test.step( 'add shipping details', async () => {
|
||||
await page.getByRole( 'link', { name: 'Shipping' } ).click();
|
||||
await expect(
|
||||
page.getByText( 'Shipping class', { exact: true } )
|
||||
).toBeVisible();
|
||||
await page
|
||||
.getByPlaceholder( '0' )
|
||||
.fill( productData[ productType ].shipping.weight );
|
||||
|
|
|
@ -61,6 +61,10 @@ async function userDeletionTest( page, username ) {
|
|||
} );
|
||||
|
||||
await test.step( 'confirm deletion', async () => {
|
||||
await expect(
|
||||
page.getByRole( 'heading', { name: 'Delete Users' } )
|
||||
).toBeVisible();
|
||||
|
||||
await expect( page.getByText( `${ username }` ) ).toBeVisible();
|
||||
await page.getByRole( 'button', { name: 'Confirm Deletion' } ).click();
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue