Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix e2e tests
  • Loading branch information
ellatrix committed Sep 30, 2025
commit 25a0b81137abac2443c1cbfcf7b36decf06a1707
5 changes: 5 additions & 0 deletions test/e2e/specs/site-editor/multi-entity-saving.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ test.describe( 'Site Editor - Multi-entity save flow', () => {
isOnlyCurrentEntityDirty: true,
} );

await page
.getByRole( 'region', { name: 'Editor publish' } )
.getByRole( 'button', { name: 'Activate' } )
.click();

// Change font size again.
await fontSizePicker.getByRole( 'radio', { name: 'Medium' } ).click();

Expand Down
4 changes: 3 additions & 1 deletion test/e2e/specs/site-editor/pages.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ test.describe( 'Pages', () => {
await page
.locator( '.block-editor-block-patterns-list__list-item' )
.click();
await editor.saveSiteEditorEntities();
await editor.saveSiteEditorEntities( {
isOnlyCurrentEntityDirty: true,
} );
await admin.visitSiteEditor();

// Create new page that has the default template so as to swap it.
Expand Down
30 changes: 27 additions & 3 deletions test/e2e/specs/site-editor/template-registration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@ test.describe( 'Block template registration', () => {
name: 'core/paragraph',
attributes: { content: 'User-edited template' },
} );
await editor.saveSiteEditorEntities();
await editor.saveSiteEditorEntities( {
isOnlyCurrentEntityDirty: true,
} );
await page
.getByRole( 'region', { name: 'Editor publish' } )
.getByRole( 'button', { name: 'Activate' } )
.click();
await expect(
page
.getByRole( 'region', { name: 'Editor publish' } )
.getByRole( 'button', { name: 'Activating…' } )
).toBeHidden();
await page.goto( '/?cat=1' );
await expect( page.getByText( 'User-edited template' ) ).toBeVisible();

Expand Down Expand Up @@ -190,7 +201,9 @@ test.describe( 'Block template registration', () => {
name: 'core/paragraph',
attributes: { content: 'User-customized template' },
} );
await editor.saveSiteEditorEntities();
await editor.saveSiteEditorEntities( {
isOnlyCurrentEntityDirty: true,
} );

// Deactivate plugin.
await requestUtils.deactivatePlugin(
Expand Down Expand Up @@ -285,7 +298,18 @@ test.describe( 'Block template registration', () => {
name: 'core/paragraph',
attributes: { content: 'Author template customized by the user.' },
} );
await editor.saveSiteEditorEntities();
await editor.saveSiteEditorEntities( {
isOnlyCurrentEntityDirty: true,
} );
await page
.getByRole( 'region', { name: 'Editor publish' } )
.getByRole( 'button', { name: 'Activate' } )
.click();
await expect(
page
.getByRole( 'region', { name: 'Editor publish' } )
.getByRole( 'button', { name: 'Activating…' } )
).toBeHidden();

await requestUtils.activatePlugin(
'gutenberg-test-block-template-registration'
Expand Down