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 flaky E2E tests in specs/modules/analytics/setup-with-account-with-tag.test.js. #10109

Open
1 task
techanvil opened this issue Jan 23, 2025 · 0 comments
Open
1 task
Labels
P0 High priority Type: Infrastructure Engineering infrastructure & tooling

Comments

@techanvil
Copy link
Collaborator

techanvil commented Jan 23, 2025

Feature Description

We still have a number of E2E tests failing with some regularity in our CI test runs. The task of fixing them has been split into four issues in order to make it easier to investigate and fix. See #10108, #10110, #10111.

setting up the Analytics module with an existing account and existing tag › informs about an existing tag that matches the current selected property

Example: https://github.com/google/site-kit-wp/actions/runs/12880056623/job/35908487009#step:11:249

Details
FAIL specs/modules/analytics/setup-with-account-with-tag.test.js (17.321 s)
  ● setting up the Analytics module with an existing account and existing tag › informs about an existing tag that matches the current selected property

    expect(jest.fn()).not.toHaveErrored(expected)

    Expected mock function not to be called but it was called with:
    ["Google Site Kit API Error method:GET datapoint:container-destinations type:modules identifier:analytics-4 error:\"The response is not a valid JSON response.\""]

      at Object.assertExpectedCalls (../../node_modules/@wordpress/jest-console/build/@wordpress/jest-console/src/index.js:36:4)
          at runMicrotasks (<anonymous>)

setting up the Analytics module with an existing account and existing tag › does allow Analytics to be set up with an existing tag if it is a GA4 tag

Example: https://github.com/google/site-kit-wp/actions/runs/12881028076/job/35910945895#step:11:260

Details
FAIL specs/modules/analytics/setup-with-account-with-tag.test.js (18.277 s)
  ● setting up the Analytics module with an existing account and existing tag › does allow Analytics to be set up with an existing tag if it is a GA4 tag

    TimeoutError: waiting for selector `.googlesitekit-publisher-win--win-success` failed: timeout 5000ms exceeded

      230 | 		} );
      231 | 
    > 232 | 		await page.waitForSelector(
          | 		           ^
      233 | 			'.googlesitekit-publisher-win--win-success'
      234 | 		);
      235 | 		await expect( page ).toMatchElement(

      at new WaitTask (../../node_modules/puppeteer/src/common/DOMWorld.ts:788:28)
      at DOMWorld.waitForSelectorInPage (../../node_modules/puppeteer/src/common/DOMWorld.ts:642:22)
      at Object.internalHandler.waitFor (../../node_modules/puppeteer/src/common/QueryHandler.ts:78:19)
      at DOMWorld.waitForSelector (../../node_modules/puppeteer/src/common/DOMWorld.ts:500:25)
      at Frame.waitForSelector (../../node_modules/puppeteer/src/common/FrameManager.ts:1161:47)
      at Page.waitForSelector (../../node_modules/puppeteer/src/common/Page.ts:3127:29)
      at Object.<anonymous> (specs/modules/analytics/setup-with-account-with-tag.test.js:232:14)
          at runMicrotasks (<anonymous>)

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

Acceptance criteria

  • The tests listed in the Feature Description should pass every time in CI.

Implementation Brief

Test Coverage

QA Brief

Changelog entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

1 participant