Skip to content
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

chore: unskip some tests that were previously flaky #29037

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: unskip some tests that were previously flaky
  • Loading branch information
jennifer-shehane committed Feb 29, 2024
commit 64cefbb5f36d559c6e808b483b595e53fdba57a5
28 changes: 19 additions & 9 deletions packages/launchpad/cypress/e2e/choose-a-browser.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { FoundBrowser } from '@packages/types'

// TODO: fix flaky tests https://github.com/cypress-io/cypress/issues/23418
describe.skip('Choose a browser page', () => {
describe('Choose a browser page', () => {
beforeEach(() => {
cy.scaffoldProject('launchpad')
})
Expand All @@ -15,8 +14,7 @@ describe.skip('Choose a browser page', () => {
})
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23158
it('preselects browser that is provided through the command line', { retries: 15 }, () => {
it('preselects browser that is provided through the command line', () => {
cy.withCtx((ctx, o) => {
// stub launching project since we have `--browser --testingType --project` here
o.sinon.stub(ctx._apis.projectApi, 'launchProject').resolves()
Expand All @@ -25,6 +23,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e', '--browser', 'edge'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -40,6 +39,7 @@ describe.skip('Choose a browser page', () => {
it('shows warning when launched with --browser name that cannot be matched to found browsers', () => {
cy.openProject('launchpad', ['--e2e', '--browser', 'doesNotExist'])
cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')
cy.get('[data-cy="alert-header"]').should('contain', 'Warning: Browser Not Found')
Expand All @@ -63,13 +63,15 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e', '--browser', path])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

cy.get('[data-cy="alert-header"]').should('contain', 'Warning: Browser Not Found')
cy.get('[data-cy="alert-body"]').as('AlertBody')
.should('contain', `We could not identify a known browser at the path you provided: ${path}`)
.validateExternalLink({

cy.validateExternalLink({
href: 'https://on.cypress.io/troubleshooting-launching-browsers',
})

Expand All @@ -96,6 +98,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -112,6 +115,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand Down Expand Up @@ -164,6 +168,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -188,6 +193,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -205,6 +211,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.withCtx((ctx) => {
ctx.actions.app.setBrowserStatus('open')
Expand All @@ -217,11 +224,11 @@ describe.skip('Choose a browser page', () => {
cy.wait('@closeBrowser')
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23220
it('performs mutation to focus open browser when focus button is pressed', { retries: 15 }, () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.withCtx((ctx) => {
ctx.actions.app.setBrowserStatus('open')
Expand Down Expand Up @@ -262,6 +269,7 @@ describe.skip('Choose a browser page', () => {
})

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -270,11 +278,11 @@ describe.skip('Choose a browser page', () => {
})
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23158
it('subscribes to changes to browserStatus/activeBrowser through the browserStatusUpdated subscription', { retries: 15 }, () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand Down Expand Up @@ -306,6 +314,7 @@ describe.skip('Choose a browser page', () => {
it('should return to welcome screen if user modifies the config file to not include the current testing type and recover', () => {
cy.openProject('launchpad', ['--e2e'])
cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand All @@ -314,7 +323,7 @@ describe.skip('Choose a browser page', () => {
})

cy.get('h1').should('contain', 'Welcome to Cypress!')
cy.contains('[data-cy-testingtype="e2e"]', 'Not configured')
cy.contains('[data-cy-testingtype="e2e"]', 'Not Configured')

cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject('cypress.config.js',
Expand All @@ -327,7 +336,7 @@ describe.skip('Choose a browser page', () => {
})

cy.get('h1').should('contain', 'Welcome to Cypress!')
cy.get('[data-cy-testingtype="e2e"]').should('not.contain', 'Not configured')
cy.get('[data-cy-testingtype="e2e"]').should('not.contain', 'Not Configured')
})
})

Expand All @@ -343,6 +352,7 @@ describe.skip('Choose a browser page', () => {
cy.openProject('launchpad', ['--e2e'])

cy.visitLaunchpad()
cy.skipWelcome()

cy.get('h1').should('contain', 'Choose a browser')

Expand Down
22 changes: 0 additions & 22 deletions packages/launchpad/cypress/e2e/global-mode.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,6 @@ describe('Launchpad: Global Mode', () => {
.should('have.length', projectList.length)
})

// FIXME: fix Search by project path logic - https://cypress-io.atlassian.net/browse/UNIFY-646
it.skip('filters project results when searching by project path', () => {
setupAndValidateProjectsList(projectList)
cy.get('#project-search').type('packages')
cy.get('[data-cy="project-card"')
.should('have.length', projectList.length)

cy.get('#project-search').type(`${path.sep}todos`)
cy.contains(defaultMessages.globalPage.noResultsMessage)
})

it('shows "empty results" pages when searching for a non-existent name', () => {
setupAndValidateProjectsList(projectList)
cy.get('#project-search').type('hi')
Expand All @@ -317,17 +306,6 @@ describe('Launchpad: Global Mode', () => {
cy.get('[data-cy="project-card"]')
.should('have.length', projectList.length)
})

// FIXME: fix Search by project path logic - https://cypress-io.atlassian.net/browse/UNIFY-646
it.skip('shows "empty results" pages when searching for a non-existent path', () => {
setupAndValidateProjectsList(projectList)
cy.get('#project-search').type('packages')
cy.get('[data-cy="project-card"')
.should('have.length', projectList.length)

cy.get('#project-search').type(`${path.sep}random`)
cy.contains(defaultMessages.globalPage.noResultsMessage)
})
})
})

Expand Down
17 changes: 0 additions & 17 deletions packages/launchpad/cypress/e2e/migration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,23 +1024,6 @@ describe('Full migration flow for each project', { retries: { openMode: 0, runMo
checkOutcome()
})

// TODO: Do we need to consider this case?
it.skip('completes journey for migration-e2e-defaults-no-specs', () => {
startMigrationFor('migration-e2e-defaults-no-specs')
// no specs, nothing to rename?
cy.get(renameAutoStep).should('not.exist')
// no CT
cy.get(renameManualStep).should('not.exist')
// supportFile is false - cannot migrate
cy.get(renameSupportStep).should('exist')
cy.get(setupComponentStep).should('not.exist')
cy.get(configFileStep).should('exist')

renameSupport()
migrateAndVerifyConfig()
checkOutcome()
})

it('completes journey for migration-e2e-plugins-implicit-index-js', () => {
startMigrationFor('migration-e2e-plugins-implicit-index-js')
// no specs, nothing to rename?
Expand Down
3 changes: 1 addition & 2 deletions packages/launchpad/cypress/e2e/project-setup.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ describe('Launchpad: Setup Project', () => {
verifyScaffoldedFiles('e2e')
})

// TODO: fix failing test https://github.com/cypress-io/cypress/issues/23418
it.skip('takes the user to first step of ct setup when switching from app', () => {
it('takes the user to first step of ct setup when switching from app', () => {
scaffoldAndOpenProject('pristine-with-e2e-testing')
cy.visitLaunchpad()
verifyWelcomePage({ e2eIsConfigured: true, ctIsConfigured: false })
Expand Down
3 changes: 1 addition & 2 deletions packages/launchpad/cypress/e2e/scaffold-project.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ describe('scaffolding new projects', { defaultCommandTimeout: 7000 }, () => {
assertScaffoldedFilesAreCorrect({ language, testingType: 'component', ctFramework: 'Create React App (v5)', customDirectory: 'without-fixtures' })
})

// NOTE: Skipping this test because it is flaky
it.skip('generates valid config file for pristine project without cypress installed', () => {
it('generates valid config file for pristine project without cypress installed', () => {
cy.intercept('mutation-ScaffoldedFiles_completeSetup').as('mutationScaffoldedFiles')
cy.intercept('query-MainLaunchpadQuery').as('mainLaunchpadQuery')
cy.intercept('query-HeaderBar_HeaderBarQuery').as('headerBarQuery')
Expand Down
Loading