diff --git a/plugins/woocommerce/changelog/50994-e2e-external-sites-update-admin-tests b/plugins/woocommerce/changelog/50994-e2e-external-sites-update-admin-tests new file mode 100644 index 00000000000..4c731ca0240 --- /dev/null +++ b/plugins/woocommerce/changelog/50994-e2e-external-sites-update-admin-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +Update admin-* folders, so e2e tests are passing against Pressable env. \ No newline at end of file diff --git a/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js b/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js index fe57da38ed9..d0ae4f28382 100644 --- a/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js +++ b/plugins/woocommerce/tests/e2e-pw/envs/default-pressable/playwright.config.js @@ -12,6 +12,9 @@ config = { '**/merchant/products/add-variable-product/**/*.spec.js', '**/activate-and-setup/**/*.spec.js', '**/merchant/products/block-editor/**/*.spec.js', + '**/admin-analytics/**/*.spec.js', + '**/admin-marketing/**/*.spec.js', + '**/admin-tasks/**/*.spec.js', ], grepInvert: /@skip-on-default-pressable/, }, diff --git a/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js index fe893b0808c..6cfd1d35fd2 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js @@ -25,7 +25,7 @@ const test = baseTest.extend( { test.describe( 'Analytics-related tests', - { tag: [ '@payments', '@services' ] }, + { tag: [ '@payments', '@services', '@skip-on-default-pressable' ] }, () => { let categoryIds, productIds, orderIds, setupPage; diff --git a/plugins/woocommerce/tests/e2e-pw/tests/admin-marketing/overview.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/admin-marketing/overview.spec.js index cc69f347113..2ababaf97ec 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/admin-marketing/overview.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/admin-marketing/overview.spec.js @@ -27,11 +27,6 @@ test.describe( 'Marketing page', () => { ).toBeVisible(); // Sections present - await expect( - page.getByText( - 'Reach new customers and increase sales without leaving WooCommerce' - ) - ).toBeVisible(); await expect( page.getByText( 'Channels', { exact: true } ) ).toBeVisible(); @@ -55,38 +50,44 @@ test.describe( 'Marketing page', () => { ).toBeVisible(); } ); - test( 'Introduction can be dismissed', async ( { page } ) => { - // Go to the Marketing page. - await page.goto( 'wp-admin/admin.php?page=wc-admin&path=%2Fmarketing' ); + test( + 'Introduction can be dismissed', + { tag: '@skip-on-default-pressable' }, + async ( { page } ) => { + // Go to the Marketing page. + await page.goto( + 'wp-admin/admin.php?page=wc-admin&path=%2Fmarketing' + ); - // Dismiss the introduction (if it's visible) - try { - await page - .locator( - '.woocommerce-marketing-introduction-banner-illustration > .components-button' + // Dismiss the introduction (if it's visible) + try { + await page + .locator( + '.woocommerce-marketing-introduction-banner-illustration > .components-button' + ) + .click( { timeout: 2000 } ); + } catch ( e ) { + console.log( 'Info: introduction already hidden' ); + } + + // The introduction should be hidden. + await expect( + page.getByText( + 'Reach new customers and increase sales without leaving WooCommerce' ) - .click( { timeout: 2000 } ); - } catch ( e ) { - console.log( 'Info: introduction already hidden' ); + ).toBeHidden(); + + // Refresh the page to make sure the state is saved. + await page.reload(); + + // The introduction should still be hidden. + await expect( + page.getByText( + 'Reach new customers and increase sales without leaving WooCommerce' + ) + ).toBeHidden(); } - - // The introduction should be hidden. - await expect( - page.getByText( - 'Reach new customers and increase sales without leaving WooCommerce' - ) - ).toBeHidden(); - - // Refresh the page to make sure the state is saved. - await page.reload(); - - // The introduction should still be hidden. - await expect( - page.getByText( - 'Reach new customers and increase sales without leaving WooCommerce' - ) - ).toBeHidden(); - } ); + ); test( 'Learning section can be expanded', async ( { page } ) => { // Go to the Dashboard page (this adds time for posts to be created)