Skip to content

Commit

Permalink
feat: upgrade Cypress to v10.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TCL735 committed Nov 8, 2022
1 parent 30b578a commit 2e57ebf
Show file tree
Hide file tree
Showing 73 changed files with 51 additions and 24 deletions.
27 changes: 27 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {defineConfig} from 'cypress'

export default defineConfig({
retries: {
runMode: 2,
openMode: 0,
},
numTestsKeptInMemory: 25,
defaultCommandTimeout: 10000,
videoUploadOnPasses: false,
chromeWebSecurity: false,
blockHosts: [
'www.google-analytics.com',
'www.googletagmanager.com',
'www.honeybadger.io',
],
viewportWidth: 1400,
viewportHeight: 1000,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
},
})
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
testEditRangeAnnotation,
testDeleteAnnotation,
RANGE_ANNOTATION_TEXT,
} from '../util/annotationsSetup'
} from '../../util/annotationsSetup'

describe('The Annotations UI functionality on a band plot graph type', () => {
const bandSuffix = 'band'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
checkAnnotationText,
setupData,
startEditingAnnotation,
} from '../util/annotationsSetup'
} from '../../util/annotationsSetup'
import * as moment from 'moment'

import {DEFAULT_TIME_FORMAT} from '../../../src/utils/datetime/constants'
Expand Down Expand Up @@ -263,7 +263,7 @@ describe('Annotations, but in a different test suite', () => {
.should($el => {
expect($el).to.have.length(1)
expect(Cypress.dom.isDetached($el)).to.be.false
// eslint-disable-next-line jest/unbound-method
// eslint-disable-next-line @typescript-eslint/unbound-method
expect($el).not.to.be.disabled
})
.click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
testEditRangeAnnotation,
testDeleteAnnotation,
RANGE_ANNOTATION_TEXT,
} from '../util/annotationsSetup'
} from '../../util/annotationsSetup'

describe('The Annotations UI functionality on a graph + single stat graph type', () => {
const singleStatSuffix = 'line-plus-single-stat'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
testEditRangeAnnotation,
testDeleteAnnotation,
RANGE_ANNOTATION_TEXT,
} from '../util/annotationsSetup'
} from '../../util/annotationsSetup'

describe('The Annotations UI functionality, on a graph (xy line) graph type', () => {
beforeEach(() => setupData(cy))
Expand Down
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.
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.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cypress/support/index.js → cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************
// This example support/index.js is processed and
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Organization} from '../../../src/types'
import {points} from '../../support/commands'
import {Organization} from '../../src/types'
import {points} from '../support/commands'

export const ANNOTATION_TEXT = 'im a hippopotamus'
export const EDIT_ANNOTATION_TEXT = 'lets edit this annotation'
Expand Down Expand Up @@ -90,7 +90,7 @@ export const addAnnotation = (cy: Cypress.Chainable) => {
.should($el => {
expect($el).to.have.length(1)
expect(Cypress.dom.isDetached($el)).to.be.false
// eslint-disable-next-line jest/unbound-method
// eslint-disable-next-line @typescript-eslint/unbound-method
expect($el).not.to.be.disabled
})
.click()
Expand Down Expand Up @@ -174,7 +174,7 @@ export const addRangeAnnotation = (
.should($el => {
expect($el).to.have.length(1)
expect(Cypress.dom.isDetached($el)).to.be.false
// eslint-disable-next-line jest/unbound-method
// eslint-disable-next-line @typescript-eslint/unbound-method
expect($el).not.to.be.disabled
})
.click()
Expand Down Expand Up @@ -208,7 +208,7 @@ export const testEditAnnotation = (cy: Cypress.Chainable) => {
.should($el => {
expect($el).to.have.length(1)
expect(Cypress.dom.isDetached($el)).to.be.false
// eslint-disable-next-line jest/unbound-method
// eslint-disable-next-line @typescript-eslint/unbound-method
expect($el).not.to.be.disabled
})
.click()
Expand Down Expand Up @@ -252,7 +252,7 @@ export const testEditRangeAnnotation = (
.should($el => {
expect($el).to.have.length(1)
expect(Cypress.dom.isDetached($el)).to.be.false
// eslint-disable-next-line jest/unbound-method
// eslint-disable-next-line @typescript-eslint/unbound-method
expect($el).not.to.be.disabled
})
.click()
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.cypress
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# The cypress image used here is a non-standard slim image
# and its definition and versions are maintained here:
# https://github.com/influxdata/cypress-slim
FROM quay.io/influxdb/cypress-slim:9.5.2-included
FROM quay.io/influxdb/cypress-slim:10.11.0-bare

WORKDIR /repo

COPY ./package.json .

RUN yarn add cypress-circleci-reporter

COPY ./cypress.json ./cypress.json
COPY ./cypress.config.ts ./cypress.config.ts
COPY ./cypress ./cypress
COPY ./src/types ./src/types
COPY ./src/timeMachine/constants ./src/timeMachine/constants
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"cross-env": "^7.0.3",
"css-loader": "^5.2.7",
"css-unicode-loader": "^1.0.3",
"cypress": "^9.5.2",
"cypress": "^10.11.0",
"cypress-file-upload": "^5.0.8",
"cypress-log-to-output": "^1.1.2",
"cypress-pipe": "^2.0.0",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4623,10 +4623,10 @@ cypress-plugin-tab@^1.0.5:
dependencies:
ally.js "^1.4.1"

cypress@^9.5.2:
version "9.5.3"
resolved "https://registry.npmjs.org/cypress/-/cypress-9.5.3.tgz"
integrity sha512-ItelIVmqMTnKYbo1JrErhsGgQGjWOxCpHT1TfMvwnIXKXN/OSlPjEK7rbCLYDZhejQL99PmUqul7XORI24Ik0A==
cypress@^10.11.0:
version "10.11.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.11.0.tgz#e9fbdd7638bae3d8fb7619fd75a6330d11ebb4e8"
integrity sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==
dependencies:
"@cypress/request" "^2.88.10"
"@cypress/xvfb" "^1.2.4"
Expand All @@ -4647,7 +4647,7 @@ cypress@^9.5.2:
dayjs "^1.10.4"
debug "^4.3.2"
enquirer "^2.3.6"
eventemitter2 "^6.4.3"
eventemitter2 "6.4.7"
execa "4.1.0"
executable "^4.1.1"
extract-zip "2.0.1"
Expand Down Expand Up @@ -5479,10 +5479,10 @@ etag@~1.8.1:
resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=

eventemitter2@^6.4.3:
version "6.4.5"
resolved "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz"
integrity sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==
[email protected].7:
version "6.4.7"
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d"
integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==

eventemitter3@^4.0.0:
version "4.0.7"
Expand Down

0 comments on commit 2e57ebf

Please sign in to comment.