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

test: change some skipped tests to use retries #24124

Merged
merged 36 commits into from Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d88d246
test: change some skipped tests to use retries
flotwig Oct 4, 2022
762ad16
Update packages/server/lib/browsers/webkit.ts
flotwig Oct 12, 2022
1e56750
Update packages/network/test/integration/connect_spec.ts
flotwig Oct 12, 2022
c58483b
Merge branch 'develop' into retry-flake
flotwig Oct 12, 2022
93f8bdf
Merge branch 'develop' into retry-flake
flotwig Oct 14, 2022
0e99559
Merge branch 'develop' into retry-flake
flotwig Oct 17, 2022
1ec4b6d
Merge branch 'develop' into retry-flake
flotwig Oct 26, 2022
23b753e
Merge branch 'develop' into retry-flake
flotwig Oct 27, 2022
8065fd3
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Nov 18, 2022
a83f8cb
Merge branch 'retry-flake' of github.com:cypress-io/cypress into retr…
flotwig Nov 18, 2022
01dc60b
skip more failures
flotwig Nov 18, 2022
762105a
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Dec 5, 2022
096be4f
run ci
flotwig Dec 5, 2022
c2ca59c
Restore cypress_spec.js
flotwig Dec 5, 2022
7d9dfc1
Restore project-setup.cy.ts
flotwig Dec 5, 2022
74bd56b
add comment and partially fix test
flotwig Dec 5, 2022
28a9efe
run ci
flotwig Dec 5, 2022
5e86b55
Merge branch 'develop' into retry-flake
flotwig Dec 6, 2022
3f5f43c
skip broken proxy logging test in webkit
flotwig Dec 6, 2022
bd64fe6
update comments
flotwig Dec 6, 2022
9aac81b
remove outdated (as of cy 12) tests
flotwig Dec 6, 2022
0268fc1
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Dec 8, 2022
3d45d3b
run ci
flotwig Dec 8, 2022
9c27197
run ci
flotwig Dec 8, 2022
46f562b
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Dec 9, 2022
ea718c9
run ci
flotwig Dec 9, 2022
a58f3a2
skip go tests since they're still crashing test
flotwig Dec 9, 2022
55c6770
run ci
flotwig Dec 9, 2022
bc7dbe2
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Dec 9, 2022
7e59bf9
retry video compression in wk
flotwig Dec 9, 2022
5dfff86
Merge remote-tracking branch 'origin/develop' into retry-flake
flotwig Dec 12, 2022
285134b
run ci
flotwig Dec 12, 2022
b84b45f
Merge branch 'develop' into retry-flake
flotwig Dec 12, 2022
08dcded
Merge branch 'develop' into retry-flake
flotwig Dec 19, 2022
8555b4c
fix proxy-logging.cy.ts for develop
flotwig Dec 19, 2022
3a5b016
shows no icon and file system timestamp for files is broken
flotwig Dec 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions .circleci/config.yml
Expand Up @@ -27,8 +27,7 @@ mainBuildFilters: &mainBuildFilters
branches:
only:
- develop
- fix-ci-deps
- issue-23843_electron_21_upgrade
- retry-flake

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -37,8 +36,7 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'correct-dashboard-results', << pipeline.git.branch >> ]
- equal: [ 'issue-23843_electron_21_upgrade', << pipeline.git.branch >> ]
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -47,7 +45,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'issue-23843_electron_21_upgrade', << pipeline.git.branch >> ]
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -65,8 +63,7 @@ windowsWorkflowFilters: &windows-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ linux-arm64, << pipeline.git.branch >> ]
- equal: [ 'issue-23843_electron_21_upgrade', << pipeline.git.branch >> ]
- equal: [ retry-flake, << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -131,7 +128,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "issue-23843_electron_21_upgrade" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "retry-flake" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-dev-server/cypress/e2e/angular.cy.ts
Expand Up @@ -77,7 +77,7 @@ for (const project of WEBPACK_REACT) {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23455
it.skip('should detect new spec', () => {
it('should detect new spec', { retries: 15 }, () => {
cy.visitApp()

cy.withCtx(async (ctx) => {
Expand Down
4 changes: 2 additions & 2 deletions npm/webpack-dev-server/cypress/e2e/next.cy.ts
Expand Up @@ -76,7 +76,7 @@ for (const project of WEBPACK_REACT) {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23417
it.skip('should detect new spec', () => {
it('should detect new spec', { retries: 15 }, () => {
cy.visitApp()

cy.withCtx(async (ctx) => {
Expand All @@ -94,7 +94,7 @@ for (const project of WEBPACK_REACT) {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23417
it.skip('should allow import of global styles in support file', () => {
it('should allow import of global styles in support file', { retries: 15 }, () => {
cy.visitApp()
cy.contains('styles.cy.js').click()
cy.waitForSpecToFinish({ passCount: 1 })
Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-dev-server/cypress/e2e/nuxt.cy.ts
Expand Up @@ -71,7 +71,7 @@ for (const project of PROJECTS) {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23455
it.skip('should detect new spec', () => {
it('should detect new spec', { retries: 15 }, () => {
cy.visitApp()

cy.withCtx(async (ctx) => {
Expand Down
Expand Up @@ -79,7 +79,7 @@ describe('Cypress In Cypress CT', { viewportWidth: 1500, defaultCommandTimeout:
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23159
it.skip('redirects to the specs list with error if a spec is not found', () => {
it('redirects to the specs list with error if a spec is not found', { retries: 15 }, () => {
cy.visitApp()
const { title, intro, explainer } = defaultMessages.specPage.noSpecError
const badFilePath = 'src/DoesNotExist.spec.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/cypress-in-cypress-run-mode.cy.ts
Expand Up @@ -34,7 +34,7 @@ describe('Cypress In Cypress - run mode', { viewportWidth: 1200 }, () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23306
it.skip('component testing run mode spec runner header is correct', () => {
it('component testing run mode spec runner header is correct', { retries: 15 }, () => {
cy.scaffoldProject('cypress-in-cypress')
cy.findBrowsers()
cy.openProject('cypress-in-cypress')
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/cypress-in-cypress.cy.ts
Expand Up @@ -93,7 +93,7 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23307
it.skip(`scales the AUT correctly in ${testingType}`, () => {
it(`scales the AUT correctly in ${testingType}`, { retries: 15 }, () => {
const assertNoScaleShown = () => {
// check that no message about scale % is shown,
// meaning the AUT is at 100% scale
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/specs_list_e2e.cy.ts
Expand Up @@ -246,7 +246,7 @@ describe('App: Spec List (E2E)', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23305
it.skip('saves the filter when navigating to a spec and back', function () {
it('saves the filter when navigating to a spec and back', { retries: 15 }, function () {
const targetSpecFile = 'accounts_list.spec.js'

clearSearchAndType(targetSpecFile)
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/specs_list_latest_runs.cy.ts
Expand Up @@ -675,7 +675,7 @@ describe('App/Cloud Integration - Latest runs and Average duration', { viewportW
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23419
it.skip('shows offline alert then hides it after coming online', () => {
it('shows offline alert then hides it after coming online', { retries: 15 }, () => {
cy.findByTestId('offline-alert')
.should('contain.text', defaultMessages.specPage.offlineWarning.title)
.and('contain.text', defaultMessages.specPage.offlineWarning.explainer)
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/specs_list_no_git_repo.cy.ts
Expand Up @@ -7,7 +7,7 @@ describe('Spec List - Last updated with no git info', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23474
it.skip('shows no icon and file system timestamp for files', () => {
it('shows no icon and file system timestamp for files', { retries: 15 }, () => {
cy.get('[data-cy-row="blank-contents.spec.js"] [data-cy="git-info-row"] svg')
.should('not.exist')

Expand Down
6 changes: 4 additions & 2 deletions packages/data-context/test/unit/sources/GitDataSource.spec.ts
Expand Up @@ -43,8 +43,10 @@ describe('GitDataSource', () => {
sinon.restore()
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23317
it.skip(`gets correct status for files on ${os.platform()}`, async () => {
it(`gets correct status for files on ${os.platform()}`, async function () {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23317
this.retries(15)

const onBranchChange = sinon.stub()
const onGitInfoChange = sinon.stub()
const onError = sinon.stub()
Expand Down
Expand Up @@ -85,7 +85,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {

context('{{}', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('sets which and keyCode to 219', (done) => {
it('sets which and keyCode to 219', { retries: 15 }, (done) => {
cy.$$(':text:first').on('keydown', (e) => {
expect(e.which).to.eq(219)
expect(e.keyCode).to.eq(219)
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('sets which and keyCode to 8 and does not fire keypress events', (done) => {
it('sets which and keyCode to 8 and does not fire keypress events', { retries: 15 }, (done) => {
cy.$$(':text:first').on('keypress', () => {
done('should not have received keypress')
})
Expand All @@ -255,7 +255,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('does not fire textInput event', (done) => {
it('does not fire textInput event', { retries: 15 }, (done) => {
cy.$$(':text:first').on('textInput', (e) => {
done(new Error('textInput should not have fired'))
})
Expand All @@ -266,7 +266,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('can prevent default backspace movement', (done) => {
it('can prevent default backspace movement', { retries: 15 }, (done) => {
cy.$$(':text:first').on('keydown', (e) => {
if (e.keyCode === 8) {
e.preventDefault()
Expand Down Expand Up @@ -581,7 +581,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('can prevent default del movement', (done) => {
it('can prevent default del movement', { retries: 15 }, (done) => {
cy.$$(':text:first').on('keydown', (e) => {
if (e.keyCode === 46) {
e.preventDefault()
Expand Down Expand Up @@ -1240,7 +1240,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {

// https://github.com/cypress-io/cypress/issues/3405
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('does fire input event when text inserted', (done) => {
it('does fire input event when text inserted', { retries: 15 }, (done) => {
cy.$$('[contenteditable]:first').on('input', (e) => {
done()
})
Expand Down Expand Up @@ -1281,7 +1281,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {

context('1 input, no \'submit\' elements', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('triggers form submit', function (done) {
it('triggers form submit', { retries: 15 }, function (done) {
this.foo = {}

this.$forms.find('#single-input').submit((e) => {
Expand Down Expand Up @@ -1470,7 +1470,7 @@ describe('src/cy/commands/actions/type - #type special chars', () => {

context('2 inputs, 1 \'submit\' element input[type=submit]', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23160
it.skip('triggers form submit', function (done) {
it('triggers form submit', { retries: 15 }, function (done) {
this.$forms.find('#multiple-inputs-and-input-submit').submit((e) => {
e.preventDefault()

Expand Down
15 changes: 8 additions & 7 deletions packages/driver/cypress/e2e/commands/cookies.cy.js
Expand Up @@ -436,7 +436,7 @@ describe('src/cy/commands/cookies', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
context.skip('#setCookie', () => {
context('#setCookie', { retries: 15 }, () => {
beforeEach(() => {
cy.stub(Cypress.utils, 'addTwentyYears').returns(12345)
})
Expand Down Expand Up @@ -510,8 +510,9 @@ describe('src/cy/commands/cookies', () => {
})

describe('timeout', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
it.skip('sets timeout to Cypress.config(responseTimeout)', {
it('sets timeout to Cypress.config(responseTimeout)', {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
retries: 15,
responseTimeout: 2500,
}, () => {
Cypress.automation.resolves(null)
Expand All @@ -524,7 +525,7 @@ describe('src/cy/commands/cookies', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
it.skip('can override timeout', () => {
it('can override timeout', { retries: 15 }, () => {
Cypress.automation.resolves(null)

const timeout = cy.spy(Promise.prototype, 'timeout')
Expand All @@ -535,7 +536,7 @@ describe('src/cy/commands/cookies', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
it.skip('clears the current timeout and restores after success', () => {
it('clears the current timeout and restores after success', { retries: 15 }, () => {
Cypress.automation.resolves(null)

cy.timeout(100)
Expand Down Expand Up @@ -568,7 +569,7 @@ describe('src/cy/commands/cookies', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
it.skip('logs once on error', function (done) {
it('logs once on error', { retries: 15 }, function (done) {
const error = new Error('some err message')

error.name = 'foo'
Expand All @@ -589,7 +590,7 @@ describe('src/cy/commands/cookies', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23444
it.skip('throws after timing out', function (done) {
it('throws after timing out', { retries: 15 }, function (done) {
Cypress.automation.resolves(Promise.delay(1000))

cy.on('fail', (err) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/driver/cypress/e2e/commands/navigation.cy.js
Expand Up @@ -272,7 +272,7 @@ describe('src/cy/commands/navigation', () => {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23308
context.skip('#go', () => {
context('#go', { retries: 15 }, () => {
// TODO: fix this
it('sets timeout to Cypress.config(pageLoadTimeout)', {
pageLoadTimeout: 4567,
Expand Down Expand Up @@ -846,7 +846,7 @@ describe('src/cy/commands/navigation', () => {

// https://github.com/cypress-io/cypress/issues/1311
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23201
it.skip('window immediately resolves and doesn\'t reload when visiting the same URL with hashes', () => {
it('window immediately resolves and doesn\'t reload when visiting the same URL with hashes', { retries: 15 }, () => {
const onLoad = cy.stub()

cy
Expand Down