Skip to content

Commit

Permalink
test: fix percy flake for 'loading tests' display (#14254)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
  • Loading branch information
jennifer-shehane and chrisbreiding authored Dec 21, 2020
1 parent 2616721 commit 68a4016
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions packages/reporter/cypress/integration/commands_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ describe('commands', () => {
it('displays all the commands', () => {
cy.get('.command').should('have.length', 9)

// ensure progress bar is no longer visible
// for snapshot
cy.contains('#in-progress')
.closest('.command')
.find('.command-progress span')
.should('not.be.visible')

cy.percySnapshot()
})

Expand Down
2 changes: 2 additions & 0 deletions packages/reporter/cypress/integration/runnables_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ describe('runnables', () => {
it('displays loader when runnables have not yet loaded', () => {
render()
cy.contains('Your tests are loading...').should('be.visible')
// ensure the page is loaded before taking snapshot
cy.get('.focus-tests-text').should('be.visible')
cy.percySnapshot()
})

Expand Down
6 changes: 5 additions & 1 deletion packages/reporter/cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// @ts-ignore
import installCustomPercyCommand from '@packages/ui-components/cypress/support/customPercyCommand'

installCustomPercyCommand()
installCustomPercyCommand({
elementOverrides: {
'.command-progress': true,
},
})
2 changes: 1 addition & 1 deletion packages/runner/cypress/integration/retries.ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ describe('runner/cypress retries.ui.spec', { viewportWidth: 600, viewportHeight:
} }, { config: { retries: 1 } })
.then(shouldHaveTestResults(0, 1, 0))

// ensure the page is loaded before taking snapshot
cy.contains('skips this')

cy.percySnapshot()
})
})
Expand Down

4 comments on commit 68a4016

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68a4016 Dec 21, 2020

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:

npm install https://cdn.cypress.io/beta/npm/6.2.0/circle-develop-68a4016d6b096f1b1e1bd79f038be4be7eeff4c3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68a4016 Dec 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 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:

npm install https://cdn.cypress.io/beta/npm/6.2.0/appveyor-develop-68a4016d6b096f1b1e1bd79f038be4be7eeff4c3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68a4016 Dec 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor 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:

npm install https://cdn.cypress.io/beta/npm/6.2.0/appveyor-develop-68a4016d6b096f1b1e1bd79f038be4be7eeff4c3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 68a4016 Dec 21, 2020

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:

npm install https://cdn.cypress.io/beta/npm/6.2.0/circle-develop-68a4016d6b096f1b1e1bd79f038be4be7eeff4c3/cypress.tgz

Please sign in to comment.