Skip to content

Commit

Permalink
executor tests - cypress 13 project and tests (#4615)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkonieczny authored Nov 29, 2023
1 parent 0717e0b commit 4e502a6
Show file tree
Hide file tree
Showing 14 changed files with 2,195 additions and 2 deletions.
94 changes: 94 additions & 0 deletions test/cypress/executor-tests/crd/crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,97 @@
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: cypress-13-executor-smoke-electron
labels:
core-tests: executors
spec:
type: cypress:v13/test
content:
type: git
repository:
type: git
uri: https://github.com/kubeshop/testkube
branch: main
path: test/cypress/executor-tests/cypress-13
executionRequest:
variables:
CYPRESS_CUSTOM_ENV:
name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
type: basic
args:
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- video=false
jobTemplate: "apiVersion: batch/v1\nkind: Job\nspec:\n template:\n spec:\n containers:\n - name: \"{{ .Name }}\"\n image: {{ .Image }}\n resources:\n requests:\n memory: 2Gi\n cpu: 2\n"
activeDeadlineSeconds: 600
---
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: cypress-13-executor-smoke-chrome
labels:
core-tests: executors
spec:
type: cypress:v13/test
content:
type: git
repository:
type: git
uri: https://github.com/kubeshop/testkube
branch: main
path: test/cypress/executor-tests/cypress-13
executionRequest:
variables:
CYPRESS_CUSTOM_ENV:
name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
type: basic
args:
- --browser
- chrome
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- video=false
jobTemplate: "apiVersion: batch/v1\nkind: Job\nspec:\n template:\n spec:\n containers:\n - name: \"{{ .Name }}\"\n image: {{ .Image }}\n resources:\n requests:\n memory: 2Gi\n cpu: 2\n"
activeDeadlineSeconds: 600
---
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: cypress-13-executor-smoke-firefox
labels:
core-tests: executors
spec:
type: cypress:v13/test
content:
type: git
repository:
type: git
uri: https://github.com/kubeshop/testkube
branch: main
path: test/cypress/executor-tests/cypress-13
executionRequest:
variables:
CYPRESS_CUSTOM_ENV:
name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
type: basic
args:
- --browser
- chrome
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- video=false
jobTemplate: "apiVersion: batch/v1\nkind: Job\nspec:\n template:\n spec:\n containers:\n - name: \"{{ .Name }}\"\n image: {{ .Image }}\n resources:\n requests:\n memory: 2Gi\n cpu: 2\n"
activeDeadlineSeconds: 600
---



apiVersion: tests.testkube.io/v3
kind: Test
metadata:
Expand Down
3 changes: 3 additions & 0 deletions test/cypress/executor-tests/cypress-13/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
cypress/videos/**
cypress/screenshots/**
7 changes: 7 additions & 0 deletions test/cypress/executor-tests/cypress-13/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
e2e: {
baseUrl: 'https://testkube.kubeshop.io/'
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
describe('Smoke test', () => {
it(`Validate CYPRESS_CUSTOM_ENV ENV (${Cypress.env('CUSTOM_ENV')})`, () => {
expect('CYPRESS_CUSTOM_ENV_value').to.equal(Cypress.env('CUSTOM_ENV')) //CYPRESS_CUSTOM_ENV - "cypress" prefix - auto-loaded from global ENVs
})
it(`Validate NON_CYPRESS_ENV ENV (${Cypress.env('NON_CYPRESS_ENV')})`, () => {
expect('NON_CYPRESS_ENV_value').to.equal(Cypress.env('NON_CYPRESS_ENV')) //NON_CYPRESS_ENV - need to be loaded with --env parameter
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('Smoke test 2', () => {
it(`expect 1=1`, () => {
expect('1').to.equal('1')
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
Loading

0 comments on commit 4e502a6

Please sign in to comment.