[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-marketing/**/*.spec.js',
'**/admin-tasks/**/*.spec.js',
'**/customize-store/**/*.spec.js',
],
grepInvert: /@skip-on-default-pressable/,
},

View File

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

View File

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

View File

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

View File

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

View File

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