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

Reorganize cypress to prepare for playwright #11926

Merged
merged 3 commits into from
Nov 15, 2024
Merged
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/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ jobs:
- name: Run Cypress Tests
uses: cypress-io/github-action@v6
with:
working-directory: tests/cypress
working-directory: tests
spec: |
e2e/*.cy.js
e2e/admin/*.cy.js
e2e/mcpar/*.cy.js
e2e/mlr/*.cy.js
cypress/e2e/*.cy.js
cypress/e2e/admin/*.cy.js
cypress/e2e/mcpar/*.cy.js
cypress/e2e/mlr/*.cy.js
browser: chrome
config: baseUrl=${{ needs.deploy.outputs.application_endpoint }}
wait-on: ${{ needs.deploy.outputs.application_endpoint }}
Expand Down Expand Up @@ -257,8 +257,8 @@ jobs:
- name: Check Project A11y
uses: cypress-io/github-action@v6
with:
working-directory: tests/cypress
spec: e2e/accessibility/*.cy.js
working-directory: tests
spec: cypress/e2e/accessibility/*.cy.js
browser: chrome
config: baseUrl=${{ needs.deploy.outputs.application_endpoint }}
wait-on: ${{ needs.deploy.outputs.application_endpoint }}
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ tests_output
tests/cypress/videos
tests/cypress/screenshots
tests/cypress/downloads
tests/cypress/package-lock.json
package-lock.json
.vscode/
*._S3rver_cors.xml
services/database/local_buckets
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"test": "tests"
},
"scripts": {
"test": "cd tests/cypress && npm test && cd -",
"test:ci": "cd tests/cypress && yarn run test:ci"
"test": "cd tests && npm test && cd -",
"test:ci": "cd tests && yarn run test:ci"
},
"repository": {
"type": "git",
Expand Down
File renamed without changes.
9 changes: 2 additions & 7 deletions tests/cypress/cypress.config.js → tests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
const { defineConfig } = require("cypress");
const { pa11y, prepareAudit } = require("@cypress-audit/pa11y");
require("dotenv").config({ path: "../../.env" });
require("dotenv").config({ path: "../.env" });

module.exports = defineConfig({
experimentalStudio: true,
redirectionLimit: 20,
retries: 2,
watchForFileChanges: true,
fixturesFolder: "fixtures",
screenshotsFolder: "screenshots",
videosFolder: "videos",
downloadsFolder: "downloads",
types: ["cypress", "cypress-axe"],
env: {
STATE_USER_EMAIL: process.env.CYPRESS_STATE_USER_EMAIL,
Expand All @@ -23,8 +19,7 @@ module.exports = defineConfig({
e2e: {
baseUrl: "http://localhost:3000/",
testIsolation: false,
specPattern: ["e2e/**/*.cy.js"],
supportFile: "support/index.js",
supportFile: "cypress/support/index.js",
async setupNodeEvents(on, config) {
on("task", {
log(message) {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/package.json → tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "cd ../../ && ./run local && cd -",
"start": "cd ../ && ./run local && cd -",
"cypress": "cypress open",
"test": "concurrently --kill-others \"yarn start\" \"yarn cypress\"",
"test:ci": "cypress install && cypress run --browser chrome --headless"
Expand Down
File renamed without changes.