Skip to content

Commit 2e57ebf

Browse files
committed
feat: upgrade Cypress to v10.11.0
1 parent 30b578a commit 2e57ebf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+51
-24
lines changed

cypress.config.ts

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {defineConfig} from 'cypress'
2+
3+
export default defineConfig({
4+
retries: {
5+
runMode: 2,
6+
openMode: 0,
7+
},
8+
numTestsKeptInMemory: 25,
9+
defaultCommandTimeout: 10000,
10+
videoUploadOnPasses: false,
11+
chromeWebSecurity: false,
12+
blockHosts: [
13+
'www.google-analytics.com',
14+
'www.googletagmanager.com',
15+
'www.honeybadger.io',
16+
],
17+
viewportWidth: 1400,
18+
viewportHeight: 1000,
19+
e2e: {
20+
// We've imported your old cypress plugins here.
21+
// You may want to clean this up later by importing these.
22+
setupNodeEvents(on, config) {
23+
return require('./cypress/plugins/index.js')(on, config)
24+
},
25+
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
26+
},
27+
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cypress/e2e/shared/annotations.band.test.ts renamed to cypress/e2e/shared/annotations.band.cy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
testEditRangeAnnotation,
99
testDeleteAnnotation,
1010
RANGE_ANNOTATION_TEXT,
11-
} from '../util/annotationsSetup'
11+
} from '../../util/annotationsSetup'
1212

1313
describe('The Annotations UI functionality on a band plot graph type', () => {
1414
const bandSuffix = 'band'

cypress/e2e/shared/annotations.range.test.ts renamed to cypress/e2e/shared/annotations.range.cy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
checkAnnotationText,
88
setupData,
99
startEditingAnnotation,
10-
} from '../util/annotationsSetup'
10+
} from '../../util/annotationsSetup'
1111
import * as moment from 'moment'
1212

1313
import {DEFAULT_TIME_FORMAT} from '../../../src/utils/datetime/constants'
@@ -263,7 +263,7 @@ describe('Annotations, but in a different test suite', () => {
263263
.should($el => {
264264
expect($el).to.have.length(1)
265265
expect(Cypress.dom.isDetached($el)).to.be.false
266-
// eslint-disable-next-line jest/unbound-method
266+
// eslint-disable-next-line @typescript-eslint/unbound-method
267267
expect($el).not.to.be.disabled
268268
})
269269
.click()

cypress/e2e/shared/annotations.singlestat.test.ts renamed to cypress/e2e/shared/annotations.singlestat.cy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
testEditRangeAnnotation,
99
testDeleteAnnotation,
1010
RANGE_ANNOTATION_TEXT,
11-
} from '../util/annotationsSetup'
11+
} from '../../util/annotationsSetup'
1212

1313
describe('The Annotations UI functionality on a graph + single stat graph type', () => {
1414
const singleStatSuffix = 'line-plus-single-stat'

cypress/e2e/shared/annotations.xy.test.ts renamed to cypress/e2e/shared/annotations.xy.cy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
testEditRangeAnnotation,
99
testDeleteAnnotation,
1010
RANGE_ANNOTATION_TEXT,
11-
} from '../util/annotationsSetup'
11+
} from '../../util/annotationsSetup'
1212

1313
describe('The Annotations UI functionality, on a graph (xy line) graph type', () => {
1414
beforeEach(() => setupData(cy))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cypress/support/index.js renamed to cypress/support/e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ***********************************************************
2-
// This example support/index.js is processed and
2+
// This example support/e2e.js is processed and
33
// loaded automatically before your test files.
44
//
55
// This is a great place to put global configuration and

cypress/e2e/util/annotationsSetup.ts renamed to cypress/util/annotationsSetup.cy.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Organization} from '../../../src/types'
2-
import {points} from '../../support/commands'
1+
import {Organization} from '../../src/types'
2+
import {points} from '../support/commands'
33

44
export const ANNOTATION_TEXT = 'im a hippopotamus'
55
export const EDIT_ANNOTATION_TEXT = 'lets edit this annotation'
@@ -90,7 +90,7 @@ export const addAnnotation = (cy: Cypress.Chainable) => {
9090
.should($el => {
9191
expect($el).to.have.length(1)
9292
expect(Cypress.dom.isDetached($el)).to.be.false
93-
// eslint-disable-next-line jest/unbound-method
93+
// eslint-disable-next-line @typescript-eslint/unbound-method
9494
expect($el).not.to.be.disabled
9595
})
9696
.click()
@@ -174,7 +174,7 @@ export const addRangeAnnotation = (
174174
.should($el => {
175175
expect($el).to.have.length(1)
176176
expect(Cypress.dom.isDetached($el)).to.be.false
177-
// eslint-disable-next-line jest/unbound-method
177+
// eslint-disable-next-line @typescript-eslint/unbound-method
178178
expect($el).not.to.be.disabled
179179
})
180180
.click()
@@ -208,7 +208,7 @@ export const testEditAnnotation = (cy: Cypress.Chainable) => {
208208
.should($el => {
209209
expect($el).to.have.length(1)
210210
expect(Cypress.dom.isDetached($el)).to.be.false
211-
// eslint-disable-next-line jest/unbound-method
211+
// eslint-disable-next-line @typescript-eslint/unbound-method
212212
expect($el).not.to.be.disabled
213213
})
214214
.click()
@@ -252,7 +252,7 @@ export const testEditRangeAnnotation = (
252252
.should($el => {
253253
expect($el).to.have.length(1)
254254
expect(Cypress.dom.isDetached($el)).to.be.false
255-
// eslint-disable-next-line jest/unbound-method
255+
// eslint-disable-next-line @typescript-eslint/unbound-method
256256
expect($el).not.to.be.disabled
257257
})
258258
.click()

docker/Dockerfile.cypress

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# The cypress image used here is a non-standard slim image
22
# and its definition and versions are maintained here:
33
# https://github.com/influxdata/cypress-slim
4-
FROM quay.io/influxdb/cypress-slim:9.5.2-included
4+
FROM quay.io/influxdb/cypress-slim:10.11.0-bare
55

66
WORKDIR /repo
77

88
COPY ./package.json .
99

1010
RUN yarn add cypress-circleci-reporter
1111

12-
COPY ./cypress.json ./cypress.json
12+
COPY ./cypress.config.ts ./cypress.config.ts
1313
COPY ./cypress ./cypress
1414
COPY ./src/types ./src/types
1515
COPY ./src/timeMachine/constants ./src/timeMachine/constants

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"cross-env": "^7.0.3",
117117
"css-loader": "^5.2.7",
118118
"css-unicode-loader": "^1.0.3",
119-
"cypress": "^9.5.2",
119+
"cypress": "^10.11.0",
120120
"cypress-file-upload": "^5.0.8",
121121
"cypress-log-to-output": "^1.1.2",
122122
"cypress-pipe": "^2.0.0",

yarn.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -4623,10 +4623,10 @@ cypress-plugin-tab@^1.0.5:
46234623
dependencies:
46244624
ally.js "^1.4.1"
46254625

4626-
cypress@^9.5.2:
4627-
version "9.5.3"
4628-
resolved "https://registry.npmjs.org/cypress/-/cypress-9.5.3.tgz"
4629-
integrity sha512-ItelIVmqMTnKYbo1JrErhsGgQGjWOxCpHT1TfMvwnIXKXN/OSlPjEK7rbCLYDZhejQL99PmUqul7XORI24Ik0A==
4626+
cypress@^10.11.0:
4627+
version "10.11.0"
4628+
resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.11.0.tgz#e9fbdd7638bae3d8fb7619fd75a6330d11ebb4e8"
4629+
integrity sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==
46304630
dependencies:
46314631
"@cypress/request" "^2.88.10"
46324632
"@cypress/xvfb" "^1.2.4"
@@ -4647,7 +4647,7 @@ cypress@^9.5.2:
46474647
dayjs "^1.10.4"
46484648
debug "^4.3.2"
46494649
enquirer "^2.3.6"
4650-
eventemitter2 "^6.4.3"
4650+
eventemitter2 "6.4.7"
46514651
execa "4.1.0"
46524652
executable "^4.1.1"
46534653
extract-zip "2.0.1"
@@ -5479,10 +5479,10 @@ etag@~1.8.1:
54795479
resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
54805480
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
54815481

5482-
eventemitter2@^6.4.3:
5483-
version "6.4.5"
5484-
resolved "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz"
5485-
integrity sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==
5482+
5483+
version "6.4.7"
5484+
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d"
5485+
integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==
54865486

54875487
eventemitter3@^4.0.0:
54885488
version "4.0.7"

0 commit comments

Comments
 (0)