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: move main tab activation to puppeteer plugin #28898

Merged
merged 17 commits into from
Feb 20, 2024

Conversation

cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Feb 8, 2024

Additional details

Previously, we were attempting to activate the main tab before and after every command. This required the Chrome extension to be loaded and enabled, and was only useful for users who were leveraging the Puppeteer plugin. If the extension was disabled or disallowed by policy, commands would cause the runner to hang even when the Puppeteer plugin was not in use.

This PR moves tab closing behavior into the Puppeteer plugin itself, and adds some support logic to the driver and extension in order to accommodate the logic happening in a Cypress plugin rather than in the browser.

Steps to test

How has the user experience changed?

PR Tasks

@cacieprins cacieprins marked this pull request as ready for review February 13, 2024 14:03
@cacieprins cacieprins force-pushed the cacie/fix/main-tab-reactivation-hang branch from 7f32980 to f6fc4f0 Compare February 13, 2024 14:30
Copy link

cypress bot commented Feb 13, 2024

8 flaky tests on run #54067 ↗︎

0 28947 1341 0 Flakiness 8

Details:

Merge branch 'develop' into cacie/fix/main-tab-reactivation-hang
Project: cypress Commit: 948c377b6a
Status: Passed Duration: 20:15 💡
Started: Feb 16, 2024 2:14 PM Ended: Feb 16, 2024 2:34 PM
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
Flakiness  e2e/origin/basic_login.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
Multi-step Auth > final auth redirects back to approval page - flat
    </td>
  </tr></table>
Flakiness  open-mode.cy.ts • 1 flaky test • launchpad-e2e

View Output

Test Artifacts
Launchpad: Open Mode > request for Cypress manifest > does not include `x-dependencies` header, if this is not the initial launch of Cypress Test Replay Screenshots
Flakiness  global-mode.cy.ts • 1 flaky test • launchpad-e2e

View Output

Test Artifacts
... > can be opened Test Replay Screenshots
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay

The first 5 flaky specs are shown, see all 7 specs in Cypress Cloud.

Review all test suite changes for PR #28898 ↗︎

@cacieprins cacieprins marked this pull request as draft February 13, 2024 16:02
@cacieprins cacieprins marked this pull request as ready for review February 13, 2024 18:50
cli/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

looks like there is a dupe header in the changelog?

}

window.addEventListener('message', onMessage)
window.postMessage({ message: 'cypress:extension:activate:main:tab' })
Copy link
Contributor

Choose a reason for hiding this comment

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

whats the difference between cypress:extension:main:tab:activated and cypress:extension:activate:main:tab?

Copy link
Contributor

Choose a reason for hiding this comment

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

cypress:extension:activate:main:tab is sent to the extension to tell it to activate the main tab. cypress:extension:main:tab:activated is the ack that the main tab was successfully activated.

@AtofStryker AtofStryker self-requested a review February 15, 2024 20:56
@cacieprins cacieprins merged commit ed2fc13 into develop Feb 20, 2024
80 of 82 checks passed
@cacieprins cacieprins deleted the cacie/fix/main-tab-reactivation-hang branch February 20, 2024 16:28
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 20, 2024

Released in 13.6.5.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 20, 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.

Cypress v13.6.0 no longer running commands (hangs) when we focus out of the window
4 participants