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 all 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
10 changes: 5 additions & 5 deletions .circleci/workflows.yml
Expand Up @@ -28,7 +28,7 @@ mainBuildFilters: &mainBuildFilters
only:
- develop
- /^release\/\d+\.\d+\.\d+$/
- 'feature/create-from-react-component'
- '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,15 +37,15 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'feature/create-from-react-component', << pipeline.git.branch >> ]
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'feature/create-from-react-component', << pipeline.git.branch >> ]
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -63,7 +63,7 @@ windowsWorkflowFilters: &windows-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'feature/create-from-react-component', << pipeline.git.branch >> ]
- equal: [ 'retry-flake', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -129,7 +129,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feature/create-from-react-component" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$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 @@ -82,7 +82,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_latest_runs.cy.ts
Expand Up @@ -671,7 +671,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
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 @@ -1481,7 +1481,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
7 changes: 3 additions & 4 deletions packages/driver/cypress/e2e/commands/navigation.cy.js
Expand Up @@ -273,7 +273,6 @@ describe('src/cy/commands/navigation', () => {

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23308
context.skip('#go', () => {
// TODO: fix this
it('sets timeout to Cypress.config(pageLoadTimeout)', {
pageLoadTimeout: 4567,
}, () => {
Expand Down Expand Up @@ -816,7 +815,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 Expand Up @@ -1803,7 +1802,7 @@ describe('src/cy/commands/navigation', () => {
})
})

// TODO(webkit): fix+unskip for experimental webkit release
// TODO(webkit): fix+unskip for webkit release
context('#page load', { browser: '!webkit' }, () => {
it('sets initial=true and then removes', () => {
Cookie.remove('__cypress.initial')
Expand Down Expand Up @@ -2200,7 +2199,7 @@ describe('src/cy/commands/navigation', () => {
})
})

// TODO(webkit): fix+unskip for experimental webkit release
// TODO(webkit): fix+unskip for webkit release
context('#url:changed', { browser: '!webkit' }, () => {
beforeEach(function () {
this.logs = []
Expand Down
26 changes: 13 additions & 13 deletions packages/driver/cypress/e2e/commands/net_stubbing.cy.ts
Expand Up @@ -1639,7 +1639,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23422
it.skip('can add a body to a request that does not have one', function () {
it('can add a body to a request that does not have one', { retries: 15 }, function () {
const body = '{"foo":"bar"}'

cy.intercept('/post-only', function (req) {
Expand Down Expand Up @@ -1670,7 +1670,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23303
it.skip('can delay and throttle a StaticResponse', function (done) {
it('can delay and throttle a StaticResponse', { retries: 15 }, function (done) {
const payload = 'A'.repeat(10 * 1024)
const throttleKbps = 10
const delay = 250
Expand All @@ -1696,7 +1696,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23404
it.skip('can delay with deprecated delayMs param', function () {
it('can delay with deprecated delayMs param', { retries: 15 }, function () {
const delayMs = 250

cy.intercept('/timeout*', (req) => {
Expand All @@ -1714,7 +1714,7 @@ describe('network stubbing', { retries: 15 }, function () {

// @see https://github.com/cypress-io/cypress/issues/14446
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23406
it.skip('should delay the same amount on every response', () => {
it('should delay the same amount on every response', { retries: 15 }, () => {
const delay = 250

const testDelay = () => {
Expand Down Expand Up @@ -1829,7 +1829,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23407
it.skip('by doing both', () => {
it('by doing both', { retries: 15 }, () => {
cy.intercept({ url: '/users*' }, (req) => {
req.query = {
a: 'b',
Expand All @@ -1852,7 +1852,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23414
it.skip('by deleting query member', () => {
it('by deleting query member', { retries: 15 }, () => {
cy.intercept({ url: '/users*' }, (req) => {
req.query = {
a: 'b',
Expand All @@ -1876,7 +1876,7 @@ describe('network stubbing', { retries: 15 }, function () {

context('by setting new url', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23415
it.skip('absolute path', () => {
it('absolute path', { retries: 15 }, () => {
cy.intercept({ url: '/users*' }, (req) => {
req.url = 'http://localhost:3500/users?a=b'

Expand All @@ -1894,7 +1894,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23433
it.skip('relative path', () => {
it('relative path', { retries: 15 }, () => {
cy.intercept({ url: '/users*' }, (req) => {
req.url = '/users?a=b'

Expand All @@ -1913,7 +1913,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23434
it.skip('empty string', () => {
it('empty string', { retries: 15 }, () => {
cy.intercept({ url: '/users*' }, (req) => {
req.url = ''

Expand All @@ -1933,7 +1933,7 @@ describe('network stubbing', { retries: 15 }, function () {

context('throwing errors correctly', () => {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23423
it.skip('defineproperty', (done) => {
it('defineproperty', { retries: 15 }, (done) => {
cy.on('fail', (err) => {
expect(err.message).to.eq('`defineProperty()` is not allowed.')

Expand Down Expand Up @@ -1962,7 +1962,7 @@ describe('network stubbing', { retries: 15 }, function () {
})

// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23147
it.skip('setPrototypeOf', (done) => {
it('setPrototypeOf', { retries: 15 }, (done) => {
cy.on('fail', (err) => {
expect(err.message).to.eq('`setPrototypeOf()` is not allowed.')

Expand Down Expand Up @@ -1992,7 +1992,7 @@ describe('network stubbing', { retries: 15 }, function () {
context('can end response', () => {
for (const eventName of ['before:response', 'response']) {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23434
it.skip(`in \`${eventName}\``, () => {
it(`in \`${eventName}\``, { retries: 15 }, () => {
const url = uniqueRoute('/foo')
const expectBeforeResponse = eventName === 'response'
let beforeResponseCalled = false
Expand Down Expand Up @@ -2203,7 +2203,7 @@ describe('network stubbing', { retries: 15 }, function () {

context('with `times`', function () {
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23434
it.skip('only uses each handler N times', function () {
it('only uses each handler N times', { retries: 15 }, function () {
const url = uniqueRoute('/foo')
const third = sinon.stub()

Expand Down