Skip to content

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

Merged
merged 349 commits into from
Jul 18, 2025

Conversation

mabela416
Copy link
Contributor

@mabela416 mabela416 commented Jul 9, 2025

Additional details

  • Update view in single test mode in studio
  • Clean up the purple line and the save commands/cancel buttons in the reporter when in studio mode

Steps to test

  • Make sure you're experimentalStudio: true in your cypress.config.js
  • On the test list, click on the wand icon to open single test mode and the header and content should be like the figma
    • Display specname and describes in top header with > between them.
    • Have tooltip that shows describes that don't fit in header.
    • Display 'back button' - when you click this, it should go back to the spec run
    • Do not show fail/pass status counter
    • Show name of test in secondary header
    • Move play/rerun/etc buttons into secondary header
    • Show icon for pass/fail etc in the test name
      image

How has the user experience changed?

PR Tasks

ryanthemanuel and others added 30 commits June 26, 2025 13:37
…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
Copy link

@cursor cursor bot left a 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

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')
}
})

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Comment on lines 301 to 304
state?: {
studioSingleTestActive?: boolean
[key: string]: any
}
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

@mschile mschile left a 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.

@mabela416 mabela416 requested a review from mschile July 17, 2025 18:07
Copy link

@cursor cursor bot left a 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

- 'update-v8-snapshot-cache-on-develop'
- 'mabel/issue-10425-studio-redesign'

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Copy link

@cursor cursor bot left a 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

function getAutIframe () {
return cy.get('iframe.aut-iframe').its('0.contentDocument.documentElement').should('not.be.empty').then(cy.wrap) as Cypress.Chainable<JQuery<HTMLIFrameElement>>

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@jennifer-shehane jennifer-shehane merged commit 22bc78e into release/15.0.0 Jul 18, 2025
97 of 100 checks passed
@jennifer-shehane jennifer-shehane deleted the mabel/issue-10425-studio-redesign branch July 18, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants