From 7c0ef58b85cb5f3d256d9761e3e3e932b73c6594 Mon Sep 17 00:00:00 2001 From: Douglas Duteil Date: Wed, 14 Aug 2024 15:15:58 +0200 Subject: [PATCH] test(e2e): group test in folders (#656) --- .github/workflows/end-to-end.yml | 30 +++++++++---------- .gitignore | 2 ++ cypress/README.md | 14 ++------- .../activate_totp/env.conf} | 0 .../activate_totp/fixtures.sql} | 0 .../index.cy.js} | 0 .../check_email_deliverability/env.conf} | 0 .../check_email_deliverability/fixtures.sql} | 0 .../index.cy.js} | 0 .../delete_account/env.conf} | 0 .../delete_account/fixtures.sql} | 0 .../index.cy.js} | 0 .../delete_totp/env.conf} | 0 .../delete_totp/fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../join_must_confirm/env.conf} | 0 .../join_must_confirm/fixtures.sql} | 0 .../index.cy.js} | 0 .../join_org_with_gouv_fr_domain/env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../join_org_with_verified_domain/env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 2 +- .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 2 +- .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../join_with_sponsorship/env.conf} | 0 .../join_with_sponsorship/fixtures.sql} | 0 .../index.cy.js} | 0 .../reauthenticate_on_admin_page/env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../reset_password/env.conf} | 0 .../reset_password/fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 2 +- .../signin_from_agentconnect_client/env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 0 .../signin_from_legacy_client/env.conf} | 0 .../signin_from_legacy_client/fixtures.sql} | 0 .../index.cy.js} | 0 .../signin_from_standard_client/env.conf} | 0 .../signin_from_standard_client/fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 2 +- .../signin_with_magic_link/env.conf} | 0 .../signin_with_magic_link/fixtures.sql} | 0 .../index.cy.js} | 2 +- .../signin_with_totp/env.conf} | 0 .../signin_with_totp/fixtures.sql} | 0 .../index.cy.js} | 0 .../env.conf} | 0 .../fixtures.sql} | 0 .../index.cy.js} | 2 +- .../update_personal_information/env.conf} | 0 .../update_personal_information/fixtures.sql} | 0 .../index.cy.js} | 0 .../update_totp_application/env.conf} | 0 .../update_totp_application/fixtures.sql} | 0 .../index.cy.js} | 0 package.json | 3 ++ 82 files changed, 29 insertions(+), 32 deletions(-) rename cypress/{env/activate_totp.conf => e2e/activate_totp/env.conf} (100%) rename cypress/{fixtures/activate_totp.sql => e2e/activate_totp/fixtures.sql} (100%) rename cypress/e2e/{activate_totp.cy.js => activate_totp/index.cy.js} (100%) rename cypress/{env/check_email_deliverability.conf => e2e/check_email_deliverability/env.conf} (100%) rename cypress/{fixtures/check_email_deliverability.sql => e2e/check_email_deliverability/fixtures.sql} (100%) rename cypress/e2e/{check_email_deliverability.cy.js => check_email_deliverability/index.cy.js} (100%) rename cypress/{env/delete_account.conf => e2e/delete_account/env.conf} (100%) rename cypress/{fixtures/delete_account.sql => e2e/delete_account/fixtures.sql} (100%) rename cypress/e2e/{delete_account.cy.js => delete_account/index.cy.js} (100%) rename cypress/{env/delete_totp.conf => e2e/delete_totp/env.conf} (100%) rename cypress/{fixtures/delete_totp.sql => e2e/delete_totp/fixtures.sql} (100%) rename cypress/e2e/{delete_totp.cy.js => delete_totp/index.cy.js} (100%) rename cypress/{env/join_collectivite_territoriale_official_contact_domain.conf => e2e/join_collectivite_territoriale_official_contact_domain/env.conf} (100%) rename cypress/{fixtures/join_collectivite_territoriale_official_contact_domain.sql => e2e/join_collectivite_territoriale_official_contact_domain/fixtures.sql} (100%) rename cypress/e2e/{join_collectivite_territoriale_official_contact_domain.cy.js => join_collectivite_territoriale_official_contact_domain/index.cy.js} (100%) rename cypress/{env/join_must_confirm.conf => e2e/join_must_confirm/env.conf} (100%) rename cypress/{fixtures/join_must_confirm.sql => e2e/join_must_confirm/fixtures.sql} (100%) rename cypress/e2e/{join_must_confirm.cy.js => join_must_confirm/index.cy.js} (100%) rename cypress/{env/join_org_with_gouv_fr_domain.conf => e2e/join_org_with_gouv_fr_domain/env.conf} (100%) rename cypress/{fixtures/join_org_with_gouv_fr_domain.sql => e2e/join_org_with_gouv_fr_domain/fixtures.sql} (100%) rename cypress/e2e/{join_org_with_gouv_fr_domain.cy.js => join_org_with_gouv_fr_domain/index.cy.js} (100%) rename cypress/{env/join_org_with_trackdechets_domain.conf => e2e/join_org_with_trackdechets_domain/env.conf} (100%) rename cypress/{fixtures/join_org_with_trackdechets_domain.sql => e2e/join_org_with_trackdechets_domain/fixtures.sql} (100%) rename cypress/e2e/{join_org_with_trackdechets_domain.cy.js => join_org_with_trackdechets_domain/index.cy.js} (100%) rename cypress/{env/join_org_with_verified_domain.conf => e2e/join_org_with_verified_domain/env.conf} (100%) rename cypress/{fixtures/join_org_with_verified_domain.sql => e2e/join_org_with_verified_domain/fixtures.sql} (100%) rename cypress/e2e/{join_org_with_verified_domain.cy.js => join_org_with_verified_domain/index.cy.js} (100%) rename cypress/{env/join_with_code_sent_to_official_contact_email.conf => e2e/join_with_code_sent_to_official_contact_email/env.conf} (100%) rename cypress/{fixtures/join_with_code_sent_to_official_contact_email.sql => e2e/join_with_code_sent_to_official_contact_email/fixtures.sql} (100%) rename cypress/e2e/{join_with_code_sent_to_official_contact_email.cy.js => join_with_code_sent_to_official_contact_email/index.cy.js} (96%) rename cypress/{env/join_with_code_sent_to_official_educ_nat_contact_email.conf => e2e/join_with_code_sent_to_official_educ_nat_contact_email/env.conf} (100%) rename cypress/{fixtures/join_with_code_sent_to_official_educ_nat_contact_email.sql => e2e/join_with_code_sent_to_official_educ_nat_contact_email/fixtures.sql} (100%) rename cypress/e2e/{join_with_code_sent_to_official_educ_nat_contact_email.cy.js => join_with_code_sent_to_official_educ_nat_contact_email/index.cy.js} (96%) rename cypress/{env/join_with_official_contact_email.conf => e2e/join_with_official_contact_email/env.conf} (100%) rename cypress/{fixtures/join_with_official_contact_email.sql => e2e/join_with_official_contact_email/fixtures.sql} (100%) rename cypress/e2e/{join_with_official_contact_email.cy.js => join_with_official_contact_email/index.cy.js} (100%) rename cypress/{env/join_with_sponsorship.conf => e2e/join_with_sponsorship/env.conf} (100%) rename cypress/{fixtures/join_with_sponsorship.sql => e2e/join_with_sponsorship/fixtures.sql} (100%) rename cypress/e2e/{join_with_sponsorship.cy.js => join_with_sponsorship/index.cy.js} (100%) rename cypress/{env/reauthenticate_on_admin_page.conf => e2e/reauthenticate_on_admin_page/env.conf} (100%) rename cypress/{fixtures/reauthenticate_on_admin_page.sql => e2e/reauthenticate_on_admin_page/fixtures.sql} (100%) rename cypress/e2e/{reauthenticate_on_admin_page.cy.js => reauthenticate_on_admin_page/index.cy.js} (100%) rename cypress/{env/redirect_after_session_expiration.conf => e2e/redirect_after_session_expiration/env.conf} (100%) rename cypress/{fixtures/redirect_after_session_expiration.sql => e2e/redirect_after_session_expiration/fixtures.sql} (100%) rename cypress/e2e/{redirect_after_session_expiration.cy.js => redirect_after_session_expiration/index.cy.js} (100%) rename cypress/{env/reset_password.conf => e2e/reset_password/env.conf} (100%) rename cypress/{fixtures/reset_password.sql => e2e/reset_password/fixtures.sql} (100%) rename cypress/e2e/{reset_password.cy.js => reset_password/index.cy.js} (100%) rename cypress/{env/set_info_after_account_provisioning.conf => e2e/set_info_after_account_provisioning/env.conf} (100%) rename cypress/{fixtures/set_info_after_account_provisioning.sql => e2e/set_info_after_account_provisioning/fixtures.sql} (100%) rename cypress/e2e/{set_info_after_account_provisioning.cy.js => set_info_after_account_provisioning/index.cy.js} (96%) rename cypress/{env/signin_from_agentconnect_client.conf => e2e/signin_from_agentconnect_client/env.conf} (100%) rename cypress/{fixtures/signin_from_agentconnect_client.sql => e2e/signin_from_agentconnect_client/fixtures.sql} (100%) rename cypress/e2e/{signin_from_agentconnect_client.cy.js => signin_from_agentconnect_client/index.cy.js} (100%) rename cypress/{env/signin_from_legacy_client.conf => e2e/signin_from_legacy_client/env.conf} (100%) rename cypress/{fixtures/signin_from_legacy_client.sql => e2e/signin_from_legacy_client/fixtures.sql} (100%) rename cypress/e2e/{signin_from_legacy_client.cy.js => signin_from_legacy_client/index.cy.js} (100%) rename cypress/{env/signin_from_standard_client.conf => e2e/signin_from_standard_client/env.conf} (100%) rename cypress/{fixtures/signin_from_standard_client.sql => e2e/signin_from_standard_client/fixtures.sql} (100%) rename cypress/e2e/{signin_from_standard_client.cy.js => signin_from_standard_client/index.cy.js} (100%) rename cypress/{env/signin_with_email_verification_renewal.conf => e2e/signin_with_email_verification_renewal/env.conf} (100%) rename cypress/{fixtures/signin_with_email_verification_renewal.sql => e2e/signin_with_email_verification_renewal/fixtures.sql} (100%) rename cypress/e2e/{signin_with_email_verification_renewal.cy.js => signin_with_email_verification_renewal/index.cy.js} (95%) rename cypress/{env/signin_with_magic_link.conf => e2e/signin_with_magic_link/env.conf} (100%) rename cypress/{env/update_personal_information.conf => e2e/signin_with_magic_link/fixtures.sql} (100%) rename cypress/e2e/{signin_with_magic_link.cy.js => signin_with_magic_link/index.cy.js} (98%) rename cypress/{env/signin_with_totp.conf => e2e/signin_with_totp/env.conf} (100%) rename cypress/{fixtures/signin_with_totp.sql => e2e/signin_with_totp/fixtures.sql} (100%) rename cypress/e2e/{signin_with_totp.cy.js => signin_with_totp/index.cy.js} (100%) rename cypress/{env/signup_entreprise_unipersonnelle.conf => e2e/signup_entreprise_unipersonnelle/env.conf} (100%) rename cypress/{env/update_totp_application.conf => e2e/signup_entreprise_unipersonnelle/fixtures.sql} (100%) rename cypress/e2e/{signup_entreprise_unipersonnelle.cy.js => signup_entreprise_unipersonnelle/index.cy.js} (97%) rename cypress/{fixtures/signin_with_magic_link.sql => e2e/update_personal_information/env.conf} (100%) rename cypress/{fixtures/update_personal_information.sql => e2e/update_personal_information/fixtures.sql} (100%) rename cypress/e2e/{update_personal_information.cy.js => update_personal_information/index.cy.js} (100%) rename cypress/{fixtures/signup_entreprise_unipersonnelle.sql => e2e/update_totp_application/env.conf} (100%) rename cypress/{fixtures/update_totp_application.sql => e2e/update_totp_application/fixtures.sql} (100%) rename cypress/e2e/{update_totp_application.cy.js => update_totp_application/index.cy.js} (100%) diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index 74bdb70c..421b84b1 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -42,32 +42,32 @@ jobs: fail-fast: false matrix: e2e_test: + - activate_totp + - check_email_deliverability + - delete_account + - delete_totp - join_collectivite_territoriale_official_contact_domain - - join_org_with_verified_domain + - join_must_confirm - join_org_with_gouv_fr_domain - join_org_with_trackdechets_domain + - join_org_with_verified_domain - join_with_code_sent_to_official_contact_email - join_with_code_sent_to_official_educ_nat_contact_email - join_with_official_contact_email - join_with_sponsorship + - reauthenticate_on_admin_page + - redirect_after_session_expiration + - reset_password + - set_info_after_account_provisioning - signin_from_agentconnect_client - signin_from_legacy_client - signin_from_standard_client - signin_with_email_verification_renewal - signin_with_magic_link - - signup_entreprise_unipersonnelle - - redirect_after_session_expiration - - reset_password - - join_must_confirm - - set_info_after_account_provisioning - signin_with_totp - - reauthenticate_on_admin_page - - check_email_deliverability - - delete_account - - delete_totp - - update_totp_application - - activate_totp + - signup_entreprise_unipersonnelle - update_personal_information + - update_totp_application runs-on: ubuntu-22.04 services: moncomptepro-standard-client: @@ -129,16 +129,16 @@ jobs: node-version-file: package.json - run: npm ci --include=dev - run: npm run migrate up - - run: npm run fixtures:load-ci -- cypress/fixtures/${{ matrix.e2e_test }}.sql + - run: npm run fixtures:load-ci -- cypress/e2e/${{ matrix.e2e_test }}/fixtures.sql - run: npm run update-organization-info -- 500 - name: Cypress run uses: cypress-io/github-action@v6.7.2 with: wait-on: ${{ env.MONCOMPTEPRO_HOST }}/users/start-sign-in build: npm run build:assets - start: npx dotenvx run -f cypress/env/${{ matrix.e2e_test }}.conf --overload -- npm start + start: npx dotenvx run -f cypress/e2e/${{ matrix.e2e_test }}/env.conf --overload -- npm start install: false - spec: cypress/e2e/${{ matrix.e2e_test }}.cy.js + spec: cypress/e2e/${{ matrix.e2e_test }}/index.cy.js env: NODE_ENV: production # Store tests runs in case of failure diff --git a/.gitignore b/.gitignore index fcad12c9..bfc12690 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,10 @@ moncomptepro.conf .idea .vscode +cypress/downloads cypress/screenshots cypress/videos +!cypress/e2e/*/fixtures.sql /build/* !/build/.keep diff --git a/cypress/README.md b/cypress/README.md index 1a2c75fa..a9dffd52 100644 --- a/cypress/README.md +++ b/cypress/README.md @@ -1,13 +1,5 @@ # Run cypress locally -## Fast with a script - -You can use `./scripts/test.sh` to run tests locally. Run it to get usage help. You can either let the script run cypress tests by itself, or just use it to quickly prepare your local env with test-specific env/fixtures and do manual tests. - -The script will error out if it doesn’t find the necessary env vars. Ask a teammate for specific env vars and put the values in your `.env`. - -:information_source: By default, the script runs the test node server on port 3002. This is done so that you can keep your default local dev instance up while running the tests. - ## Step by step with command lines ### Setup env vars @@ -28,7 +20,7 @@ DO_NOT_RATE_LIMIT=True Note that this will delete your database. Load the specific fixtures in the database: ```bash -ENABLE_DATABASE_DELETION=True npx run-s delete-database "migrate up" "fixtures:load-ci cypress/fixtures/redirect_after_session_expiration.sql" "update-organization-info 2000" +ENABLE_DATABASE_DELETION=True npm run delete-database ; npx run-s "migrate up" "fixtures:load-ci cypress/e2e/redirect_after_session_expiration/fixtures.sql" "update-organization-info 2000" ``` ### Start MonComptePro with the test configuration @@ -36,7 +28,7 @@ ENABLE_DATABASE_DELETION=True npx run-s delete-database "migrate up" "fixtures:l Then run the app with the specific env vars: ```bash -npx dotenvx run -f cypress/env/redirect_after_session_expiration.conf -- npm run dev +npx dotenvx run -f cypress/e2e/redirect_after_session_expiration/env.conf -- npm run dev ``` ## Run Cypress @@ -45,7 +37,7 @@ On your host, run the tests ```bash export CYPRESS_MAILSLURP_API_KEY=ask_a_teammate -npx cypress run --headed --spec "cypress/e2e/redirect_after_session_expiration.cy.js" +npx cypress run --headed --spec "cypress/e2e/redirect_after_session_expiration/index.cy.js" ``` ## About test client used in e2e test diff --git a/cypress/env/activate_totp.conf b/cypress/e2e/activate_totp/env.conf similarity index 100% rename from cypress/env/activate_totp.conf rename to cypress/e2e/activate_totp/env.conf diff --git a/cypress/fixtures/activate_totp.sql b/cypress/e2e/activate_totp/fixtures.sql similarity index 100% rename from cypress/fixtures/activate_totp.sql rename to cypress/e2e/activate_totp/fixtures.sql diff --git a/cypress/e2e/activate_totp.cy.js b/cypress/e2e/activate_totp/index.cy.js similarity index 100% rename from cypress/e2e/activate_totp.cy.js rename to cypress/e2e/activate_totp/index.cy.js diff --git a/cypress/env/check_email_deliverability.conf b/cypress/e2e/check_email_deliverability/env.conf similarity index 100% rename from cypress/env/check_email_deliverability.conf rename to cypress/e2e/check_email_deliverability/env.conf diff --git a/cypress/fixtures/check_email_deliverability.sql b/cypress/e2e/check_email_deliverability/fixtures.sql similarity index 100% rename from cypress/fixtures/check_email_deliverability.sql rename to cypress/e2e/check_email_deliverability/fixtures.sql diff --git a/cypress/e2e/check_email_deliverability.cy.js b/cypress/e2e/check_email_deliverability/index.cy.js similarity index 100% rename from cypress/e2e/check_email_deliverability.cy.js rename to cypress/e2e/check_email_deliverability/index.cy.js diff --git a/cypress/env/delete_account.conf b/cypress/e2e/delete_account/env.conf similarity index 100% rename from cypress/env/delete_account.conf rename to cypress/e2e/delete_account/env.conf diff --git a/cypress/fixtures/delete_account.sql b/cypress/e2e/delete_account/fixtures.sql similarity index 100% rename from cypress/fixtures/delete_account.sql rename to cypress/e2e/delete_account/fixtures.sql diff --git a/cypress/e2e/delete_account.cy.js b/cypress/e2e/delete_account/index.cy.js similarity index 100% rename from cypress/e2e/delete_account.cy.js rename to cypress/e2e/delete_account/index.cy.js diff --git a/cypress/env/delete_totp.conf b/cypress/e2e/delete_totp/env.conf similarity index 100% rename from cypress/env/delete_totp.conf rename to cypress/e2e/delete_totp/env.conf diff --git a/cypress/fixtures/delete_totp.sql b/cypress/e2e/delete_totp/fixtures.sql similarity index 100% rename from cypress/fixtures/delete_totp.sql rename to cypress/e2e/delete_totp/fixtures.sql diff --git a/cypress/e2e/delete_totp.cy.js b/cypress/e2e/delete_totp/index.cy.js similarity index 100% rename from cypress/e2e/delete_totp.cy.js rename to cypress/e2e/delete_totp/index.cy.js diff --git a/cypress/env/join_collectivite_territoriale_official_contact_domain.conf b/cypress/e2e/join_collectivite_territoriale_official_contact_domain/env.conf similarity index 100% rename from cypress/env/join_collectivite_territoriale_official_contact_domain.conf rename to cypress/e2e/join_collectivite_territoriale_official_contact_domain/env.conf diff --git a/cypress/fixtures/join_collectivite_territoriale_official_contact_domain.sql b/cypress/e2e/join_collectivite_territoriale_official_contact_domain/fixtures.sql similarity index 100% rename from cypress/fixtures/join_collectivite_territoriale_official_contact_domain.sql rename to cypress/e2e/join_collectivite_territoriale_official_contact_domain/fixtures.sql diff --git a/cypress/e2e/join_collectivite_territoriale_official_contact_domain.cy.js b/cypress/e2e/join_collectivite_territoriale_official_contact_domain/index.cy.js similarity index 100% rename from cypress/e2e/join_collectivite_territoriale_official_contact_domain.cy.js rename to cypress/e2e/join_collectivite_territoriale_official_contact_domain/index.cy.js diff --git a/cypress/env/join_must_confirm.conf b/cypress/e2e/join_must_confirm/env.conf similarity index 100% rename from cypress/env/join_must_confirm.conf rename to cypress/e2e/join_must_confirm/env.conf diff --git a/cypress/fixtures/join_must_confirm.sql b/cypress/e2e/join_must_confirm/fixtures.sql similarity index 100% rename from cypress/fixtures/join_must_confirm.sql rename to cypress/e2e/join_must_confirm/fixtures.sql diff --git a/cypress/e2e/join_must_confirm.cy.js b/cypress/e2e/join_must_confirm/index.cy.js similarity index 100% rename from cypress/e2e/join_must_confirm.cy.js rename to cypress/e2e/join_must_confirm/index.cy.js diff --git a/cypress/env/join_org_with_gouv_fr_domain.conf b/cypress/e2e/join_org_with_gouv_fr_domain/env.conf similarity index 100% rename from cypress/env/join_org_with_gouv_fr_domain.conf rename to cypress/e2e/join_org_with_gouv_fr_domain/env.conf diff --git a/cypress/fixtures/join_org_with_gouv_fr_domain.sql b/cypress/e2e/join_org_with_gouv_fr_domain/fixtures.sql similarity index 100% rename from cypress/fixtures/join_org_with_gouv_fr_domain.sql rename to cypress/e2e/join_org_with_gouv_fr_domain/fixtures.sql diff --git a/cypress/e2e/join_org_with_gouv_fr_domain.cy.js b/cypress/e2e/join_org_with_gouv_fr_domain/index.cy.js similarity index 100% rename from cypress/e2e/join_org_with_gouv_fr_domain.cy.js rename to cypress/e2e/join_org_with_gouv_fr_domain/index.cy.js diff --git a/cypress/env/join_org_with_trackdechets_domain.conf b/cypress/e2e/join_org_with_trackdechets_domain/env.conf similarity index 100% rename from cypress/env/join_org_with_trackdechets_domain.conf rename to cypress/e2e/join_org_with_trackdechets_domain/env.conf diff --git a/cypress/fixtures/join_org_with_trackdechets_domain.sql b/cypress/e2e/join_org_with_trackdechets_domain/fixtures.sql similarity index 100% rename from cypress/fixtures/join_org_with_trackdechets_domain.sql rename to cypress/e2e/join_org_with_trackdechets_domain/fixtures.sql diff --git a/cypress/e2e/join_org_with_trackdechets_domain.cy.js b/cypress/e2e/join_org_with_trackdechets_domain/index.cy.js similarity index 100% rename from cypress/e2e/join_org_with_trackdechets_domain.cy.js rename to cypress/e2e/join_org_with_trackdechets_domain/index.cy.js diff --git a/cypress/env/join_org_with_verified_domain.conf b/cypress/e2e/join_org_with_verified_domain/env.conf similarity index 100% rename from cypress/env/join_org_with_verified_domain.conf rename to cypress/e2e/join_org_with_verified_domain/env.conf diff --git a/cypress/fixtures/join_org_with_verified_domain.sql b/cypress/e2e/join_org_with_verified_domain/fixtures.sql similarity index 100% rename from cypress/fixtures/join_org_with_verified_domain.sql rename to cypress/e2e/join_org_with_verified_domain/fixtures.sql diff --git a/cypress/e2e/join_org_with_verified_domain.cy.js b/cypress/e2e/join_org_with_verified_domain/index.cy.js similarity index 100% rename from cypress/e2e/join_org_with_verified_domain.cy.js rename to cypress/e2e/join_org_with_verified_domain/index.cy.js diff --git a/cypress/env/join_with_code_sent_to_official_contact_email.conf b/cypress/e2e/join_with_code_sent_to_official_contact_email/env.conf similarity index 100% rename from cypress/env/join_with_code_sent_to_official_contact_email.conf rename to cypress/e2e/join_with_code_sent_to_official_contact_email/env.conf diff --git a/cypress/fixtures/join_with_code_sent_to_official_contact_email.sql b/cypress/e2e/join_with_code_sent_to_official_contact_email/fixtures.sql similarity index 100% rename from cypress/fixtures/join_with_code_sent_to_official_contact_email.sql rename to cypress/e2e/join_with_code_sent_to_official_contact_email/fixtures.sql diff --git a/cypress/e2e/join_with_code_sent_to_official_contact_email.cy.js b/cypress/e2e/join_with_code_sent_to_official_contact_email/index.cy.js similarity index 96% rename from cypress/e2e/join_with_code_sent_to_official_contact_email.cy.js rename to cypress/e2e/join_with_code_sent_to_official_contact_email/index.cy.js index 319782cb..a9c59f87 100644 --- a/cypress/e2e/join_with_code_sent_to_official_contact_email.cy.js +++ b/cypress/e2e/join_with_code_sent_to_official_contact_email/index.cy.js @@ -1,6 +1,6 @@ // -import { getVerificationWordsFromEmail } from "../support/get-from-email.js"; +import { getVerificationWordsFromEmail } from "#cypress/support/get-from-email.js"; describe("join organizations", () => { before(() => { diff --git a/cypress/env/join_with_code_sent_to_official_educ_nat_contact_email.conf b/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/env.conf similarity index 100% rename from cypress/env/join_with_code_sent_to_official_educ_nat_contact_email.conf rename to cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/env.conf diff --git a/cypress/fixtures/join_with_code_sent_to_official_educ_nat_contact_email.sql b/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/fixtures.sql similarity index 100% rename from cypress/fixtures/join_with_code_sent_to_official_educ_nat_contact_email.sql rename to cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/fixtures.sql diff --git a/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email.cy.js b/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/index.cy.js similarity index 96% rename from cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email.cy.js rename to cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/index.cy.js index 259891ec..df4115f2 100644 --- a/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email.cy.js +++ b/cypress/e2e/join_with_code_sent_to_official_educ_nat_contact_email/index.cy.js @@ -1,6 +1,6 @@ // -import { getVerificationWordsFromEmail } from "../support/get-from-email.js"; +import { getVerificationWordsFromEmail } from "#cypress/support/get-from-email.js"; describe("join organizations", () => { before(() => { diff --git a/cypress/env/join_with_official_contact_email.conf b/cypress/e2e/join_with_official_contact_email/env.conf similarity index 100% rename from cypress/env/join_with_official_contact_email.conf rename to cypress/e2e/join_with_official_contact_email/env.conf diff --git a/cypress/fixtures/join_with_official_contact_email.sql b/cypress/e2e/join_with_official_contact_email/fixtures.sql similarity index 100% rename from cypress/fixtures/join_with_official_contact_email.sql rename to cypress/e2e/join_with_official_contact_email/fixtures.sql diff --git a/cypress/e2e/join_with_official_contact_email.cy.js b/cypress/e2e/join_with_official_contact_email/index.cy.js similarity index 100% rename from cypress/e2e/join_with_official_contact_email.cy.js rename to cypress/e2e/join_with_official_contact_email/index.cy.js diff --git a/cypress/env/join_with_sponsorship.conf b/cypress/e2e/join_with_sponsorship/env.conf similarity index 100% rename from cypress/env/join_with_sponsorship.conf rename to cypress/e2e/join_with_sponsorship/env.conf diff --git a/cypress/fixtures/join_with_sponsorship.sql b/cypress/e2e/join_with_sponsorship/fixtures.sql similarity index 100% rename from cypress/fixtures/join_with_sponsorship.sql rename to cypress/e2e/join_with_sponsorship/fixtures.sql diff --git a/cypress/e2e/join_with_sponsorship.cy.js b/cypress/e2e/join_with_sponsorship/index.cy.js similarity index 100% rename from cypress/e2e/join_with_sponsorship.cy.js rename to cypress/e2e/join_with_sponsorship/index.cy.js diff --git a/cypress/env/reauthenticate_on_admin_page.conf b/cypress/e2e/reauthenticate_on_admin_page/env.conf similarity index 100% rename from cypress/env/reauthenticate_on_admin_page.conf rename to cypress/e2e/reauthenticate_on_admin_page/env.conf diff --git a/cypress/fixtures/reauthenticate_on_admin_page.sql b/cypress/e2e/reauthenticate_on_admin_page/fixtures.sql similarity index 100% rename from cypress/fixtures/reauthenticate_on_admin_page.sql rename to cypress/e2e/reauthenticate_on_admin_page/fixtures.sql diff --git a/cypress/e2e/reauthenticate_on_admin_page.cy.js b/cypress/e2e/reauthenticate_on_admin_page/index.cy.js similarity index 100% rename from cypress/e2e/reauthenticate_on_admin_page.cy.js rename to cypress/e2e/reauthenticate_on_admin_page/index.cy.js diff --git a/cypress/env/redirect_after_session_expiration.conf b/cypress/e2e/redirect_after_session_expiration/env.conf similarity index 100% rename from cypress/env/redirect_after_session_expiration.conf rename to cypress/e2e/redirect_after_session_expiration/env.conf diff --git a/cypress/fixtures/redirect_after_session_expiration.sql b/cypress/e2e/redirect_after_session_expiration/fixtures.sql similarity index 100% rename from cypress/fixtures/redirect_after_session_expiration.sql rename to cypress/e2e/redirect_after_session_expiration/fixtures.sql diff --git a/cypress/e2e/redirect_after_session_expiration.cy.js b/cypress/e2e/redirect_after_session_expiration/index.cy.js similarity index 100% rename from cypress/e2e/redirect_after_session_expiration.cy.js rename to cypress/e2e/redirect_after_session_expiration/index.cy.js diff --git a/cypress/env/reset_password.conf b/cypress/e2e/reset_password/env.conf similarity index 100% rename from cypress/env/reset_password.conf rename to cypress/e2e/reset_password/env.conf diff --git a/cypress/fixtures/reset_password.sql b/cypress/e2e/reset_password/fixtures.sql similarity index 100% rename from cypress/fixtures/reset_password.sql rename to cypress/e2e/reset_password/fixtures.sql diff --git a/cypress/e2e/reset_password.cy.js b/cypress/e2e/reset_password/index.cy.js similarity index 100% rename from cypress/e2e/reset_password.cy.js rename to cypress/e2e/reset_password/index.cy.js diff --git a/cypress/env/set_info_after_account_provisioning.conf b/cypress/e2e/set_info_after_account_provisioning/env.conf similarity index 100% rename from cypress/env/set_info_after_account_provisioning.conf rename to cypress/e2e/set_info_after_account_provisioning/env.conf diff --git a/cypress/fixtures/set_info_after_account_provisioning.sql b/cypress/e2e/set_info_after_account_provisioning/fixtures.sql similarity index 100% rename from cypress/fixtures/set_info_after_account_provisioning.sql rename to cypress/e2e/set_info_after_account_provisioning/fixtures.sql diff --git a/cypress/e2e/set_info_after_account_provisioning.cy.js b/cypress/e2e/set_info_after_account_provisioning/index.cy.js similarity index 96% rename from cypress/e2e/set_info_after_account_provisioning.cy.js rename to cypress/e2e/set_info_after_account_provisioning/index.cy.js index 087a5526..f8be34e8 100644 --- a/cypress/e2e/set_info_after_account_provisioning.cy.js +++ b/cypress/e2e/set_info_after_account_provisioning/index.cy.js @@ -1,6 +1,6 @@ // -import { getVerificationCodeFromEmail } from "../support/get-from-email.js"; +import { getVerificationCodeFromEmail } from "#cypress/support/get-from-email.js"; describe("set info after account provisioning", () => { before(() => { diff --git a/cypress/env/signin_from_agentconnect_client.conf b/cypress/e2e/signin_from_agentconnect_client/env.conf similarity index 100% rename from cypress/env/signin_from_agentconnect_client.conf rename to cypress/e2e/signin_from_agentconnect_client/env.conf diff --git a/cypress/fixtures/signin_from_agentconnect_client.sql b/cypress/e2e/signin_from_agentconnect_client/fixtures.sql similarity index 100% rename from cypress/fixtures/signin_from_agentconnect_client.sql rename to cypress/e2e/signin_from_agentconnect_client/fixtures.sql diff --git a/cypress/e2e/signin_from_agentconnect_client.cy.js b/cypress/e2e/signin_from_agentconnect_client/index.cy.js similarity index 100% rename from cypress/e2e/signin_from_agentconnect_client.cy.js rename to cypress/e2e/signin_from_agentconnect_client/index.cy.js diff --git a/cypress/env/signin_from_legacy_client.conf b/cypress/e2e/signin_from_legacy_client/env.conf similarity index 100% rename from cypress/env/signin_from_legacy_client.conf rename to cypress/e2e/signin_from_legacy_client/env.conf diff --git a/cypress/fixtures/signin_from_legacy_client.sql b/cypress/e2e/signin_from_legacy_client/fixtures.sql similarity index 100% rename from cypress/fixtures/signin_from_legacy_client.sql rename to cypress/e2e/signin_from_legacy_client/fixtures.sql diff --git a/cypress/e2e/signin_from_legacy_client.cy.js b/cypress/e2e/signin_from_legacy_client/index.cy.js similarity index 100% rename from cypress/e2e/signin_from_legacy_client.cy.js rename to cypress/e2e/signin_from_legacy_client/index.cy.js diff --git a/cypress/env/signin_from_standard_client.conf b/cypress/e2e/signin_from_standard_client/env.conf similarity index 100% rename from cypress/env/signin_from_standard_client.conf rename to cypress/e2e/signin_from_standard_client/env.conf diff --git a/cypress/fixtures/signin_from_standard_client.sql b/cypress/e2e/signin_from_standard_client/fixtures.sql similarity index 100% rename from cypress/fixtures/signin_from_standard_client.sql rename to cypress/e2e/signin_from_standard_client/fixtures.sql diff --git a/cypress/e2e/signin_from_standard_client.cy.js b/cypress/e2e/signin_from_standard_client/index.cy.js similarity index 100% rename from cypress/e2e/signin_from_standard_client.cy.js rename to cypress/e2e/signin_from_standard_client/index.cy.js diff --git a/cypress/env/signin_with_email_verification_renewal.conf b/cypress/e2e/signin_with_email_verification_renewal/env.conf similarity index 100% rename from cypress/env/signin_with_email_verification_renewal.conf rename to cypress/e2e/signin_with_email_verification_renewal/env.conf diff --git a/cypress/fixtures/signin_with_email_verification_renewal.sql b/cypress/e2e/signin_with_email_verification_renewal/fixtures.sql similarity index 100% rename from cypress/fixtures/signin_with_email_verification_renewal.sql rename to cypress/e2e/signin_with_email_verification_renewal/fixtures.sql diff --git a/cypress/e2e/signin_with_email_verification_renewal.cy.js b/cypress/e2e/signin_with_email_verification_renewal/index.cy.js similarity index 95% rename from cypress/e2e/signin_with_email_verification_renewal.cy.js rename to cypress/e2e/signin_with_email_verification_renewal/index.cy.js index c5069aad..e981daa2 100644 --- a/cypress/e2e/signin_with_email_verification_renewal.cy.js +++ b/cypress/e2e/signin_with_email_verification_renewal/index.cy.js @@ -1,6 +1,6 @@ // -import { getVerificationCodeFromEmail } from "../support/get-from-email.js"; +import { getVerificationCodeFromEmail } from "#cypress/support/get-from-email.js"; describe("sign-in with email verification renewal", () => { before(() => { diff --git a/cypress/env/signin_with_magic_link.conf b/cypress/e2e/signin_with_magic_link/env.conf similarity index 100% rename from cypress/env/signin_with_magic_link.conf rename to cypress/e2e/signin_with_magic_link/env.conf diff --git a/cypress/env/update_personal_information.conf b/cypress/e2e/signin_with_magic_link/fixtures.sql similarity index 100% rename from cypress/env/update_personal_information.conf rename to cypress/e2e/signin_with_magic_link/fixtures.sql diff --git a/cypress/e2e/signin_with_magic_link.cy.js b/cypress/e2e/signin_with_magic_link/index.cy.js similarity index 98% rename from cypress/e2e/signin_with_magic_link.cy.js rename to cypress/e2e/signin_with_magic_link/index.cy.js index b2e786e6..382d8a7c 100644 --- a/cypress/e2e/signin_with_magic_link.cy.js +++ b/cypress/e2e/signin_with_magic_link/index.cy.js @@ -3,7 +3,7 @@ import { getMagicLinkFromEmail, getVerificationCodeFromEmail, -} from "../support/get-from-email.js"; +} from "#cypress/support/get-from-email.js"; describe("sign-in with magic link", () => { before(() => { diff --git a/cypress/env/signin_with_totp.conf b/cypress/e2e/signin_with_totp/env.conf similarity index 100% rename from cypress/env/signin_with_totp.conf rename to cypress/e2e/signin_with_totp/env.conf diff --git a/cypress/fixtures/signin_with_totp.sql b/cypress/e2e/signin_with_totp/fixtures.sql similarity index 100% rename from cypress/fixtures/signin_with_totp.sql rename to cypress/e2e/signin_with_totp/fixtures.sql diff --git a/cypress/e2e/signin_with_totp.cy.js b/cypress/e2e/signin_with_totp/index.cy.js similarity index 100% rename from cypress/e2e/signin_with_totp.cy.js rename to cypress/e2e/signin_with_totp/index.cy.js diff --git a/cypress/env/signup_entreprise_unipersonnelle.conf b/cypress/e2e/signup_entreprise_unipersonnelle/env.conf similarity index 100% rename from cypress/env/signup_entreprise_unipersonnelle.conf rename to cypress/e2e/signup_entreprise_unipersonnelle/env.conf diff --git a/cypress/env/update_totp_application.conf b/cypress/e2e/signup_entreprise_unipersonnelle/fixtures.sql similarity index 100% rename from cypress/env/update_totp_application.conf rename to cypress/e2e/signup_entreprise_unipersonnelle/fixtures.sql diff --git a/cypress/e2e/signup_entreprise_unipersonnelle.cy.js b/cypress/e2e/signup_entreprise_unipersonnelle/index.cy.js similarity index 97% rename from cypress/e2e/signup_entreprise_unipersonnelle.cy.js rename to cypress/e2e/signup_entreprise_unipersonnelle/index.cy.js index 8f3b00e3..e690b16c 100644 --- a/cypress/e2e/signup_entreprise_unipersonnelle.cy.js +++ b/cypress/e2e/signup_entreprise_unipersonnelle/index.cy.js @@ -1,6 +1,6 @@ // -import { getVerificationCodeFromEmail } from "../support/get-from-email.js"; +import { getVerificationCodeFromEmail } from "#cypress/support/get-from-email.js"; describe("Signup into new entreprise unipersonnelle", () => { before(() => { diff --git a/cypress/fixtures/signin_with_magic_link.sql b/cypress/e2e/update_personal_information/env.conf similarity index 100% rename from cypress/fixtures/signin_with_magic_link.sql rename to cypress/e2e/update_personal_information/env.conf diff --git a/cypress/fixtures/update_personal_information.sql b/cypress/e2e/update_personal_information/fixtures.sql similarity index 100% rename from cypress/fixtures/update_personal_information.sql rename to cypress/e2e/update_personal_information/fixtures.sql diff --git a/cypress/e2e/update_personal_information.cy.js b/cypress/e2e/update_personal_information/index.cy.js similarity index 100% rename from cypress/e2e/update_personal_information.cy.js rename to cypress/e2e/update_personal_information/index.cy.js diff --git a/cypress/fixtures/signup_entreprise_unipersonnelle.sql b/cypress/e2e/update_totp_application/env.conf similarity index 100% rename from cypress/fixtures/signup_entreprise_unipersonnelle.sql rename to cypress/e2e/update_totp_application/env.conf diff --git a/cypress/fixtures/update_totp_application.sql b/cypress/e2e/update_totp_application/fixtures.sql similarity index 100% rename from cypress/fixtures/update_totp_application.sql rename to cypress/e2e/update_totp_application/fixtures.sql diff --git a/cypress/e2e/update_totp_application.cy.js b/cypress/e2e/update_totp_application/index.cy.js similarity index 100% rename from cypress/e2e/update_totp_application.cy.js rename to cypress/e2e/update_totp_application/index.cy.js diff --git a/package.json b/package.json index 6fbe82f9..ee2bf9d5 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "1.0.0", "license": "AGPL-3.0", "type": "module", + "imports": { + "#cypress/*": "./cypress/*" + }, "main": "src/index.js", "scripts": { "build": "run-s build:**",