-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Hovering over mount in command log does not show component in AUT (
#24346) Co-authored-by: Mark Noonan <[email protected]> Co-authored-by: Lachlan Miller <[email protected]> Co-authored-by: Zachary Williams <[email protected]>
- Loading branch information
1 parent
239d2e3
commit 355d210
Showing
5 changed files
with
89 additions
and
43 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
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
52 changes: 52 additions & 0 deletions
52
packages/app/cypress/e2e/runner/reporter-ct-mount-hover.cy.ts
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type { fixtureDirs } from '@tooling/system-tests' | ||
|
||
type ProjectDirs = typeof fixtureDirs | ||
|
||
const PROJECTS: {projectName: ProjectDirs[number], test: string}[] = [ | ||
{ projectName: 'angular-14', test: 'app.component' }, | ||
{ projectName: 'vueclivue2-configured', test: 'HelloWorld.cy' }, | ||
{ projectName: 'react-vite-ts-configured', test: 'App.cy' }, | ||
{ projectName: 'react18', test: 'App.cy' }, | ||
{ projectName: 'create-react-app-configured', test: 'App.cy' }, | ||
{ projectName: 'vueclivue3-configured', test: 'HelloWorld.cy' }, | ||
{ projectName: 'nuxtjs-vue2-configured', test: 'Tutorial.cy' }, | ||
] | ||
|
||
// TODO: Add these tests to another cy-in-cy framework test to reduce CI cost as these scaffolding is expensive | ||
for (const { projectName, test } of PROJECTS) { | ||
describe(`CT Mount ${projectName}`, { viewportWidth: 1500, defaultCommandTimeout: 30000 }, () => { | ||
beforeEach(() => { | ||
cy.scaffoldProject(projectName) | ||
cy.findBrowsers() | ||
}), | ||
it(`While hovering on Mount(), shows component on AUT for ${projectName}`, () => { | ||
if (`${projectName}` === 'react18') { | ||
cy.openProject(projectName, ['--config-file', 'cypress-vite.config.ts']) | ||
cy.startAppServer('component') | ||
cy.visitApp() | ||
cy.contains(`${test}`).click() | ||
cy.waitForSpecToFinish() | ||
cy.get('.collapsible-header-inner:first').click().get('.command.command-name-mount > .command-wrapper').click().then(() => { | ||
cy.get('iframe.aut-iframe').its('0.contentDocument.body').then(cy.wrap).within(() => { | ||
cy.get('[data-cy-root]').children().should('have.length.at.least', 1) | ||
}) | ||
}) | ||
} else { | ||
cy.openProject(projectName) | ||
cy.startAppServer('component') | ||
cy.visitApp() | ||
cy.contains(`${test}`).click() | ||
cy.waitForSpecToFinish() | ||
cy.get('.command.command-name-mount > .command-wrapper').click().then(() => { | ||
if (`${projectName}` === 'angular-14') { | ||
cy.get('iframe.aut-iframe').its('0.contentDocument.body').children().should('have.length.at.least', 2) | ||
} else { | ||
cy.get('iframe.aut-iframe').its('0.contentDocument.body').then(cy.wrap).within(() => { | ||
cy.get('[data-cy-root]').children().should('have.length.at.least', 1) | ||
}) | ||
} | ||
}) | ||
} | ||
}) | ||
}) | ||
} |
355d210
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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
355d210
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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
355d210
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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
355d210
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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
355d210
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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: