Skip to content

Commit

Permalink
Update to Cypress v11
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGreene authored and tekton-robot committed Nov 29, 2022
1 parent b642fce commit bbf3663
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 59 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
97 changes: 47 additions & 50 deletions packages/e2e/cypress/e2e/run/create-pipelinerun.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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`);

Expand All @@ -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`);

Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:ci": "cypress run"
},
"devDependencies": {
"cypress": "^10.10.0"
"cypress": "^11.2.0"
},
"engines": {
"node": "^16.18.1",
Expand Down

0 comments on commit bbf3663

Please sign in to comment.