-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
EDIT: Update description
With Template Activation some @wordpress/e2e-test-utils-playwright stopped working as they used to, mainly saveSiteEditorEntities in packages/e2e-test-utils-playwright/src/editor/site-editor.ts. Save flow has changed and will be updated so final changes should include whatever #71811 ends up with
This is old description but visitSiteEditor can be easily addressed by either providing wp_id returned for custom created template or replacing wp_template with wp_registered_template.
With Template Activation some @wordpress/e2e-test-utils-playwright stopped working as they used to, mainly visitSiteEditor in packages/e2e-test-utils-playwright/src/admin/visit-site-editor.ts no longer works when passing postType: wp_template, postId: <<template_slug>> resulting in /wp-admin/site-editor.php?postId=twentytwentyfour%2F%2Fsingle-product&postType=wp_template&canvas=edit and no content:
Step-by-step reproduction instructions
In your Playwright test use visitSiteEditor util to visit template in editor:
Used to be:
await visitSiteEditor( {
postId: <<TEMPLATE_SLUG>>,
postType: 'wp_template',
canvas: 'edit',
} );
now with template slug being represented by postId it cannot be always known upfront.
Screenshots, screen recording, code snippet
No response
Environment info
- GB 21.7RC
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure