Skip to content

Commit

Permalink
test: Add commands to wait for config page to load before continue wi…
Browse files Browse the repository at this point in the history
…th test - address flaky test (#28953)
  • Loading branch information
jennifer-shehane authored Feb 22, 2024
1 parent e7d13cf commit 3cfca89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/launchpad/cypress/e2e/global-mode.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ describe('Launchpad: Global Mode', () => {
})
}

const waitForConfigLoad = () => {
cy.contains('Initializing config...').should('be.visible')
// ensure the config is fully loaded before clicking the breadcrumb back
cy.contains('Initializing config...').should('not.exist')
}

const projectList = ['todos']

setupAndValidateProjectsList(projectList)
Expand All @@ -200,6 +206,7 @@ describe('Launchpad: Global Mode', () => {
// Component testing breadcrumbs
cy.get('[data-cy="project-card"]').contains('todos').click()
cy.get('[data-cy-testingtype="component"]').click()
waitForConfigLoad()
resetSpies()
getBreadcrumbLink('Projects').click()
getBreadcrumbLink('Projects', { disabled: true })
Expand All @@ -212,6 +219,7 @@ describe('Launchpad: Global Mode', () => {
cy.get('[data-cy="project-card"]').contains('todos').click()
cy.get('[data-cy-testingtype="e2e"]').click()
cy.contains('li', 'e2e testing', { matchCase: false }).should('not.have.attr', 'href')
waitForConfigLoad()
resetSpies()
getBreadcrumbLink('Projects').click()
getBreadcrumbLink('Projects', { disabled: true })
Expand Down

4 comments on commit 3cfca89

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3cfca89 Feb 22, 2024

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:

npm install https://cdn.cypress.io/beta/npm/13.6.6/linux-x64/develop-3cfca89ded6074d854f8414cf12eaaba56ce0f16/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3cfca89 Feb 22, 2024

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:

npm install https://cdn.cypress.io/beta/npm/13.6.6/linux-arm64/develop-3cfca89ded6074d854f8414cf12eaaba56ce0f16/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3cfca89 Feb 22, 2024

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:

npm install https://cdn.cypress.io/beta/npm/13.6.6/darwin-x64/develop-3cfca89ded6074d854f8414cf12eaaba56ce0f16/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3cfca89 Feb 22, 2024

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:

npm install https://cdn.cypress.io/beta/npm/13.6.6/win32-x64/develop-3cfca89ded6074d854f8414cf12eaaba56ce0f16/cypress.tgz

Please sign in to comment.