[e2e] External - Expand WPCOM suite, part 1 (#51303)
* Expand WPCOM suite * Skip core-profiler.spec.js on WPCOM - no "Coming soon" * Skip `Analytics-related tests` on WPCOM - different sums * Skip `Marketing Overview page have relevant content` - no content on WPCOM * Payment setup task - make Save button more unique * Include more tests in playwright.config.js * Skip `Store owner can skip the core profiler` * Add changefile(s) from automation for the following project(s): woocommerce * Make "Get paid" more unique --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
77a17e48b7
commit
cebdcc61d0
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Expand the e2e suite we're running on WPCOM.
|
|
@ -9,6 +9,10 @@ config = {
|
|||
use: { ...devices[ 'Desktop Chrome' ] },
|
||||
testMatch: [
|
||||
'**/basic.spec.js',
|
||||
'**/activate-and-setup/**/*.spec.js',
|
||||
'**/admin-analytics/**/*.spec.js',
|
||||
'**/admin-marketing/**/*.spec.js',
|
||||
'**/admin-tasks/**/*.spec.js',
|
||||
'**/shopper/**/*.spec.js',
|
||||
'**/api-tests/**/*.test.js',
|
||||
],
|
||||
|
|
|
@ -3,7 +3,7 @@ const { setOption } = require( '../../utils/options' );
|
|||
|
||||
test.describe(
|
||||
'Store owner can complete the core profiler',
|
||||
{ tag: '@skip-on-default-pressable' },
|
||||
{ tag: [ '@skip-on-default-pressable', '@skip-on-default-wpcom' ] },
|
||||
() => {
|
||||
test.use( { storageState: process.env.ADMINSTATE } );
|
||||
|
||||
|
@ -450,7 +450,7 @@ test.describe(
|
|||
|
||||
test.describe(
|
||||
'Store owner can skip the core profiler',
|
||||
{ tag: '@skip-on-default-pressable' },
|
||||
{ tag: [ '@skip-on-default-pressable', '@skip-on-default-wpcom' ] },
|
||||
() => {
|
||||
test.use( { storageState: process.env.ADMINSTATE } );
|
||||
|
||||
|
|
|
@ -25,7 +25,14 @@ const test = baseTest.extend( {
|
|||
|
||||
test.describe(
|
||||
'Analytics-related tests',
|
||||
{ tag: [ '@payments', '@services', '@skip-on-default-pressable' ] },
|
||||
{
|
||||
tag: [
|
||||
'@payments',
|
||||
'@services',
|
||||
'@skip-on-default-pressable',
|
||||
'@skip-on-default-wpcom',
|
||||
],
|
||||
},
|
||||
() => {
|
||||
let categoryIds, productIds, orderIds, setupPage;
|
||||
|
||||
|
|
|
@ -15,40 +15,44 @@ test.describe( 'Marketing page', () => {
|
|||
).toBeVisible();
|
||||
} );
|
||||
|
||||
test( 'Marketing Overview page have relevant content', async ( {
|
||||
page,
|
||||
} ) => {
|
||||
// Go to the Marketing page.
|
||||
await page.goto( 'wp-admin/admin.php?page=wc-admin&path=%2Fmarketing' );
|
||||
test(
|
||||
'Marketing Overview page have relevant content',
|
||||
{ tag: '@skip-on-default-wpcom' },
|
||||
async ( { page } ) => {
|
||||
// Go to the Marketing page.
|
||||
await page.goto(
|
||||
'wp-admin/admin.php?page=wc-admin&path=%2Fmarketing'
|
||||
);
|
||||
|
||||
// Heading should be overview
|
||||
await expect(
|
||||
page.getByRole( 'heading', { name: 'Overview' } )
|
||||
).toBeVisible();
|
||||
// Heading should be overview
|
||||
await expect(
|
||||
page.getByRole( 'heading', { name: 'Overview' } )
|
||||
).toBeVisible();
|
||||
|
||||
// Sections present
|
||||
await expect(
|
||||
page.getByText( 'Channels', { exact: true } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText( 'Discover more marketing tools' )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Email' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Automations' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Conversion' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'CRM', exact: true } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText( 'Learn about marketing a store' )
|
||||
).toBeVisible();
|
||||
} );
|
||||
// Sections present
|
||||
await expect(
|
||||
page.getByText( 'Channels', { exact: true } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText( 'Discover more marketing tools' )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Email' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Automations' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'Conversion' } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole( 'tab', { name: 'CRM', exact: true } )
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText( 'Learn about marketing a store' )
|
||||
).toBeVisible();
|
||||
}
|
||||
);
|
||||
|
||||
test(
|
||||
'Introduction can be dismissed',
|
||||
|
|
|
@ -73,7 +73,7 @@ test.describe( 'Payment setup task', () => {
|
|||
await page
|
||||
.locator( '//input[@placeholder="BIC / Swift"]' )
|
||||
.fill( 'ABBA' );
|
||||
await page.locator( 'text=Save' ).click();
|
||||
await page.getByRole( 'button', { name: 'Save' } ).click();
|
||||
|
||||
// Check that bank transfers were set up.
|
||||
await expect(
|
||||
|
@ -93,7 +93,7 @@ test.describe( 'Payment setup task', () => {
|
|||
page,
|
||||
} ) => {
|
||||
await page.goto( 'wp-admin/admin.php?page=wc-admin' );
|
||||
await page.locator( 'text=Get paid' ).click();
|
||||
await page.getByRole( 'button', { name: '3 Get paid' } ).click();
|
||||
await expect(
|
||||
page.locator( '.woocommerce-layout__header-wrapper > h1' )
|
||||
).toHaveText( 'Get paid' );
|
||||
|
|
Loading…
Reference in New Issue