-
Notifications
You must be signed in to change notification settings - Fork 3.3k
internal: Redesign single test view when studio is open #32008
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
internal: Redesign single test view when studio is open #32008
Conversation
…abel/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…el/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…abel/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…el/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…abel/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…el/issue-31677-reporter-redesign' of https://github.com/cypress-io/cypress into mabel/issue-31677-reporter-redesign
…eporter-redesign' into mabel/issue-31677-reporter-redesign
…eporter-redesign' into mabel/issue-31677-reporter-redesign
…eporter-redesign' into mabel/issue-31677-reporter-redesign
This reverts commit 3b59a94.
…ng css styles at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Studio Mode Detection Fails in Regular Tests
The waitForSpecToFinish
utility attempts to detect Studio mode by checking win.state?.studioSingleTestActive
. However, the window.state
object, which contains studioSingleTestActive
, is only populated in Cypress-in-Cypress test environments. In regular test execution, window.state
is undefined, causing the Studio mode detection to always evaluate as falsy. This renders the Studio mode check ineffective, leading to incorrect behavior when Studio mode is active outside of Cypress-in-Cypress.
packages/app/cypress/e2e/support/execute-spec.ts#L27-L36
cypress/packages/app/cypress/e2e/support/execute-spec.ts
Lines 27 to 36 in 27ecd7c
export const waitForSpecToFinish = (expectedResults, timeout?: number) => { | |
// Check if we're in studio mode using URL hash parameters (same method as studio store) | |
cy.window().then((win) => { | |
const studioSingleTestActive = win.state?.studioSingleTestActive | |
if (!studioSingleTestActive) { | |
cy.get('.passed > .num').should('exist') | |
cy.get('.failed > .num').should('exist') | |
} | |
}) |
Was this report helpful? Give feedback by reacting with 👍 or 👎
cli/types/cypress.d.ts
Outdated
state?: { | ||
studioSingleTestActive?: boolean | ||
[key: string]: any | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these types are exposed to the user so I don't think we want to add these types.
cy.get('.failed > .num').should('exist') | ||
// Check if we're in studio mode using URL hash parameters (same method as studio store) | ||
cy.window().then((win) => { | ||
const studioSingleTestActive = win.state?.studioSingleTestActive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is becoming too much of an issue, just pass in isStudioMode
similar to what you were doing before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments.
…-10425-studio-redesign
…tudio-redesign' into mabel/issue-10425-studio-redesign
…tudio-redesign' into mabel/issue-10425-studio-redesign
…tudio-redesign' into mabel/issue-10425-studio-redesign
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Branch Hardcoding Causes CI Failures
The CircleCI configuration in .circleci/workflows.yml
hardcodes the temporary development branch mabel/issue-10425-studio-redesign
into mainBuildFilters
and the setup_should_persist_artifacts
command. This grants unintended CI behavior to a temporary branch and will lead to workflow failures once the branch is merged or deleted.
.circleci/workflows.yml#L40-L41
cypress/.circleci/workflows.yml
Lines 40 to 41 in 687d088
- 'update-v8-snapshot-cache-on-develop' | |
- 'mabel/issue-10425-studio-redesign' |
Was this report helpful? Give feedback by reacting with 👍 or 👎
…-10425-studio-redesign
…tudio-redesign' into mabel/issue-10425-studio-redesign
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Cypress Assertion Timing Causes Flakiness
Adding .should('not.be.empty')
to the getAutIframe
function causes test flakiness. This strict assertion can fail if the iframe content is still loading, whereas previously Cypress would implicitly wait for the content to be ready. This introduces timing-related, intermittent test failures.
packages/frontend-shared/cypress/support/e2e.ts#L625-L626
cypress/packages/frontend-shared/cypress/support/e2e.ts
Lines 625 to 626 in 1e3e32d
function getAutIframe () { | |
return cy.get('iframe.aut-iframe').its('0.contentDocument.documentElement').should('not.be.empty').then(cy.wrap) as Cypress.Chainable<JQuery<HTMLIFrameElement>> |
Was this report helpful? Give feedback by reacting with 👍 or 👎
https://github.com/cypress-io/cypress-services/issues/10425https://github.com/cypress-io/cypress-services/issues/10425https://github.com/cypress-io/cypress-services/issues/10425
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?