Update WC blocks wp-env to use WP 6.6 RC1 (#49037)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Thomas Roberts 2024-07-03 16:09:43 +01:00 committed by GitHub
parent 85cedf2d2b
commit 20e7128775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 13 additions and 15 deletions

View File

@ -1,5 +1,5 @@
{ {
"core": "https://wordpress.org/wordpress-6.6-beta3.zip", "core": "https://wordpress.org/wordpress-6.6-RC2.zip",
"plugins": [ "plugins": [
"https://github.com/WP-API/Basic-Auth/archive/master.zip", "https://github.com/WP-API/Basic-Auth/archive/master.zip",
"https://downloads.wordpress.org/plugin/wordpress-importer.0.8.zip", "https://downloads.wordpress.org/plugin/wordpress-importer.0.8.zip",

View File

@ -358,6 +358,7 @@
"name": "JavaScript", "name": "JavaScript",
"command": "test:js", "command": "test:js",
"changes": [ "changes": [
".wp-env.json",
"webpack.config.js", "webpack.config.js",
"babel.config.js", "babel.config.js",
"tsconfig.json", "tsconfig.json",

View File

@ -255,7 +255,9 @@ test.describe( `${ blockData.name } Block `, () => {
const resetNotice = editor.page const resetNotice = editor.page
.getByLabel( 'Dismiss this notice' ) .getByLabel( 'Dismiss this notice' )
.getByText( `"Single Product" reset.` ); .getByText( `"Single Product" reset.` );
const searchResults = editor.page.getByLabel( 'Actions' ); const searchResults = editor.page.getByLabel( 'Actions', {
exact: true,
} );
await expect.poll( async () => await searchResults.count() ).toBe( 1 ); await expect.poll( async () => await searchResults.count() ).toBe( 1 );
await searchResults.first().click(); await searchResults.first().click();
await editor.page.getByRole( 'menuitem', { name: 'Reset' } ).click(); await editor.page.getByRole( 'menuitem', { name: 'Reset' } ).click();

View File

@ -62,7 +62,9 @@ for ( const template of templates ) {
attributes: { content: userText }, attributes: { content: userText },
} ); } );
await page.getByRole( 'button', { name: 'Save' } ).click(); await page
.getByRole( 'button', { name: 'Save', exact: true } )
.click();
await page await page
.getByRole( 'button', { name: 'Dismiss this notice' } ) .getByRole( 'button', { name: 'Dismiss this notice' } )

View File

@ -55,7 +55,6 @@ test.describe( 'Single Product Template', () => {
} ); } );
await editor.revertTemplateCustomizations( { await editor.revertTemplateCustomizations( {
templateName: testData.templateName, templateName: testData.templateName,
templateType: testData.templateType,
} ); } );
await page.goto( testData.permalink ); await page.goto( testData.permalink );

View File

@ -60,7 +60,6 @@ test.describe( 'Template customization', () => {
} ); } );
await editor.revertTemplateCustomizations( { await editor.revertTemplateCustomizations( {
templateName: testData.templateName, templateName: testData.templateName,
templateType: testData.templateType,
} ); } );
await testData.visitPage( { frontendUtils, page } ); await testData.visitPage( { frontendUtils, page } );
await expect( page.getByText( userText ) ).toBeHidden(); await expect( page.getByText( userText ) ).toBeHidden();
@ -101,7 +100,6 @@ test.describe( 'Template customization', () => {
await editor.revertTemplateCustomizations( { await editor.revertTemplateCustomizations( {
templateName: templateName:
testData.fallbackTemplate?.templateName || '', testData.fallbackTemplate?.templateName || '',
templateType: 'wp_template',
} ); } );
await testData.visitPage( { frontendUtils, page } ); await testData.visitPage( { frontendUtils, page } );
await expect( await expect(
@ -184,7 +182,6 @@ test.describe( 'Template customization', () => {
await editor.revertTemplateCustomizations( { await editor.revertTemplateCustomizations( {
templateName: testData.templateName, templateName: testData.templateName,
templateType: testData.templateType,
} ); } );
await testData.visitPage( { frontendUtils, page } ); await testData.visitPage( { frontendUtils, page } );

View File

@ -69,7 +69,6 @@ test.describe( 'Template customization', () => {
} ); } );
await editor.revertTemplateCustomizations( { await editor.revertTemplateCustomizations( {
templateName: testData.templateName, templateName: testData.templateName,
templateType: testData.templateType,
} ); } );
await testData.visitPage( { frontendUtils, page } ); await testData.visitPage( { frontendUtils, page } );

View File

@ -95,20 +95,14 @@ export class Editor extends CoreEditor {
async revertTemplateCustomizations( { async revertTemplateCustomizations( {
templateName, templateName,
templateType,
}: { }: {
templateName: string; templateName: string;
templateType: 'wp_template' | 'wp_template_part';
} ) { } ) {
await this.page.getByPlaceholder( 'Search' ).fill( templateName ); await this.page.getByPlaceholder( 'Search' ).fill( templateName );
const resetNotice = this.page const resetNotice = this.page
.getByLabel( 'Dismiss this notice' ) .getByLabel( 'Dismiss this notice' )
.getByText( .getByText( `"${ templateName }" reset.` );
templateType === 'wp_template'
? `"${ templateName }" reset.`
: `"${ templateName }" deleted.`
);
const savedButton = this.page.getByRole( 'button', { const savedButton = this.page.getByRole( 'button', {
name: 'Saved', name: 'Saved',
} ); } );

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Comment: This is a monorepo-facing change that updates E2E tests in our CI.