Skip to content

Commit 9e6b646

Browse files
Migrate Cover Block tests to Playwright (#45784)
* Add new Playwright E2E tests for the cover block. * Add comment * Update block list selector * test/e2e/specs/editor/blocks/cover.spec.js - update spec with accessibility-based selectors where possible. * test/e2e/specs/editor/blocks/cover.spec.js - rebase, rebuild and update the selectors * packages/e2e-tests/specs/editor/blocks/cover.test.js - remove Puppeteer file. * test/e2e/specs/editor/blocks/cover.spec.js - clarify use of `span` element in the first spec. * - add comment explaing use of CSS selector for '.components-resizable-box__handle-bottom'. - move image upload and filename methods previously handled by `getTestImage` into a POM-like function at bottom of file. * - remove testing `test.only` * - define the coverBlock locator after inserting the block, and use that locator as starting point for all other interactions. - use `getComputedStyle` instad of `node.style.<attribute>`. - replace implementation detail check on image upload with a `expect.toPass` check. - remove steps when resizing box. - replace implementation detail check for coverbox height with truthy check. * - fix the import to use `import`. - add comment explaining the use of `span[aria-hidden="true"]`. * - anchor selectors on a parent selector. * - use the Cover block's resize handle as basis for calculation when resizing the block. * - remove testing "only" * - check the src repeatedly to contain the fileBasename instead. * - move `getBackgroundColorAndOpacity` into the ImageBlockUtils POM. * Rename POM to CoverBlockUtils
1 parent 6c83e67 commit 9e6b646

File tree

2 files changed

+284
-177
lines changed

2 files changed

+284
-177
lines changed

packages/e2e-tests/specs/editor/blocks/cover.test.js

Lines changed: 0 additions & 177 deletions
This file was deleted.

0 commit comments

Comments
 (0)