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

chore: hide reporter when protocol is enabled #27482

Merged
merged 22 commits into from Aug 16, 2023

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Aug 7, 2023

Additional details

  • Added a runtime server config item (hideCommandLog) that is enabled when the user has explicitly set CYPRESS_NO_COMMAND_LOG=1 or if protocol has been enabled.
  • When taking a runner screenshot (also applies to failure screenshots) and the reporter is hidden, a screenshot of the AUT in the current viewport is now taken.
    • All other existing runner specific logic was left as-is (i.e. blackout option is still ignored)

Steps to test

  • Run a test that takes a runner screenshot (cy.screenshot({ capture: 'runner' })) with protocol enabled.
    • Verify the reporter is not displayed while the tests are running (use --headed mode)
    • Verify the runner screenshot does not contain the reporter and only contains the AUT.
  • Run a test that fails with screenshotOnRunFailure and protocol enabled.
    • Verify the failure screenshot does not contain the reporter and only contains the AUT.

How has the user experience changed?

The Reporter UI is now hidden when protocol is enabled.
Screenshot 2023-08-07 at 3 02 44 PM

it('test 1', () => {
  cy.visit('https://example.cypress.io/commands/actions')
  cy.screenshot({ capture: 'runner', blackout: ['.action-email'] })
})

before:
screenshots -- test 1

after:
screenshots -- test 1

PR Tasks

@cypress
Copy link

cypress bot commented Aug 7, 2023

31 flaky tests on run #50026 ↗︎

0 27942 1412 0 Flakiness 31

Details:

Merge branch 'release/13.0.0' into mschile/protocol/hide_command_log
Project: cypress Commit: b276eabbb4
Status: Passed Duration: 19:03 💡
Started: Aug 16, 2023 3:28 PM Ended: Aug 16, 2023 3:47 PM
Flakiness  e2e/origin/cookie_login.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin - cookie login > general behavior > works in a session Output
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output
Flakiness  e2e/origin/commands/navigation.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin navigation > .go() Output
Flakiness  e2e/origin/commands/traversal.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin traversal > .children() Output
Flakiness  e2e/origin/commands/cookies.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin cookies > client side > .getCookie(), .getCookies(), and .setCookie() Output

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

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

@mschile Approving removal of protocolEnabled from public API. This config has no value to be exposed as part of our public APIs.

@mschile mschile merged commit ea23836 into release/13.0.0 Aug 16, 2023
78 of 80 checks passed
@mschile mschile deleted the mschile/protocol/hide_command_log branch August 16, 2023 18:07
@cypress cypress bot mentioned this pull request Aug 16, 2023
3 tasks
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 29, 2023

Released in 13.0.0.

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

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

None yet

6 participants