From bbf366368fc94540ee71740b9e0a506da6a1e4a5 Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Mon, 28 Nov 2022 15:32:09 +0000 Subject: [PATCH] Update to Cypress v11 --- package-lock.json | 16 +-- packages/e2e/cypress.config.js | 1 + .../cypress/e2e/run/create-pipelinerun.cy.js | 97 +++++++++---------- packages/e2e/package.json | 2 +- 4 files changed, 57 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6964c79e..b6ca51bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16893,9 +16893,9 @@ "dev": true }, "node_modules/cypress": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.10.0.tgz", - "integrity": "sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -34624,7 +34624,7 @@ "version": "0.31.0-alpha.0", "license": "Apache-2.0", "devDependencies": { - "cypress": "^10.10.0" + "cypress": "^11.2.0" }, "engines": { "node": "^16.18.1", @@ -43322,7 +43322,7 @@ "@tektoncd/dashboard-e2e": { "version": "file:packages/e2e", "requires": { - "cypress": "^10.10.0" + "cypress": "11.2.0" } }, "@tektoncd/dashboard-graph": { @@ -47462,9 +47462,9 @@ "dev": true }, "cypress": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.10.0.tgz", - "integrity": "sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", diff --git a/packages/e2e/cypress.config.js b/packages/e2e/cypress.config.js index 2cf3451d3..1a9316a05 100644 --- a/packages/e2e/cypress.config.js +++ b/packages/e2e/cypress.config.js @@ -19,6 +19,7 @@ const isCI = process.env.CI === 'true'; module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:8000', + experimentalRunAllSpecs: true, // experimentalSessionAndOrigin: true, // default is false experimentalStudio: true, setupNodeEvents(on, _config) { diff --git a/packages/e2e/cypress/e2e/run/create-pipelinerun.cy.js b/packages/e2e/cypress/e2e/run/create-pipelinerun.cy.js index 80abcbd1f..eec8ff63a 100644 --- a/packages/e2e/cypress/e2e/run/create-pipelinerun.cy.js +++ b/packages/e2e/cypress/e2e/run/create-pipelinerun.cy.js @@ -26,22 +26,21 @@ describe('Create Pipeline Run', () => { const uniqueNumber = Date.now(); const pipelineName = `simple-pipeline-${uniqueNumber}`; - const pipeline = ` - apiVersion: tekton.dev/v1beta1 - kind: Pipeline - metadata: - name: ${pipelineName} - namespace: ${namespace} - spec: - tasks: - - name: hello - taskSpec: - steps: - - name: echo - image: busybox - script: | - #!/bin/ash - echo "Hello World!" + const pipeline = `apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: ${pipelineName} + namespace: ${namespace} +spec: + tasks: + - name: hello + taskSpec: + steps: + - name: echo + image: busybox + script: | + #!/bin/ash + echo "Hello World!" `; cy.exec(`echo "${pipeline}" | kubectl apply -f -`); cy.visit( @@ -69,23 +68,22 @@ describe('Create Pipeline Run', () => { const uniqueNumber = Date.now(); const pipelineRunName = `yaml-mode-${uniqueNumber}`; - const pipelineRun = ` - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - name: ${pipelineRunName} - namespace: ${namespace} - spec: - pipelineSpec: - tasks: - - name: hello - taskSpec: - steps: - - name: echo - image: busybox - script: | - #!/bin/ash - echo "Hello World!" + const pipelineRun = `apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: ${pipelineRunName} + namespace: ${namespace} +spec: + pipelineSpec: + tasks: + - name: hello + taskSpec: + steps: + - name: echo + image: busybox + script: | + #!/bin/ash + echo "Hello World!" `; cy.visit(`/#/pipelineruns/create`); @@ -107,23 +105,22 @@ describe('Create Pipeline Run', () => { const uniqueNumber = Date.now(); const pipelineRunName = `yaml-mode-${uniqueNumber}`; - const pipelineRun = ` - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - name: ${pipelineRunName} - namespace: ${namespace} - spec: - pipelineSpec: - tasks: - - name: hello - taskSpec: - steps: - - name: echo - image: busybox - script: | - #!/bin/ash - echo "Hello World!" + const pipelineRun = `apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: ${pipelineRunName} + namespace: ${namespace} +spec: + pipelineSpec: + tasks: + - name: hello + taskSpec: + steps: + - name: echo + image: busybox + script: | + #!/bin/ash + echo "Hello World!" `; cy.visit(`/#/pipelineruns/create?mode=yaml`); diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 099b130e5..b150ed707 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -17,7 +17,7 @@ "test:ci": "cypress run" }, "devDependencies": { - "cypress": "^10.10.0" + "cypress": "^11.2.0" }, "engines": { "node": "^16.18.1",