diff --git a/.circleci/config.yml b/.circleci/config.yml index a244e73c63..e7a11a96ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -141,7 +141,7 @@ jobs: steps: - run: name: Run monitor-ci tests - command: API_KEY=${MONITOR_CI_API_KEY} PULL_REQUEST=${CIRCLE_PULL_REQUEST} MONITOR_CI_BRANCH="master" UI_BRANCH=${CIRCLE_BRANCH} UI_SHA=${CIRCLE_SHA1} SHA=${CIRCLE_SHA1} RUN_WORKFLOW="build" /run-monitor-ci-tests.bash + command: API_KEY=${MONITOR_CI_API_KEY} PULL_REQUEST=${CIRCLE_PULL_REQUEST} MONITOR_CI_BRANCH="fix_6273_upgrade_cypress_v10_11_0" UI_BRANCH=${CIRCLE_BRANCH} UI_SHA=${CIRCLE_SHA1} SHA=${CIRCLE_SHA1} RUN_WORKFLOW="build" /run-monitor-ci-tests.bash - store_artifacts: path: monitor-ci/test-artifacts/results/build-oss-image destination: test_artifacts/results/build-oss-image diff --git a/.eslintrc.js b/.eslintrc.js index b0aea35a6f..1e630b1dc8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,7 +32,7 @@ module.exports = { files: [ 'src/**/*.test.ts', 'src/**/*.test.tsx', - 'cypress/**/*.test.ts', + 'cypress/**/*.cy.ts', 'cypress/e2e/util/*.ts', ], plugins: ['jest'], diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000000..f9d926955d --- /dev/null +++ b/cypress.config.ts @@ -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}', + }, +}) diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 36696dee26..0000000000 --- a/cypress.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "retries": { - "runMode": 2, - "openMode": 0 - }, - "numTestsKeptInMemory": 25, - "integrationFolder": "cypress/e2e", - "defaultCommandTimeout": 10000, - "videoUploadOnPasses": false, - "chromeWebSecurity": false, - "blockHosts": [ - "www.google-analytics.com", - "www.googletagmanager.com", - "www.honeybadger.io" - ], - "viewportWidth": 1400, - "viewportHeight": 1000 -} diff --git a/cypress/e2e/cloud/about.test.ts b/cypress/e2e/cloud/about.cy.ts similarity index 100% rename from cypress/e2e/cloud/about.test.ts rename to cypress/e2e/cloud/about.cy.ts diff --git a/cypress/e2e/cloud/billing.test.ts b/cypress/e2e/cloud/billing.cy.ts similarity index 100% rename from cypress/e2e/cloud/billing.test.ts rename to cypress/e2e/cloud/billing.cy.ts diff --git a/cypress/e2e/cloud/buckets.test.ts b/cypress/e2e/cloud/buckets.cy.ts similarity index 100% rename from cypress/e2e/cloud/buckets.test.ts rename to cypress/e2e/cloud/buckets.cy.ts diff --git a/cypress/e2e/cloud/checkoutinaccessible.test.ts b/cypress/e2e/cloud/checkoutinaccessible.cy.ts similarity index 100% rename from cypress/e2e/cloud/checkoutinaccessible.test.ts rename to cypress/e2e/cloud/checkoutinaccessible.cy.ts diff --git a/cypress/e2e/cloud/checkoutpage.test.ts b/cypress/e2e/cloud/checkoutpage.cy.ts similarity index 100% rename from cypress/e2e/cloud/checkoutpage.test.ts rename to cypress/e2e/cloud/checkoutpage.cy.ts diff --git a/cypress/e2e/cloud/communityTemplates.test.ts b/cypress/e2e/cloud/communityTemplates.cy.ts similarity index 100% rename from cypress/e2e/cloud/communityTemplates.test.ts rename to cypress/e2e/cloud/communityTemplates.cy.ts diff --git a/cypress/e2e/cloud/dashboardsView.test.ts b/cypress/e2e/cloud/dashboardsView.cy.ts similarity index 69% rename from cypress/e2e/cloud/dashboardsView.test.ts rename to cypress/e2e/cloud/dashboardsView.cy.ts index 154e447376..c02c413506 100644 --- a/cypress/e2e/cloud/dashboardsView.test.ts +++ b/cypress/e2e/cloud/dashboardsView.cy.ts @@ -29,14 +29,13 @@ describe('Dashboard', () => { '![](https://icatcare.org/app/uploads/2018/07/Thinking-of-getting-a-cat.png)' cy.getByTestID('add-note--button').click() - cy.getByTestID('note-editor--overlay').within(() => { - cy.getByTestID('markdown-editor').within(() => { - cy.get('textarea').type(`${noteText}`, {force: true}) - }) - cy.getByTestID('note-editor--preview').contains(markdownImageWarning) - cy.getByTestID('note-editor--preview').should('not.contain', noteText) - cy.getByTestID('save-note--button').click() - }) + cy.getByTestID('note-editor--overlay').should('be.visible') + cy.get('.view-line').should('be.visible') + cy.get('.view-line').click() + cy.get('.view-line').type(`${noteText}`) + cy.getByTestID('note-editor--preview').contains(markdownImageWarning) + cy.getByTestID('note-editor--preview').should('not.contain', noteText) + cy.getByTestID('save-note--button').click() cy.getByTestID('cell--view-empty markdown').contains(markdownImageWarning) }) @@ -55,13 +54,12 @@ describe('Dashboard', () => { "" cy.getByTestID('add-note--button').click() - cy.getByTestID('note-editor--overlay').within(() => { - cy.getByTestID('markdown-editor').within(() => { - cy.get('textarea').type(`${noteText}`, {force: true}) - }) - cy.getByTestID('note-editor--preview').contains(noteText) - cy.getByTestID('save-note--button').click() - }) + cy.getByTestID('note-editor--overlay').should('be.visible') + cy.get('.view-line').should('be.visible') + cy.get('.view-line').click() + cy.get('.view-line').type(`${noteText}`) + cy.getByTestID('note-editor--preview').contains(noteText) + cy.getByTestID('save-note--button').click() cy.getByTestID('cell--view-empty markdown').contains(noteText) }) }) diff --git a/cypress/e2e/cloud/deepLinks.test.ts b/cypress/e2e/cloud/deepLinks.cy.ts similarity index 100% rename from cypress/e2e/cloud/deepLinks.test.ts rename to cypress/e2e/cloud/deepLinks.cy.ts diff --git a/cypress/e2e/cloud/explorer.test.ts b/cypress/e2e/cloud/explorer.cy.ts similarity index 100% rename from cypress/e2e/cloud/explorer.test.ts rename to cypress/e2e/cloud/explorer.cy.ts diff --git a/cypress/e2e/cloud/flows.test.ts b/cypress/e2e/cloud/flows.cy.ts similarity index 99% rename from cypress/e2e/cloud/flows.test.ts rename to cypress/e2e/cloud/flows.cy.ts index bda0627c30..8f2f7e68dd 100644 --- a/cypress/e2e/cloud/flows.test.ts +++ b/cypress/e2e/cloud/flows.cy.ts @@ -185,6 +185,7 @@ describe('Flows', () => { it('can use the dynamic flux function selector to build a query', () => { cy.getByTestID('preset-script').first().click() + cy.getByTestID('flux-editor').should('be.visible') cy.get('.view-line').should('be.visible') cy.get('button[title="Function Reference"]').click() @@ -215,6 +216,7 @@ describe('Flows', () => { it('can use the dynamic flux function search bar to search by package or function name', () => { cy.getByTestID('preset-script').first().click() + cy.getByTestID('flux-editor').should('be.visible') cy.get('.view-line').should('be.visible') cy.get('button[title="Function Reference"]').click() diff --git a/cypress/e2e/cloud/geoOptions.test.ts b/cypress/e2e/cloud/geoOptions.cy.ts similarity index 100% rename from cypress/e2e/cloud/geoOptions.test.ts rename to cypress/e2e/cloud/geoOptions.cy.ts diff --git a/cypress/e2e/cloud/globalHeader.test.ts b/cypress/e2e/cloud/globalHeader.cy.ts similarity index 100% rename from cypress/e2e/cloud/globalHeader.test.ts rename to cypress/e2e/cloud/globalHeader.cy.ts diff --git a/cypress/e2e/cloud/globalHeaderOrgMenuItems.test.ts b/cypress/e2e/cloud/globalHeaderOrgMenuItems.cy.ts similarity index 100% rename from cypress/e2e/cloud/globalHeaderOrgMenuItems.test.ts rename to cypress/e2e/cloud/globalHeaderOrgMenuItems.cy.ts diff --git a/cypress/e2e/cloud/helpBar.test.ts b/cypress/e2e/cloud/helpBar.cy.ts similarity index 100% rename from cypress/e2e/cloud/helpBar.test.ts rename to cypress/e2e/cloud/helpBar.cy.ts diff --git a/cypress/e2e/cloud/operator.test.ts b/cypress/e2e/cloud/operator.cy.ts similarity index 96% rename from cypress/e2e/cloud/operator.test.ts rename to cypress/e2e/cloud/operator.cy.ts index 16e1f2d8eb..9f24b554cd 100644 --- a/cypress/e2e/cloud/operator.test.ts +++ b/cypress/e2e/cloud/operator.cy.ts @@ -236,7 +236,17 @@ describe('Operator Page', () => { }) describe('Operator Page should not be accessible for non-operator users', () => { - beforeEach(() => + it('should render a 404', () => { + /* + The following error listener only applies in this test. + We have to ignore errors because non-operators + attempting to visit the operator page will throw errors in the console, + and consequently causes Cypress to fail the test if not handled + */ + cy.on('uncaught:exception', () => { + return false + }) + cy.flush().then(() => cy.signin().then(() => { cy.get('@org').then(() => { @@ -249,9 +259,6 @@ describe('Operator Page should not be accessible for non-operator users', () => }) }) ) - ) - - it('should render a 404', () => { cy.getByTestID('not-found').should('exist') cy.visit('/') cy.getByTestID('nav-item--operator').should('not.exist') diff --git a/cypress/e2e/cloud/operatorRO.test.ts b/cypress/e2e/cloud/operatorRO.cy.ts similarity index 100% rename from cypress/e2e/cloud/operatorRO.test.ts rename to cypress/e2e/cloud/operatorRO.cy.ts diff --git a/cypress/e2e/cloud/subscriptions.test.ts b/cypress/e2e/cloud/subscriptions.cy.ts similarity index 100% rename from cypress/e2e/cloud/subscriptions.test.ts rename to cypress/e2e/cloud/subscriptions.cy.ts diff --git a/cypress/e2e/cloud/usage.test.ts b/cypress/e2e/cloud/usage.cy.ts similarity index 100% rename from cypress/e2e/cloud/usage.test.ts rename to cypress/e2e/cloud/usage.cy.ts diff --git a/cypress/e2e/cloud/userAccounts.test.ts b/cypress/e2e/cloud/userAccounts.cy.ts similarity index 100% rename from cypress/e2e/cloud/userAccounts.test.ts rename to cypress/e2e/cloud/userAccounts.cy.ts diff --git a/cypress/e2e/cloud/userProfile.test.ts b/cypress/e2e/cloud/userProfile.cy.ts similarity index 100% rename from cypress/e2e/cloud/userProfile.test.ts rename to cypress/e2e/cloud/userProfile.cy.ts diff --git a/cypress/e2e/cloud/users.test.ts b/cypress/e2e/cloud/users.cy.ts similarity index 100% rename from cypress/e2e/cloud/users.test.ts rename to cypress/e2e/cloud/users.cy.ts diff --git a/cypress/e2e/cloud/zuoraOutage.test.ts b/cypress/e2e/cloud/zuoraOutage.cy.ts similarity index 100% rename from cypress/e2e/cloud/zuoraOutage.test.ts rename to cypress/e2e/cloud/zuoraOutage.cy.ts diff --git a/cypress/e2e/oss/dashboardsView.test.ts b/cypress/e2e/oss/dashboardsView.cy.ts similarity index 100% rename from cypress/e2e/oss/dashboardsView.test.ts rename to cypress/e2e/oss/dashboardsView.cy.ts diff --git a/cypress/e2e/oss/explorer.test.ts b/cypress/e2e/oss/explorer.cy.ts similarity index 100% rename from cypress/e2e/oss/explorer.test.ts rename to cypress/e2e/oss/explorer.cy.ts diff --git a/cypress/e2e/oss/onboarding.test.ts b/cypress/e2e/oss/onboarding.cy.ts similarity index 100% rename from cypress/e2e/oss/onboarding.test.ts rename to cypress/e2e/oss/onboarding.cy.ts diff --git a/cypress/e2e/oss/orgs.test.ts b/cypress/e2e/oss/orgs.cy.ts similarity index 100% rename from cypress/e2e/oss/orgs.test.ts rename to cypress/e2e/oss/orgs.cy.ts diff --git a/cypress/e2e/oss/scrapers.test.ts b/cypress/e2e/oss/scrapers.cy.ts similarity index 100% rename from cypress/e2e/oss/scrapers.test.ts rename to cypress/e2e/oss/scrapers.cy.ts diff --git a/cypress/e2e/shared/about.test.ts b/cypress/e2e/shared/about.cy.ts similarity index 100% rename from cypress/e2e/shared/about.test.ts rename to cypress/e2e/shared/about.cy.ts diff --git a/cypress/e2e/shared/adaptiveZoom.test.ts b/cypress/e2e/shared/adaptiveZoom.cy.ts similarity index 100% rename from cypress/e2e/shared/adaptiveZoom.test.ts rename to cypress/e2e/shared/adaptiveZoom.cy.ts diff --git a/cypress/e2e/shared/annotations.band.test.ts b/cypress/e2e/shared/annotations.band.cy.ts similarity index 96% rename from cypress/e2e/shared/annotations.band.test.ts rename to cypress/e2e/shared/annotations.band.cy.ts index 705b04b624..935137cec3 100644 --- a/cypress/e2e/shared/annotations.band.test.ts +++ b/cypress/e2e/shared/annotations.band.cy.ts @@ -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' diff --git a/cypress/e2e/shared/annotations.range.test.ts b/cypress/e2e/shared/annotations.range.cy.ts similarity index 99% rename from cypress/e2e/shared/annotations.range.test.ts rename to cypress/e2e/shared/annotations.range.cy.ts index 16f5a54d40..912bf1e581 100644 --- a/cypress/e2e/shared/annotations.range.test.ts +++ b/cypress/e2e/shared/annotations.range.cy.ts @@ -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' @@ -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 jest/unbound-method, @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() diff --git a/cypress/e2e/shared/annotations.singlestat.test.ts b/cypress/e2e/shared/annotations.singlestat.cy.ts similarity index 96% rename from cypress/e2e/shared/annotations.singlestat.test.ts rename to cypress/e2e/shared/annotations.singlestat.cy.ts index f152cb5d3d..d13632dda5 100644 --- a/cypress/e2e/shared/annotations.singlestat.test.ts +++ b/cypress/e2e/shared/annotations.singlestat.cy.ts @@ -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' diff --git a/cypress/e2e/shared/annotations.xy.test.ts b/cypress/e2e/shared/annotations.xy.cy.ts similarity index 96% rename from cypress/e2e/shared/annotations.xy.test.ts rename to cypress/e2e/shared/annotations.xy.cy.ts index 0037de8369..ed9fb1c316 100644 --- a/cypress/e2e/shared/annotations.xy.test.ts +++ b/cypress/e2e/shared/annotations.xy.cy.ts @@ -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)) diff --git a/cypress/e2e/shared/arduino.test.ts b/cypress/e2e/shared/arduino.cy.ts similarity index 100% rename from cypress/e2e/shared/arduino.test.ts rename to cypress/e2e/shared/arduino.cy.ts diff --git a/cypress/e2e/shared/buckets.test.ts b/cypress/e2e/shared/buckets.cy.ts similarity index 100% rename from cypress/e2e/shared/buckets.test.ts rename to cypress/e2e/shared/buckets.cy.ts diff --git a/cypress/e2e/shared/checks.test.ts b/cypress/e2e/shared/checks.cy.ts similarity index 100% rename from cypress/e2e/shared/checks.test.ts rename to cypress/e2e/shared/checks.cy.ts diff --git a/cypress/e2e/shared/dashboardsIndex.test.ts b/cypress/e2e/shared/dashboardsIndex.cy.ts similarity index 100% rename from cypress/e2e/shared/dashboardsIndex.test.ts rename to cypress/e2e/shared/dashboardsIndex.cy.ts diff --git a/cypress/e2e/shared/dashboardsRefresh.test.ts b/cypress/e2e/shared/dashboardsRefresh.cy.ts similarity index 100% rename from cypress/e2e/shared/dashboardsRefresh.test.ts rename to cypress/e2e/shared/dashboardsRefresh.cy.ts diff --git a/cypress/e2e/shared/dashboardsVariables.test.ts b/cypress/e2e/shared/dashboardsVariables.cy.ts similarity index 100% rename from cypress/e2e/shared/dashboardsVariables.test.ts rename to cypress/e2e/shared/dashboardsVariables.cy.ts diff --git a/cypress/e2e/shared/dashboardsView.test.ts b/cypress/e2e/shared/dashboardsView.cy.ts similarity index 100% rename from cypress/e2e/shared/dashboardsView.test.ts rename to cypress/e2e/shared/dashboardsView.cy.ts diff --git a/cypress/e2e/shared/editor.test.ts b/cypress/e2e/shared/editor.cy.ts similarity index 100% rename from cypress/e2e/shared/editor.test.ts rename to cypress/e2e/shared/editor.cy.ts diff --git a/cypress/e2e/shared/explorer.test.ts b/cypress/e2e/shared/explorer.cy.ts similarity index 100% rename from cypress/e2e/shared/explorer.test.ts rename to cypress/e2e/shared/explorer.cy.ts diff --git a/cypress/e2e/shared/explorerVisualizations.test.ts b/cypress/e2e/shared/explorerVisualizations.cy.ts similarity index 100% rename from cypress/e2e/shared/explorerVisualizations.test.ts rename to cypress/e2e/shared/explorerVisualizations.cy.ts diff --git a/cypress/e2e/shared/firstmile.tests.ts b/cypress/e2e/shared/firstmile.tests.cy.ts similarity index 100% rename from cypress/e2e/shared/firstmile.tests.ts rename to cypress/e2e/shared/firstmile.tests.cy.ts diff --git a/cypress/e2e/shared/flows.test.ts b/cypress/e2e/shared/flows.cy.ts similarity index 100% rename from cypress/e2e/shared/flows.test.ts rename to cypress/e2e/shared/flows.cy.ts diff --git a/cypress/e2e/shared/flowsAlerts.test.ts b/cypress/e2e/shared/flowsAlerts.cy.ts similarity index 100% rename from cypress/e2e/shared/flowsAlerts.test.ts rename to cypress/e2e/shared/flowsAlerts.cy.ts diff --git a/cypress/e2e/shared/flowsSidebarExportToClipboard.test.ts b/cypress/e2e/shared/flowsSidebarExportToClipboard.cy.ts similarity index 100% rename from cypress/e2e/shared/flowsSidebarExportToClipboard.test.ts rename to cypress/e2e/shared/flowsSidebarExportToClipboard.cy.ts diff --git a/cypress/e2e/shared/fluxQueryBuilder.test.ts b/cypress/e2e/shared/fluxQueryBuilder.cy.ts similarity index 100% rename from cypress/e2e/shared/fluxQueryBuilder.test.ts rename to cypress/e2e/shared/fluxQueryBuilder.cy.ts diff --git a/cypress/e2e/shared/helpBar.test.ts b/cypress/e2e/shared/helpBar.cy.ts similarity index 100% rename from cypress/e2e/shared/helpBar.test.ts rename to cypress/e2e/shared/helpBar.cy.ts diff --git a/cypress/e2e/shared/home.test.ts b/cypress/e2e/shared/home.cy.ts similarity index 100% rename from cypress/e2e/shared/home.test.ts rename to cypress/e2e/shared/home.cy.ts diff --git a/cypress/e2e/shared/influxCLI.test.ts b/cypress/e2e/shared/influxCLI.cy.ts similarity index 100% rename from cypress/e2e/shared/influxCLI.test.ts rename to cypress/e2e/shared/influxCLI.cy.ts diff --git a/cypress/e2e/shared/labels.test.ts b/cypress/e2e/shared/labels.cy.ts similarity index 100% rename from cypress/e2e/shared/labels.test.ts rename to cypress/e2e/shared/labels.cy.ts diff --git a/cypress/e2e/shared/legends.test.ts b/cypress/e2e/shared/legends.cy.ts similarity index 100% rename from cypress/e2e/shared/legends.test.ts rename to cypress/e2e/shared/legends.cy.ts diff --git a/cypress/e2e/shared/loadDataSources.test.ts b/cypress/e2e/shared/loadDataSources.cy.ts similarity index 100% rename from cypress/e2e/shared/loadDataSources.test.ts rename to cypress/e2e/shared/loadDataSources.cy.ts diff --git a/cypress/e2e/shared/login.test.ts b/cypress/e2e/shared/login.cy.ts similarity index 100% rename from cypress/e2e/shared/login.test.ts rename to cypress/e2e/shared/login.cy.ts diff --git a/cypress/e2e/shared/nav.test.ts b/cypress/e2e/shared/nav.cy.ts similarity index 100% rename from cypress/e2e/shared/nav.test.ts rename to cypress/e2e/shared/nav.cy.ts diff --git a/cypress/e2e/shared/notificationEndpoints.test.ts b/cypress/e2e/shared/notificationEndpoints.cy.ts similarity index 100% rename from cypress/e2e/shared/notificationEndpoints.test.ts rename to cypress/e2e/shared/notificationEndpoints.cy.ts diff --git a/cypress/e2e/shared/notificationRules.test.ts b/cypress/e2e/shared/notificationRules.cy.ts similarity index 100% rename from cypress/e2e/shared/notificationRules.test.ts rename to cypress/e2e/shared/notificationRules.cy.ts diff --git a/cypress/e2e/shared/queryBuilder.test.ts b/cypress/e2e/shared/queryBuilder.cy.ts similarity index 100% rename from cypress/e2e/shared/queryBuilder.test.ts rename to cypress/e2e/shared/queryBuilder.cy.ts diff --git a/cypress/e2e/shared/secrets.test.ts b/cypress/e2e/shared/secrets.cy.ts similarity index 100% rename from cypress/e2e/shared/secrets.test.ts rename to cypress/e2e/shared/secrets.cy.ts diff --git a/cypress/e2e/shared/simpleTable.test.ts b/cypress/e2e/shared/simpleTable.cy.ts similarity index 100% rename from cypress/e2e/shared/simpleTable.test.ts rename to cypress/e2e/shared/simpleTable.cy.ts diff --git a/cypress/e2e/shared/tasks.test.ts b/cypress/e2e/shared/tasks.cy.ts similarity index 100% rename from cypress/e2e/shared/tasks.test.ts rename to cypress/e2e/shared/tasks.cy.ts diff --git a/cypress/e2e/shared/tasks.pagination.test.ts b/cypress/e2e/shared/tasks.pagination.cy.ts similarity index 100% rename from cypress/e2e/shared/tasks.pagination.test.ts rename to cypress/e2e/shared/tasks.pagination.cy.ts diff --git a/cypress/e2e/shared/telegrafPlugins.test.ts b/cypress/e2e/shared/telegrafPlugins.cy.ts similarity index 100% rename from cypress/e2e/shared/telegrafPlugins.test.ts rename to cypress/e2e/shared/telegrafPlugins.cy.ts diff --git a/cypress/e2e/shared/telegrafs.test.ts b/cypress/e2e/shared/telegrafs.cy.ts similarity index 100% rename from cypress/e2e/shared/telegrafs.test.ts rename to cypress/e2e/shared/telegrafs.cy.ts diff --git a/cypress/e2e/shared/tokens.test.ts b/cypress/e2e/shared/tokens.cy.ts similarity index 100% rename from cypress/e2e/shared/tokens.test.ts rename to cypress/e2e/shared/tokens.cy.ts diff --git a/cypress/e2e/shared/variables.test.ts b/cypress/e2e/shared/variables.cy.ts similarity index 100% rename from cypress/e2e/shared/variables.test.ts rename to cypress/e2e/shared/variables.cy.ts diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 283d111fcb..be276de4e6 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -25,7 +25,8 @@ Cypress.on('uncaught:exception', (err, _) => { err.message.includes('The operation was aborted') || err.message.includes('NetworkError') || err.message.includes('path not found') || - err.message.includes('Request aborted') + err.message.includes('Request aborted') || + err.message.includes('Loading chunk') ) }) diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 93% rename from cypress/support/index.js rename to cypress/support/e2e.js index 629fb77869..a0f8af9bad 100644 --- a/cypress/support/index.js +++ b/cypress/support/e2e.js @@ -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 diff --git a/cypress/e2e/util/annotationsSetup.ts b/cypress/util/annotationsSetup.ts similarity index 95% rename from cypress/e2e/util/annotationsSetup.ts rename to cypress/util/annotationsSetup.ts index 5d228bca8d..261f17eefc 100644 --- a/cypress/e2e/util/annotationsSetup.ts +++ b/cypress/util/annotationsSetup.ts @@ -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' @@ -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 jest/unbound-method, @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() @@ -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 jest/unbound-method, @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() @@ -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 jest/unbound-method, @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() @@ -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 jest/unbound-method, @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() diff --git a/docker/Dockerfile.cypress b/docker/Dockerfile.cypress index 40d8739d3b..85a8dde700 100644 --- a/docker/Dockerfile.cypress +++ b/docker/Dockerfile.cypress @@ -1,7 +1,7 @@ # 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-included WORKDIR /repo @@ -9,7 +9,7 @@ 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 diff --git a/package.json b/package.json index 0ee3875e3f..75f5f34867 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 6c6a09646e..1c6b905663 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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" @@ -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== +eventemitter2@6.4.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"