Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix E2E tests in WordPress 5.8 #8160

Closed
spacedmonkey opened this issue Jul 1, 2021 · 0 comments · Fixed by #8223
Closed

Fix E2E tests in WordPress 5.8 #8160

spacedmonkey opened this issue Jul 1, 2021 · 0 comments · Fixed by #8223
Labels
P2 Should do soon Package: E2E Tests /packages/e2e-tests Type: Enhancement New feature or improvement of an existing feature Type: Infrastructure Changes impacting testing infrastructure or build tooling

Comments

@spacedmonkey
Copy link
Contributor

Feature Description

The following E2E tests are failing in WordPress 5.8.

● Web Stories Block › should insert a new web stories block

    TimeoutError: waiting for function failed: timeout 3000ms exceeded

      28 |  */
      29 | async function waitForInserterCloseAndContentFocus() {
    > 30 |   await page.waitForFunction(() =>
         |              ^
      31 |     document.body
      32 |       .querySelector('.block-editor-block-list__layout')
      33 |       ?.contains(document.activeElement)

      at new WaitTask (../../../node_modules/puppeteer/src/common/DOMWorld.ts:777:28)
      at DOMWorld.waitForFunction (../../../node_modules/puppeteer/src/common/DOMWorld.ts:699:22)
      at Frame.waitForFunction (../../../node_modules/puppeteer/src/common/FrameManager.ts:1241:28)
      at Page.waitForFunction (../../../node_modules/puppeteer/src/common/Page.ts:3152:29)
      at waitForInserterCloseAndContentFocus (../../e2e-test-utils/src/insertBlock.js:30:14)
      at insertBlock (../../e2e-test-utils/src/insertBlock.js:50:9)
      at Object.<anonymous> (specs/wordpress/webStoriesBlock.js:90:5)

  ● Web Stories Block › should insert a new web stories block and select story

    TimeoutError: waiting for function failed: timeout 3000ms exceeded

      28 |  */
      29 | async function waitForInserterCloseAndContentFocus() {
    > 30 |   await page.waitForFunction(() =>
         |              ^
      31 |     document.body
      32 |       .querySelector('.block-editor-block-list__layout')
      33 |       ?.contains(document.activeElement)

This is because the block insert has changed and inserter doesn't close as it once did. We will need to write some conditional logic here to get the insertBlock util to work in multiple versions of WP.

Alternatives Considered

Additional Context


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

Implementation Brief

@spacedmonkey spacedmonkey added Type: Enhancement New feature or improvement of an existing feature Type: Infrastructure Changes impacting testing infrastructure or build tooling Pod: WP & Infra Package: E2E Tests /packages/e2e-tests labels Jul 1, 2021
@swissspidy swissspidy added the P2 Should do soon label Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Should do soon Package: E2E Tests /packages/e2e-tests Type: Enhancement New feature or improvement of an existing feature Type: Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants