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

test: fix issue with electron in service-worker.cy.js #29089

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Mar 7, 2024

Additional details

If the abort_beforeunload_event_child.cy.ts spec runs before the service-worker.cy.ts spec, the getEventListeners(self).fetch command may return undefined instead of the actual listeners. Possibly related to #2118. Theabort_beforeunload_event_child spec is currently always run before the service-worker spec for contributor PRs which is why they are currently failing. We are going to skip the validateFetchHandlers in electron due to this issue. The check is really secondary and the test will still fail if the correlation timeout is hit.

Verified this is NOT a new issue by running the service-worker.cy.js test against v13.6.2 (which is prior to when we added any of the service worker logic) and observing the same 8 test failures.

Steps to test

See successful contributor PR run.

How has the user experience changed?

n/a

PR Tasks

Copy link

cypress bot commented Mar 8, 2024

3 flaky tests on run #54428 ↗︎

0 767 29 0 Flakiness 3

Details:

Merge branch 'develop' into mschile/service_worker_electron_fix
Project: cypress Commit: 86f63d681f
Status: Passed Duration: 16:08 💡
Started: Mar 8, 2024 2:28 AM Ended: Mar 8, 2024 2:44 AM
Flakiness  project-setup.cy.ts • 2 flaky tests • launchpad-e2e

View Output

Test Artifacts
... > skips the setup page when choosing e2e tests to run Test Replay Screenshots
Launchpad: Setup Project > switch testing types > takes the user to first step of e2e setup when switching from app Test Replay Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots

Review all test suite changes for PR #29089 ↗︎

cy.log('Skipping fetch handlers validation in non-Chromium browsers')
// skip validation in non-Chromium and electron browsers
// non-Chromium browsers do not fully support the remote debugger protocol
// possibly remove the electron check on https://github.com/cypress-io/cypress/issues/2118 is resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// possibly remove the electron check on https://github.com/cypress-io/cypress/issues/2118 is resolved
// possibly remove the electron check once https://github.com/cypress-io/cypress/issues/2118 is resolved

@jennifer-shehane jennifer-shehane merged commit cd4a23f into develop Mar 11, 2024
80 of 82 checks passed
@jennifer-shehane jennifer-shehane deleted the mschile/service_worker_electron_fix branch March 11, 2024 15:22
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 13, 2024

Released in 13.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.7.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test: e2e/service-worker.cy.js (fails on contributor PRs)
4 participants