[e2e tests] External sites - update /shopper tests, part 2 (#51100)

* Update shopper tests, external config and add tags

* Update WPCOM config to include shopper tests
This commit is contained in:
Veljko V. 2024-09-04 22:09:04 +02:00 committed by GitHub
parent a5623099dd
commit 18ab90badd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 116 additions and 41 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update /shopper tests (second part), so they are passing against Pressable env.

View File

@ -21,6 +21,23 @@ config = {
'**/merchant/create-checkout-block.spec.js',
'**/merchant/create-coupon.spec.js',
'**/merchant/create-order.spec.js',
'**/shopper/checkout-create-account.spec.js',
'**/shopper/checkout-login.spec.js',
'**/shopper/checkout.spec.js',
'**/shopper/dashboard-access.spec.js',
'**/shopper/mini-cart.spec.js',
'**/shopper/my-account-addresses.spec.js',
'**/shopper/my-account-create-account.spec.js',
'**/shopper/my-account-downloads.spec.js',
'**/shopper/my-account-pay-order.spec.js',
'**/shopper/my-account.spec.js',
'**/shopper/order-email-receiving.spec.js',
'**/shopper/product-grouped.spec.js',
'**/shopper/product-simple.spec.js',
'**/shopper/product-tags-attributes.spec.js',
'**/shopper/product-variable.spec.js',
'**/shopper/shop-search-browse-sort.spec.js',
'**/shopper/shop-title-after-deletion.spec.js',
],
grepInvert: /@skip-on-default-pressable/,
},

View File

@ -7,7 +7,27 @@ config = {
{
name: 'default wpcom',
use: { ...devices[ 'Desktop Chrome' ] },
testMatch: '**basic.spec.js',
testMatch: [
'**/basic.spec.js',
'**/shopper/checkout-create-account.spec.js',
'**/shopper/checkout-login.spec.js',
'**/shopper/checkout.spec.js',
'**/shopper/dashboard-access.spec.js',
'**/shopper/mini-cart.spec.js',
'**/shopper/my-account-addresses.spec.js',
'**/shopper/my-account-create-account.spec.js',
'**/shopper/my-account-downloads.spec.js',
'**/shopper/my-account-pay-order.spec.js',
'**/shopper/my-account.spec.js',
'**/shopper/order-email-receiving.spec.js',
'**/shopper/product-grouped.spec.js',
'**/shopper/product-simple.spec.js',
'**/shopper/product-tags-attributes.spec.js',
'**/shopper/product-variable.spec.js',
'**/shopper/shop-search-browse-sort.spec.js',
'**/shopper/shop-title-after-deletion.spec.js',
],
grepInvert: /@skip-on-default-wpcom/,
},
],
};

View File

@ -72,7 +72,10 @@ async function runComingSoonTests( themeContext = '' ) {
} );
}
test.describe( 'Launch Your Store front end - logged out', () => {
test.describe(
'Launch Your Store front end - logged out',
{ tag: [ '@skip-on-default-wpcom', '@skip-on-default-pressable' ] },
() => {
test.afterAll( async ( { baseURL } ) => {
try {
await setOption(
@ -109,6 +112,11 @@ test.describe( 'Launch Your Store front end - logged out', () => {
await activateTheme( DEFAULT_THEME );
} );
runComingSoonTests( test.step, test.use, 'Classic Theme (Storefront)' );
} );
runComingSoonTests(
test.step,
test.use,
'Classic Theme (Storefront)'
);
} );
}
);

View File

@ -24,7 +24,14 @@ const test = baseTest.extend( {
test.describe(
'Filter items in the shop by product price',
{ tag: [ '@payments', '@services' ] },
{
tag: [
'@payments',
'@services',
'@skip-on-default-wpcom',
'@skip-on-default-pressable',
],
},
() => {
test.beforeAll( async ( { api } ) => {
// add products

View File

@ -30,6 +30,18 @@ test.describe(
await page
.getByText( '1 page restored from the Trash.' )
.waitFor( { state: 'visible' } );
await page.goto( 'wp-admin/edit.php?post_type=page' );
await page.getByRole( 'cell', { name: '“Shop” (Edit)' } ).hover();
await page
.getByLabel( 'Quick edit “Shop” inline' )
.click( { force: true } );
await page
.getByLabel( 'Status Published Pending' )
.selectOption( 'publish', { exact: true } );
await page.getByRole( 'button', { name: 'Update' } ).click();
await page
.locator( '#a11y-speak-polite', { hasText: 'Changes saved.' } )
.waitFor();
} );
test( 'Check the title of the shop page after the page has been deleted', async ( {

View File

@ -6,7 +6,13 @@ const test = baseTest.extend( {
test(
'logged-in customer can comment on a post',
{ tag: [ '@non-critical' ] },
{
tag: [
'@non-critical',
'@skip-on-default-wpcom',
'@skip-on-default-pressable',
],
},
async ( { page } ) => {
await page.goto( 'hello-world/' );
await expect(

View File

@ -45,6 +45,7 @@ const goToPageEditor = async ( { page } ) => {
);
await page.goto( 'wp-admin/post-new.php?post_type=page' );
await disableWelcomeModal( { page } );
await closeChoosePatternModal( { page } );
await responsePromise;
};