[e2e tests] External sites - update /customize-store tests (#51004)

* Skip - number of introductory patterns not same on Pressable

* Skip - "Want more patterns?" is always present, skipping for now

* Skip -  it activates theme through CLI, don't work for Pressable

* Include /customize-store folder for Pressable execution

* Update month formatting

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
This commit is contained in:
Ivan Stojadinov 2024-08-28 13:03:33 +02:00 committed by GitHub
parent 9f79715d06
commit 98aebdfcc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 166 additions and 152 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update /customize-store tests, so they are passing against Pressable env.

View File

@ -15,6 +15,7 @@ config = {
'**/admin-analytics/**/*.spec.js', '**/admin-analytics/**/*.spec.js',
'**/admin-marketing/**/*.spec.js', '**/admin-marketing/**/*.spec.js',
'**/admin-tasks/**/*.spec.js', '**/admin-tasks/**/*.spec.js',
'**/customize-store/**/*.spec.js',
], ],
grepInvert: /@skip-on-default-pressable/, grepInvert: /@skip-on-default-pressable/,
}, },

View File

@ -412,11 +412,10 @@ test.describe( 'Assembler -> Color Pickers', { tag: '@gutenberg' }, () => {
await expect( colorPicker ).toHaveClass( /is-active/ ); await expect( colorPicker ).toHaveClass( /is-active/ );
} ); } );
test( 'Selected color palette should be applied on the frontend', async ( { test(
assemblerPageObject, 'Selected color palette should be applied on the frontend',
page, { tag: '@skip-on-default-pressable' },
baseURL, async ( { assemblerPageObject, page, baseURL } ) => {
} ) => {
const assembler = await assemblerPageObject.getAssembler(); const assembler = await assemblerPageObject.getAssembler();
const colorPicker = assembler const colorPicker = assembler
.locator( .locator(
@ -510,7 +509,8 @@ test.describe( 'Assembler -> Color Pickers', { tag: '@gutenberg' }, () => {
colorPalette.Slate.header.color.includes( element.color ) colorPalette.Slate.header.color.includes( element.color )
).toBe( true ); ).toBe( true );
} }
} ); }
);
test( 'Create "your own" pickers should be visible', async ( { test( 'Create "your own" pickers should be visible', async ( {
assemblerPageObject, assemblerPageObject,

View File

@ -343,10 +343,10 @@ test.describe( 'Assembler -> Full composability', { tag: '@gutenberg' }, () => {
await expect( defaultPattern ).toBeVisible(); await expect( defaultPattern ).toBeVisible();
} ); } );
test( 'Clicking opt-in new patterns should be available', async ( { test(
pageObject, 'Clicking opt-in new patterns should be available',
baseURL, { tag: '@skip-on-default-pressable' },
} ) => { async ( { pageObject, baseURL } ) => {
await prepareAssembler( pageObject, baseURL ); await prepareAssembler( pageObject, baseURL );
const assembler = await pageObject.getAssembler(); const assembler = await pageObject.getAssembler();
@ -368,7 +368,10 @@ test.describe( 'Assembler -> Full composability', { tag: '@gutenberg' }, () => {
await sidebarPattern.waitFor( { state: 'visible' } ); await sidebarPattern.waitFor( { state: 'visible' } );
await expect( await expect(
assembler.locator( '.block-editor-block-patterns-list__list-item' ) assembler.locator(
'.block-editor-block-patterns-list__list-item'
)
).toHaveCount( 10 ); ).toHaveCount( 10 );
} ); }
);
} ); } );

View File

@ -314,10 +314,10 @@ test.describe( 'Homepage tracking banner', () => {
).toBeVisible(); ).toBeVisible();
} ); } );
test( 'Should not show the "Want more patterns?" banner when tracking is allowed', async ( { test(
baseURL, 'Should not show the "Want more patterns?" banner when tracking is allowed',
pageObject, { tag: '@skip-on-default-pressable' },
} ) => { async ( { baseURL, pageObject } ) => {
await setOption( await setOption(
request, request,
baseURL, baseURL,
@ -331,5 +331,6 @@ test.describe( 'Homepage tracking banner', () => {
await expect( await expect(
assembler.getByText( 'Want more patterns?' ) assembler.getByText( 'Want more patterns?' )
).toBeHidden(); ).toBeHidden();
} ); }
);
} ); } );

View File

@ -235,9 +235,10 @@ test.describe( 'Assembler -> Logo Picker', { tag: '@gutenberg' }, () => {
// alternative way to verify new site icon on the site // alternative way to verify new site icon on the site
// verifying site icon shown in the new tab is impossible in headless mode // verifying site icon shown in the new tab is impossible in headless mode
const date = new Date(); const date = new Date();
const month = ( date.getMonth() + 1 ).toString().padStart( 2, '0' );
await expect( await expect(
page.goto( page.goto(
`/wp-content/uploads/${ date.getFullYear() }/${ date.getMonth() }/image-03-100x100.png` `/wp-content/uploads/${ date.getFullYear() }/${ month }/image-03-100x100.png`
) )
).toBeTruthy(); ).toBeTruthy();
} ); } );

View File

@ -115,9 +115,10 @@ test.describe(
).toBeVisible(); ).toBeVisible();
} ); } );
test( 'it shows the "non default block theme" banner when the theme is a block theme different than TT4', async ( { test(
page, 'it shows the "non default block theme" banner when the theme is a block theme different than TT4',
} ) => { { tag: '@skip-on-default-pressable' },
async ( { page } ) => {
await activateTheme( 'twentytwentythree' ); await activateTheme( 'twentytwentythree' );
await page.goto( CUSTOMIZE_STORE_URL ); await page.goto( CUSTOMIZE_STORE_URL );
@ -128,11 +129,13 @@ test.describe(
await expect( await expect(
page.getByRole( 'button', { name: 'Go to the Editor' } ) page.getByRole( 'button', { name: 'Go to the Editor' } )
).toBeVisible(); ).toBeVisible();
} ); }
);
test( 'clicking on "Go to the Customizer" with a classic theme should go to the customizer', async ( { test(
page, 'clicking on "Go to the Customizer" with a classic theme should go to the customizer',
} ) => { { tag: '@skip-on-default-pressable' },
async ( { page } ) => {
await activateTheme( 'twentytwenty' ); await activateTheme( 'twentytwenty' );
await page.goto( CUSTOMIZE_STORE_URL ); await page.goto( CUSTOMIZE_STORE_URL );
@ -143,6 +146,7 @@ test.describe(
await page.waitForNavigation(); await page.waitForNavigation();
await expect( page.url() ).toContain( 'customize.php' ); await expect( page.url() ).toContain( 'customize.php' );
} ); }
);
} }
); );