Fix failing e2e test merchant/settings-tax (#48792)
* Remove unnecessary step in the settings tax test * Add changelog * Remove unnecessary waituntil
This commit is contained in:
parent
7a8d5e0b6d
commit
134f431187
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
E2E tests: fix failing settings-tax e2e test
|
|
@ -56,9 +56,7 @@ test.describe.serial( 'WooCommerce Tax Settings', () => {
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( 'can set tax options', async ( { page } ) => {
|
test( 'can set tax options', async ( { page } ) => {
|
||||||
await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', {
|
await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', {} );
|
||||||
waitUntil: 'networkidle',
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Make sure we're on the tax tab
|
// Make sure we're on the tax tab
|
||||||
await expect( page.locator( 'a.nav-tab-active' ) ).toContainText(
|
await expect( page.locator( 'a.nav-tab-active' ) ).toContainText(
|
||||||
|
@ -117,26 +115,12 @@ test.describe.serial( 'WooCommerce Tax Settings', () => {
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( 'can add tax classes', async ( { page } ) => {
|
test( 'can add tax classes', async ( { page } ) => {
|
||||||
await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', {
|
await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', {} );
|
||||||
waitUntil: 'networkidle',
|
|
||||||
} );
|
|
||||||
|
|
||||||
await expect( page.locator( 'a.nav-tab-active' ) ).toContainText(
|
await expect( page.locator( 'a.nav-tab-active' ) ).toContainText(
|
||||||
'Tax'
|
'Tax'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Clear out existing tax classes
|
|
||||||
await page.locator( '#woocommerce_tax_classes' ).fill( '' );
|
|
||||||
await page.locator( 'text=Save changes' ).click();
|
|
||||||
|
|
||||||
// Verify that the settings have been saved
|
|
||||||
await expect( page.locator( 'div.updated.inline' ) ).toContainText(
|
|
||||||
'Your settings have been saved.'
|
|
||||||
);
|
|
||||||
await expect( page.locator( '#woocommerce_tax_classes' ) ).toHaveValue(
|
|
||||||
''
|
|
||||||
);
|
|
||||||
|
|
||||||
// Add a "fancy" tax class
|
// Add a "fancy" tax class
|
||||||
await page.locator( '#woocommerce_tax_classes' ).fill( 'Fancy' );
|
await page.locator( '#woocommerce_tax_classes' ).fill( 'Fancy' );
|
||||||
await page.locator( 'text=Save changes' ).click();
|
await page.locator( 'text=Save changes' ).click();
|
||||||
|
@ -152,8 +136,7 @@ test.describe.serial( 'WooCommerce Tax Settings', () => {
|
||||||
|
|
||||||
test( 'can set rate settings', async ( { page } ) => {
|
test( 'can set rate settings', async ( { page } ) => {
|
||||||
await page.goto(
|
await page.goto(
|
||||||
'wp-admin/admin.php?page=wc-settings&tab=tax§ion=fancy',
|
'wp-admin/admin.php?page=wc-settings&tab=tax§ion=fancy'
|
||||||
{ waitUntil: 'networkidle' }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make sure the tax tab is active, with the "fancy" subsection
|
// Make sure the tax tab is active, with the "fancy" subsection
|
||||||
|
|
Loading…
Reference in New Issue