Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumping Cypress to v10.11.0 #266

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/master_rancher_ui_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ jobs:
browser: ${{ inputs.browser }}
headless: true
spec: |
cypress/integration/unit_tests/first_connexion.spec.ts
cypress/integration/unit_tests/${{ inputs.cypress_install_test }}
config-file: cypress-with-epinio-cert.json
cypress/e2e/unit_tests/first_connexion.spec.ts
cypress/e2e/unit_tests/${{ inputs.cypress_install_test }}
config-file: cypress.config.ts

- name: Copying screenshots and videos to Mochawesome report
if: always()
Expand Down Expand Up @@ -217,8 +217,8 @@ jobs:
browser: ${{ inputs.browser }}
headless: true
spec: |
cypress/integration/unit_tests/${{ inputs.cypress_test }}
config-file: cypress-with-epinio-cert.json
cypress/e2e/unit_tests/${{ inputs.cypress_test }}
config-file: cypress.config.ts

- name: Copying screenshots and videos to Mochawesome report
if: always()
Expand Down Expand Up @@ -277,8 +277,8 @@ jobs:
browser: ${{ inputs.browser }}
headless: true
spec: |
cypress/integration/unit_tests/uninstall.spec.ts
config-file: cypress-with-epinio-cert.json
cypress/e2e/unit_tests/uninstall.spec.ts
config-file: cypress.config.ts

- name: Copying screenshots and videos to Mochawesome report
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master_std_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Start Cypress tests
env:
BROWSER: ${{ inputs.browser }}
CYPRESS_CFG: cypress-with-epinio-cert.json
CYPRESS_CFG: cypress.config.ts
CYPRESS_DOCKER: ${{ inputs.cypress_docker }}
DOCKER_OPTIONS: ${{ inputs.docker_options }}
EXT_REG_USER: ${{ secrets.EPINIO_DOCKER_USER }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/std_ui_latest_chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ jobs:
with:
browser: chrome
cypress_docker: cypress/included:9.7.0
cypress_spec: cypress/integration/unit_tests/menu.spec.ts
cypress_spec: cypress/e2e/unit_tests/menu.spec.ts
secrets: inherit

configurations-tests:
uses: ./.github/workflows/master_std_ui.yml
with:
browser: chrome
cypress_docker: cypress/included:9.7.0
cypress_spec: cypress/integration/unit_tests/configurations.spec.ts
cypress_spec: cypress/e2e/unit_tests/configurations.spec.ts
secrets: inherit

applications-tests:
uses: ./.github/workflows/master_std_ui.yml
with:
browser: chrome
cypress_docker: cypress/included:9.7.0
cypress_spec: cypress/integration/unit_tests/applications.spec.ts
cypress_spec: cypress/e2e/unit_tests/applications.spec.ts
secrets: inherit

namespaces-tests:
uses: ./.github/workflows/master_std_ui.yml
with:
browser: chrome
cypress_docker: cypress/included:9.7.0
cypress_spec: cypress/integration/unit_tests/namespaces.spec.ts
cypress_spec: cypress/e2e/unit_tests/namespaces.spec.ts
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/std_ui_latest_firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
#with:
#browser: firefox
#cypress_docker: cypress/included:9.7.0
#cypress_spec: cypress/integration/unit_tests/menu.spec.ts
#cypress_spec: cypress/e2e/unit_tests/menu.spec.ts
#docker_options: '--user 1000'
#ext_reg: '1'
#s3: '1'
Expand All @@ -31,7 +31,7 @@ jobs:
#with:
#browser: firefox
#cypress_docker: cypress/included:9.7.0
#cypress_spec: cypress/integration/unit_tests/configurations.spec.ts
#cypress_spec: cypress/e2e/unit_tests/configurations.spec.ts
#docker_options: '--user 1000'
#ext_reg: '1'
#s3: '1'
Expand All @@ -42,7 +42,7 @@ jobs:
#with:
#browser: firefox
#cypress_docker: cypress/included:9.7.0
#cypress_spec: cypress/integration/unit_tests/applications.spec.ts
#cypress_spec: cypress/e2e/unit_tests/applications.spec.ts
#docker_options: '--user 1000'
#ext_reg: '1'
#s3: '1'
Expand All @@ -53,7 +53,7 @@ jobs:
with:
browser: firefox
cypress_docker: cypress/included:9.7.0
cypress_spec: cypress/integration/unit_tests/namespaces.spec.ts
cypress_spec: cypress/e2e/unit_tests/namespaces.spec.ts
docker_options: '--user 1000'
ext_reg: '1'
s3: '1'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM cypress/base:16.13.0

COPY cypress.json .
COPY cypress.config.ts .
COPY tsconfig.json .
COPY package.json .
COPY ./cypress/ cypress
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ build-image: ## Build the e2e_image with latest tests version

cypress-gui: ## Start Cypress in GUI mode, need graphical environment
npm install
./node_modules/cypress/bin/cypress open -C cypress-with-epinio-cert.json
./node_modules/cypress/bin/cypress open -C cypress.config.ts

check-dependencies:
command -v docker && echo "docker - ok"
Expand Down
32 changes: 0 additions & 32 deletions cypress-with-epinio-cert.json

This file was deleted.

34 changes: 34 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { defineConfig } from 'cypress'

// export default defineConfig({
export default defineConfig({
defaultCommandTimeout: 10000,
numTestsKeptInMemory:25,
reporter: 'mochawesome',
reporterOptions: {
reportFilename: '[name]-report_[status]_[datetime]',
timestamp: 'shortDate',
},
clientCertificates: [
{
url: 'https://*',
ca: [],
certs: [
{
cert: 'cypress/fixtures/epinio-private-cert-pem.file',
key: 'cypress/fixtures/epinio-private-key-pem.file',
},
],
},
],
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.ts')(on, config)
},
experimentalSessionAndOrigin: true,
specPattern:
'cypress/e2e/unit_tests/*.spec.ts',
},
})
27 changes: 0 additions & 27 deletions cypress.json

This file was deleted.

File renamed without changes.
50 changes: 26 additions & 24 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "epinio-end-to-end-tests",
"version": "1.0.0",
"description": "Cypress tests to test the Epinio UI",
"main": "index.js",
"main": "index.ts",
"directories": {
"doc": "docs"
},
Expand All @@ -21,13 +21,13 @@
},
"homepage": "https://github.com/epinio/epinio-end-to-end-tests#readme",
"dependencies": {
"cypress": "^9.2.0",
"cypress-dark": "^1.8.3",
"cypress-file-upload": "^5.0.8",
"dotenv": "^10.0.0",
"typescript": "^4.5.2"
"dotenv": "^10.0.0"
},
"devDependencies": {
"mochawesome": "^7.1.3"
"cypress": "^10.11.0",
"mochawesome": "^7.1.3",
"typescript": "^4.8.4"
}
}
4 changes: 2 additions & 2 deletions scripts/get_ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ for I in crt key; do
FILE="${DATA_PATH}/${CA_NAME}-${I}-pem.file"
echo "${VALUE}" > ${FILE}

# And update cypress.json
sed -i "s|%${I}%|${FILE}|g" cypress.json
# And update cypress.config.ts
sed -i "s|%${I}%|${FILE}|g" cypress.config.ts
done
3 changes: 2 additions & 1 deletion scripts/start_cypress_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ docker run -v $PWD:/e2e -w /e2e \
$CYPRESS_DOCKER \
-C /e2e/$CYPRESS_CFG \
-b $BROWSER \
-s /e2e/$SPEC
# -s /e2e/$SPEC
-s $SPEC