Tag e2e tests with @to-be-removed

This commit is contained in:
Adrian Moldovan 2024-09-12 13:45:44 +03:00
parent f6becfaaa6
commit 8eb8fe384f
1 changed files with 18 additions and 14 deletions

View File

@ -1,17 +1,21 @@
const { test, expect } = require( '@playwright/test' ); const { test, expect } = require( '@playwright/test' );
test.describe( 'Store owner can login and make sure WooCommerce is activated', () => { test.describe(
test.use( { storageState: process.env.ADMINSTATE } ); 'Store owner can login and make sure WooCommerce is activated',
{ tag: [ '@to-be-removed' ] },
() => {
test.use( { storageState: process.env.ADMINSTATE } );
test( 'can make sure WooCommerce is activated.', async ( { page } ) => { test( 'can make sure WooCommerce is activated.', async ( { page } ) => {
await page.goto( '/wp-admin/plugins.php' ); await page.goto( '/wp-admin/plugins.php' );
// Expect the woo plugin to be displayed -- if there's an update available, it has the same data-slug attribute // Expect the woo plugin to be displayed -- if there's an update available, it has the same data-slug attribute
await expect( await expect(
page.locator( "//tr[@data-slug='woocommerce'][1]" ) page.locator( "//tr[@data-slug='woocommerce'][1]" )
).toBeVisible(); ).toBeVisible();
// Expect it to have an active class // Expect it to have an active class
await expect( await expect(
page.locator( "//tr[@data-slug='woocommerce'][1]" ) page.locator( "//tr[@data-slug='woocommerce'][1]" )
).toHaveClass( /active/ ); ).toHaveClass( /active/ );
} ); } );
} ); }
);