-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: (studio) add support for url routing (#31205)
* update url with studio params * updates * spec updates * adding tests * updating changelog * skip adding visit log during start * update url support * cy origin tests * fix tests * updates * update origin test * add a wait * update * pr updates --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
- Loading branch information
1 parent
5ff7e37
commit b9103af
Showing
19 changed files
with
1,132 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
export function launchStudio () { | ||
export function launchStudio ({ specName = 'spec.cy.js', createNewTest = false, cliArgs = [''] } = {}) { | ||
cy.scaffoldProject('experimental-studio') | ||
cy.openProject('experimental-studio') | ||
cy.openProject('experimental-studio', cliArgs) | ||
cy.startAppServer('e2e') | ||
cy.visitApp() | ||
cy.specsPageIsVisible() | ||
cy.get(`[data-cy-row="spec.cy.js"]`).click() | ||
cy.get(`[data-cy-row="${specName}"]`).click() | ||
|
||
cy.waitForSpecToFinish() | ||
|
||
// Should not show "Studio Commands" until we've started a new Studio session. | ||
cy.get('[data-cy="hook-name-studio commands"]').should('not.exist') | ||
|
||
cy | ||
.contains('visits a basic html page') | ||
.closest('.runnable-wrapper') | ||
if (createNewTest) { | ||
cy.contains('studio functionality').as('item') | ||
} else { | ||
cy.contains('visits a basic html page').as('item') | ||
} | ||
|
||
cy.get('@item') | ||
.closest('.runnable-wrapper').as('runnable-wrapper') | ||
.realHover() | ||
|
||
cy.get('@runnable-wrapper') | ||
.findByTestId('launch-studio') | ||
.click() | ||
|
||
// Studio re-executes spec before waiting for commands - wait for the spec to finish executing. | ||
cy.waitForSpecToFinish() | ||
|
||
cy.get('[data-cy="hook-name-studio commands"]').should('exist') | ||
if (createNewTest) { | ||
cy.get('span.runnable-title').contains('New Test').should('exist') | ||
} else { | ||
cy.get('[data-cy="hook-name-studio commands"]').should('exist') | ||
} | ||
} |
Oops, something went wrong.
b9103af
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.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
b9103af
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.
Circle has built the
linux arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
b9103af
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.
Circle has built the
darwin arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
b9103af
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.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
b9103af
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.
Circle has built the
win32 x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally: