From 66d7bf2af2205e9c629e0feb5309feaac3eb6093 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Mon, 7 Nov 2022 16:19:54 -0800 Subject: [PATCH 01/12] feat: upgrade Cypress to v10.11.0 --- cypress.config.ts | 27 +++++++++++++++++++ .../e2e/cloud/{about.test.ts => about.cy.ts} | 0 .../cloud/{billing.test.ts => billing.cy.ts} | 0 .../cloud/{buckets.test.ts => buckets.cy.ts} | 0 ...ble.test.ts => checkoutinaccessible.cy.ts} | 0 ...heckoutpage.test.ts => checkoutpage.cy.ts} | 0 ...lates.test.ts => communityTemplates.cy.ts} | 0 ...oardsView.test.ts => dashboardsView.cy.ts} | 0 .../{deepLinks.test.ts => deepLinks.cy.ts} | 0 .../{explorer.test.ts => explorer.cy.ts} | 0 .../e2e/cloud/{flows.test.ts => flows.cy.ts} | 0 .../{geoOptions.test.ts => geoOptions.cy.ts} | 0 ...lobalHeader.test.ts => globalHeader.cy.ts} | 0 ...test.ts => globalHeaderOrgMenuItems.cy.ts} | 0 .../cloud/{helpBar.test.ts => helpBar.cy.ts} | 0 .../{operator.test.ts => operator.cy.ts} | 0 .../{operatorRO.test.ts => operatorRO.cy.ts} | 0 ...scriptions.test.ts => subscriptions.cy.ts} | 0 .../e2e/cloud/{usage.test.ts => usage.cy.ts} | 0 ...serAccounts.test.ts => userAccounts.cy.ts} | 0 ...{userProfile.test.ts => userProfile.cy.ts} | 0 .../e2e/cloud/{users.test.ts => users.cy.ts} | 0 ...{zuoraOutage.test.ts => zuoraOutage.cy.ts} | 0 ...oardsView.test.ts => dashboardsView.cy.ts} | 0 .../oss/{explorer.test.ts => explorer.cy.ts} | 0 .../{onboarding.test.ts => onboarding.cy.ts} | 0 cypress/e2e/oss/{orgs.test.ts => orgs.cy.ts} | 0 .../oss/{scrapers.test.ts => scrapers.cy.ts} | 0 .../e2e/shared/{about.test.ts => about.cy.ts} | 0 ...daptiveZoom.test.ts => adaptiveZoom.cy.ts} | 0 ...ns.band.test.ts => annotations.band.cy.ts} | 2 +- ....range.test.ts => annotations.range.cy.ts} | 4 +-- ...t.test.ts => annotations.singlestat.cy.ts} | 2 +- ...ations.xy.test.ts => annotations.xy.cy.ts} | 2 +- .../shared/{arduino.test.ts => arduino.cy.ts} | 0 .../shared/{buckets.test.ts => buckets.cy.ts} | 0 .../shared/{checks.test.ts => checks.cy.ts} | 0 ...rdsIndex.test.ts => dashboardsIndex.cy.ts} | 0 ...efresh.test.ts => dashboardsRefresh.cy.ts} | 0 ...bles.test.ts => dashboardsVariables.cy.ts} | 0 ...oardsView.test.ts => dashboardsView.cy.ts} | 0 .../shared/{editor.test.ts => editor.cy.ts} | 0 .../{explorer.test.ts => explorer.cy.ts} | 0 ...s.test.ts => explorerVisualizations.cy.ts} | 0 ...rstmile.tests.ts => firstmile.tests.cy.ts} | 0 .../e2e/shared/{flows.test.ts => flows.cy.ts} | 0 ...{flowsAlerts.test.ts => flowsAlerts.cy.ts} | 0 ...ts => flowsSidebarExportToClipboard.cy.ts} | 0 ...Builder.test.ts => fluxQueryBuilder.cy.ts} | 0 .../shared/{helpBar.test.ts => helpBar.cy.ts} | 0 .../e2e/shared/{home.test.ts => home.cy.ts} | 0 .../{influxCLI.test.ts => influxCLI.cy.ts} | 0 .../shared/{labels.test.ts => labels.cy.ts} | 0 .../shared/{legends.test.ts => legends.cy.ts} | 0 ...aSources.test.ts => loadDataSources.cy.ts} | 0 .../e2e/shared/{login.test.ts => login.cy.ts} | 0 cypress/e2e/shared/{nav.test.ts => nav.cy.ts} | 0 ...ts.test.ts => notificationEndpoints.cy.ts} | 0 ...nRules.test.ts => notificationRules.cy.ts} | 0 ...ueryBuilder.test.ts => queryBuilder.cy.ts} | 0 .../shared/{secrets.test.ts => secrets.cy.ts} | 0 ...{simpleTable.test.ts => simpleTable.cy.ts} | 0 .../e2e/shared/{tasks.test.ts => tasks.cy.ts} | 0 ...ination.test.ts => tasks.pagination.cy.ts} | 0 ...fPlugins.test.ts => telegrafPlugins.cy.ts} | 0 .../{telegrafs.test.ts => telegrafs.cy.ts} | 0 .../shared/{tokens.test.ts => tokens.cy.ts} | 0 .../{variables.test.ts => variables.cy.ts} | 0 cypress/support/{index.js => e2e.js} | 2 +- .../annotationsSetup.cy.ts} | 12 ++++----- docker/Dockerfile.cypress | 4 +-- package.json | 2 +- yarn.lock | 18 ++++++------- 73 files changed, 51 insertions(+), 24 deletions(-) create mode 100644 cypress.config.ts rename cypress/e2e/cloud/{about.test.ts => about.cy.ts} (100%) rename cypress/e2e/cloud/{billing.test.ts => billing.cy.ts} (100%) rename cypress/e2e/cloud/{buckets.test.ts => buckets.cy.ts} (100%) rename cypress/e2e/cloud/{checkoutinaccessible.test.ts => checkoutinaccessible.cy.ts} (100%) rename cypress/e2e/cloud/{checkoutpage.test.ts => checkoutpage.cy.ts} (100%) rename cypress/e2e/cloud/{communityTemplates.test.ts => communityTemplates.cy.ts} (100%) rename cypress/e2e/cloud/{dashboardsView.test.ts => dashboardsView.cy.ts} (100%) rename cypress/e2e/cloud/{deepLinks.test.ts => deepLinks.cy.ts} (100%) rename cypress/e2e/cloud/{explorer.test.ts => explorer.cy.ts} (100%) rename cypress/e2e/cloud/{flows.test.ts => flows.cy.ts} (100%) rename cypress/e2e/cloud/{geoOptions.test.ts => geoOptions.cy.ts} (100%) rename cypress/e2e/cloud/{globalHeader.test.ts => globalHeader.cy.ts} (100%) rename cypress/e2e/cloud/{globalHeaderOrgMenuItems.test.ts => globalHeaderOrgMenuItems.cy.ts} (100%) rename cypress/e2e/cloud/{helpBar.test.ts => helpBar.cy.ts} (100%) rename cypress/e2e/cloud/{operator.test.ts => operator.cy.ts} (100%) rename cypress/e2e/cloud/{operatorRO.test.ts => operatorRO.cy.ts} (100%) rename cypress/e2e/cloud/{subscriptions.test.ts => subscriptions.cy.ts} (100%) rename cypress/e2e/cloud/{usage.test.ts => usage.cy.ts} (100%) rename cypress/e2e/cloud/{userAccounts.test.ts => userAccounts.cy.ts} (100%) rename cypress/e2e/cloud/{userProfile.test.ts => userProfile.cy.ts} (100%) rename cypress/e2e/cloud/{users.test.ts => users.cy.ts} (100%) rename cypress/e2e/cloud/{zuoraOutage.test.ts => zuoraOutage.cy.ts} (100%) rename cypress/e2e/oss/{dashboardsView.test.ts => dashboardsView.cy.ts} (100%) rename cypress/e2e/oss/{explorer.test.ts => explorer.cy.ts} (100%) rename cypress/e2e/oss/{onboarding.test.ts => onboarding.cy.ts} (100%) rename cypress/e2e/oss/{orgs.test.ts => orgs.cy.ts} (100%) rename cypress/e2e/oss/{scrapers.test.ts => scrapers.cy.ts} (100%) rename cypress/e2e/shared/{about.test.ts => about.cy.ts} (100%) rename cypress/e2e/shared/{adaptiveZoom.test.ts => adaptiveZoom.cy.ts} (100%) rename cypress/e2e/shared/{annotations.band.test.ts => annotations.band.cy.ts} (96%) rename cypress/e2e/shared/{annotations.range.test.ts => annotations.range.cy.ts} (98%) rename cypress/e2e/shared/{annotations.singlestat.test.ts => annotations.singlestat.cy.ts} (96%) rename cypress/e2e/shared/{annotations.xy.test.ts => annotations.xy.cy.ts} (96%) rename cypress/e2e/shared/{arduino.test.ts => arduino.cy.ts} (100%) rename cypress/e2e/shared/{buckets.test.ts => buckets.cy.ts} (100%) rename cypress/e2e/shared/{checks.test.ts => checks.cy.ts} (100%) rename cypress/e2e/shared/{dashboardsIndex.test.ts => dashboardsIndex.cy.ts} (100%) rename cypress/e2e/shared/{dashboardsRefresh.test.ts => dashboardsRefresh.cy.ts} (100%) rename cypress/e2e/shared/{dashboardsVariables.test.ts => dashboardsVariables.cy.ts} (100%) rename cypress/e2e/shared/{dashboardsView.test.ts => dashboardsView.cy.ts} (100%) rename cypress/e2e/shared/{editor.test.ts => editor.cy.ts} (100%) rename cypress/e2e/shared/{explorer.test.ts => explorer.cy.ts} (100%) rename cypress/e2e/shared/{explorerVisualizations.test.ts => explorerVisualizations.cy.ts} (100%) rename cypress/e2e/shared/{firstmile.tests.ts => firstmile.tests.cy.ts} (100%) rename cypress/e2e/shared/{flows.test.ts => flows.cy.ts} (100%) rename cypress/e2e/shared/{flowsAlerts.test.ts => flowsAlerts.cy.ts} (100%) rename cypress/e2e/shared/{flowsSidebarExportToClipboard.test.ts => flowsSidebarExportToClipboard.cy.ts} (100%) rename cypress/e2e/shared/{fluxQueryBuilder.test.ts => fluxQueryBuilder.cy.ts} (100%) rename cypress/e2e/shared/{helpBar.test.ts => helpBar.cy.ts} (100%) rename cypress/e2e/shared/{home.test.ts => home.cy.ts} (100%) rename cypress/e2e/shared/{influxCLI.test.ts => influxCLI.cy.ts} (100%) rename cypress/e2e/shared/{labels.test.ts => labels.cy.ts} (100%) rename cypress/e2e/shared/{legends.test.ts => legends.cy.ts} (100%) rename cypress/e2e/shared/{loadDataSources.test.ts => loadDataSources.cy.ts} (100%) rename cypress/e2e/shared/{login.test.ts => login.cy.ts} (100%) rename cypress/e2e/shared/{nav.test.ts => nav.cy.ts} (100%) rename cypress/e2e/shared/{notificationEndpoints.test.ts => notificationEndpoints.cy.ts} (100%) rename cypress/e2e/shared/{notificationRules.test.ts => notificationRules.cy.ts} (100%) rename cypress/e2e/shared/{queryBuilder.test.ts => queryBuilder.cy.ts} (100%) rename cypress/e2e/shared/{secrets.test.ts => secrets.cy.ts} (100%) rename cypress/e2e/shared/{simpleTable.test.ts => simpleTable.cy.ts} (100%) rename cypress/e2e/shared/{tasks.test.ts => tasks.cy.ts} (100%) rename cypress/e2e/shared/{tasks.pagination.test.ts => tasks.pagination.cy.ts} (100%) rename cypress/e2e/shared/{telegrafPlugins.test.ts => telegrafPlugins.cy.ts} (100%) rename cypress/e2e/shared/{telegrafs.test.ts => telegrafs.cy.ts} (100%) rename cypress/e2e/shared/{tokens.test.ts => tokens.cy.ts} (100%) rename cypress/e2e/shared/{variables.test.ts => variables.cy.ts} (100%) rename cypress/support/{index.js => e2e.js} (93%) rename cypress/{e2e/util/annotationsSetup.ts => util/annotationsSetup.cy.ts} (95%) 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/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 100% rename from cypress/e2e/cloud/dashboardsView.test.ts rename to cypress/e2e/cloud/dashboardsView.cy.ts 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 100% rename from cypress/e2e/cloud/flows.test.ts rename to cypress/e2e/cloud/flows.cy.ts 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 100% rename from cypress/e2e/cloud/operator.test.ts rename to cypress/e2e/cloud/operator.cy.ts 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 98% rename from cypress/e2e/shared/annotations.range.test.ts rename to cypress/e2e/shared/annotations.range.cy.ts index 16f5a54d40..aefbecaea8 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 @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/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.cy.ts similarity index 95% rename from cypress/e2e/util/annotationsSetup.ts rename to cypress/util/annotationsSetup.cy.ts index 5d228bca8d..1110ebde79 100644 --- a/cypress/e2e/util/annotationsSetup.ts +++ b/cypress/util/annotationsSetup.cy.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 @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 @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 @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 @typescript-eslint/unbound-method expect($el).not.to.be.disabled }) .click() diff --git a/docker/Dockerfile.cypress b/docker/Dockerfile.cypress index 40d8739d3b..c3378bd3ab 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-bare 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" From 1e5228d117340cd3de34d3fbf68b185a07831c38 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 08:55:50 -0800 Subject: [PATCH 02/12] test: point to monitor-ci feature branch to validate --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e27d27bcb618d464e3fc5d874d7f49cc7f3ff501 Mon Sep 17 00:00:00 2001 From: Gene Hynson Date: Tue, 8 Nov 2022 12:06:49 -0800 Subject: [PATCH 03/12] fix: use included image --- docker/Dockerfile.cypress | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.cypress b/docker/Dockerfile.cypress index c3378bd3ab..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:10.11.0-bare +FROM quay.io/influxdb/cypress-slim:10.11.0-included WORKDIR /repo From 9c0ccbb23fe7b8d9336dcc5c5714ee6ff32af745 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 13:38:25 -0800 Subject: [PATCH 04/12] fix: update eslint for Cypress test files v10 --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'], From 787e751d857d68a8ddc43be0185d588ac9802e88 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 13:44:45 -0800 Subject: [PATCH 05/12] revert: go back to ignoring jest lint rule --- cypress/e2e/shared/annotations.range.cy.ts | 2 +- cypress/util/annotationsSetup.cy.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/shared/annotations.range.cy.ts b/cypress/e2e/shared/annotations.range.cy.ts index aefbecaea8..ef8cbb8b2e 100644 --- a/cypress/e2e/shared/annotations.range.cy.ts +++ b/cypress/e2e/shared/annotations.range.cy.ts @@ -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 @typescript-eslint/unbound-method + // eslint-disable-next-line jest/unbound-method expect($el).not.to.be.disabled }) .click() diff --git a/cypress/util/annotationsSetup.cy.ts b/cypress/util/annotationsSetup.cy.ts index 1110ebde79..cb108fa0f2 100644 --- a/cypress/util/annotationsSetup.cy.ts +++ b/cypress/util/annotationsSetup.cy.ts @@ -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 @typescript-eslint/unbound-method + // eslint-disable-next-line jest/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 @typescript-eslint/unbound-method + // eslint-disable-next-line jest/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 @typescript-eslint/unbound-method + // eslint-disable-next-line jest/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 @typescript-eslint/unbound-method + // eslint-disable-next-line jest/unbound-method expect($el).not.to.be.disabled }) .click() From 44e01e60aee98993dbe1145d81a7157af873a77b Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 13:51:43 -0800 Subject: [PATCH 06/12] fix: name the annotations setup file correctly --- cypress/util/{annotationsSetup.cy.ts => annotationsSetup.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cypress/util/{annotationsSetup.cy.ts => annotationsSetup.ts} (100%) diff --git a/cypress/util/annotationsSetup.cy.ts b/cypress/util/annotationsSetup.ts similarity index 100% rename from cypress/util/annotationsSetup.cy.ts rename to cypress/util/annotationsSetup.ts From 2eeb6541732e7798f37d37e69a445ebe34150bae Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 14:24:31 -0800 Subject: [PATCH 07/12] revert: ok fine, ignore both rules, sheesh --- cypress/e2e/shared/annotations.range.cy.ts | 2 +- cypress/util/annotationsSetup.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/shared/annotations.range.cy.ts b/cypress/e2e/shared/annotations.range.cy.ts index ef8cbb8b2e..912bf1e581 100644 --- a/cypress/e2e/shared/annotations.range.cy.ts +++ b/cypress/e2e/shared/annotations.range.cy.ts @@ -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/util/annotationsSetup.ts b/cypress/util/annotationsSetup.ts index cb108fa0f2..261f17eefc 100644 --- a/cypress/util/annotationsSetup.ts +++ b/cypress/util/annotationsSetup.ts @@ -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() From fffe4041fba898f8d684a7421934a9baaf1dedc4 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Tue, 8 Nov 2022 17:31:58 -0800 Subject: [PATCH 08/12] chore: delete original copy of renamed file --- cypress.json | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 cypress.json 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 -} From 705053f4c04943a7a2f71d788f84fa03dd435a98 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Wed, 9 Nov 2022 16:34:35 -0800 Subject: [PATCH 09/12] feat: add chunk loading error to the ignore list to prevent test failure --- cypress/support/commands.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') ) }) From 07a2b190720aafa7df9b2a83bed774996f4d10f8 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Wed, 9 Nov 2022 17:10:02 -0800 Subject: [PATCH 10/12] test: update dashboardsView tests --- cypress/e2e/cloud/dashboardsView.cy.ts | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/cypress/e2e/cloud/dashboardsView.cy.ts b/cypress/e2e/cloud/dashboardsView.cy.ts index 154e447376..c02c413506 100644 --- a/cypress/e2e/cloud/dashboardsView.cy.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) }) }) From 41cf8dbed40f9dd26d445847cb021f6996951546 Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Wed, 9 Nov 2022 17:45:24 -0800 Subject: [PATCH 11/12] test: update cloud flows tests --- cypress/e2e/cloud/flows.cy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cypress/e2e/cloud/flows.cy.ts b/cypress/e2e/cloud/flows.cy.ts index bda0627c30..8f2f7e68dd 100644 --- a/cypress/e2e/cloud/flows.cy.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() From 7e35fcb8551335a07214cc23f79e17ca9070a83e Mon Sep 17 00:00:00 2001 From: Timmy Luong Date: Wed, 9 Nov 2022 18:31:50 -0800 Subject: [PATCH 12/12] test: update cloud operator tests --- cypress/e2e/cloud/operator.cy.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/cloud/operator.cy.ts b/cypress/e2e/cloud/operator.cy.ts index 16e1f2d8eb..9f24b554cd 100644 --- a/cypress/e2e/cloud/operator.cy.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')