From 383a21cfdb3829e8d473f2a0c86a23d9fe7ca8ab Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 10:50:40 +0000 Subject: [PATCH 01/12] Replace cypress-run job (#722) --- .github/workflows/create-release-pr.yml | 54 ++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 40ee78f8..59006ddb 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -6,8 +6,60 @@ on: - develop jobs: + cypress-run: + name: Cypress E2E tests + runs-on: ubuntu-latest + strategy: + # when one test fails, DO NOT cancel the other + # containers, because this will kill Cypress processes + # leaving Cypress Cloud hanging ... + # https://github.com/cypress-io/github-action/issues/48 + fail-fast: false + matrix: + # run 3 copies of the current job in parallel + # this will automatically load balance + containers: [1, 2, 3] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run cypress + uses: cypress-io/github-action@v6 + with: + browser: chrome + spec: cypress/**/*.cy.tsx + headed: false + record: true # send results to cypress dashboard + parallel: true + env: + NEXT_PUBLIC_ROLLBAR_ENV: CI + NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} + NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }} + NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }} + NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} + NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} + NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} + NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} + NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} + NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} + CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }} + CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} + CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} + CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} + CYPRESS_bumble_partner_admin_email: ${{secrets.CYPRESS_BUMBLE_ADMIN_EMAIL}} + CYPRESS_bumble_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_badoo_partner_admin_email: ${{secrets.CYPRESS_BADOO_ADMIN_EMAIL}} + CYPRESS_badoo_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_super_admin_email: ${{secrets.CYPRESS_SUPER_ADMIN_EMAIL}} + CYPRESS_super_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_public_email: ${{secrets.CYPRESS_PUBLIC_EMAIL}} + CYPRESS_public_password: ${{secrets.CYPRESS_PUBLIC_PASSWORD}} + CYPRESS_api_url: ${{secrets.CYPRESS_BLOOM_BACKEND_API_URL}} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + create-pr-to-main: - name: Create release PR + name: Create release PR to main + needs: cypress-run runs-on: ubuntu-latest steps: - name: Create Pull Request From f3dc42173a5df96b57b502a15bfa5076c11ab6a1 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 11:24:34 +0000 Subject: [PATCH 02/12] Fix production testing workflow - run tests on main PRs (#723) --- .github/workflows/create-release-pr.yml | 51 --------------- .github/workflows/cypress-release-test.yml | 73 ++++++++++++++++++++++ .github/workflows/cypress-test.yml | 2 +- 3 files changed, 74 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/cypress-release-test.yml diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 59006ddb..fd900b8e 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -6,57 +6,6 @@ on: - develop jobs: - cypress-run: - name: Cypress E2E tests - runs-on: ubuntu-latest - strategy: - # when one test fails, DO NOT cancel the other - # containers, because this will kill Cypress processes - # leaving Cypress Cloud hanging ... - # https://github.com/cypress-io/github-action/issues/48 - fail-fast: false - matrix: - # run 3 copies of the current job in parallel - # this will automatically load balance - containers: [1, 2, 3] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Run cypress - uses: cypress-io/github-action@v6 - with: - browser: chrome - spec: cypress/**/*.cy.tsx - headed: false - record: true # send results to cypress dashboard - parallel: true - env: - NEXT_PUBLIC_ROLLBAR_ENV: CI - NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} - NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }} - NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }} - NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} - NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} - NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} - NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} - NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} - NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} - CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }} - CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} - CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} - CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} - CYPRESS_bumble_partner_admin_email: ${{secrets.CYPRESS_BUMBLE_ADMIN_EMAIL}} - CYPRESS_bumble_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} - CYPRESS_badoo_partner_admin_email: ${{secrets.CYPRESS_BADOO_ADMIN_EMAIL}} - CYPRESS_badoo_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} - CYPRESS_super_admin_email: ${{secrets.CYPRESS_SUPER_ADMIN_EMAIL}} - CYPRESS_super_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} - CYPRESS_public_email: ${{secrets.CYPRESS_PUBLIC_EMAIL}} - CYPRESS_public_password: ${{secrets.CYPRESS_PUBLIC_PASSWORD}} - CYPRESS_api_url: ${{secrets.CYPRESS_BLOOM_BACKEND_API_URL}} - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - create-pr-to-main: name: Create release PR to main needs: cypress-run diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml new file mode 100644 index 00000000..da26ef07 --- /dev/null +++ b/.github/workflows/cypress-release-test.yml @@ -0,0 +1,73 @@ +name: Cypress release tests + +on: + pull_request: + branches: [main] + +jobs: + # vercel will redeploy the develop/staging app on creating a PR to main + # wait for new deployment to complete before running tests + wait-for-vercel-deployment: + name: Wait for vercel deployment + runs-on: ubuntu-latest + outputs: + preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} + steps: + - name: Wait for Vercel preview deployment to be ready + uses: patrickedqvist/wait-for-vercel-preview@master + id: waitForVercelPreviewDeployment + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_timeout: 120 + + cypress-run: + name: Cypress e2e tests + needs: build + runs-on: ubuntu-latest + strategy: + # when one test fails, DO NOT cancel the other + # containers, because this will kill Cypress processes + # leaving Cypress Cloud hanging ... + # https://github.com/cypress-io/github-action/issues/48 + fail-fast: false + matrix: + # run 3 copies of the current job in parallel + # this will automatically load balance + containers: [1, 2, 3] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run cypress + uses: cypress-io/github-action@v5.0.9 + with: + browser: chrome + spec: cypress/**/*.cy.tsx + headed: false + record: true # send results to cypress dashboard + parallel: true + env: + NEXT_PUBLIC_ROLLBAR_ENV: CI + NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} + NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }} + NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }} + NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} + NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} + NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} + NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} + NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} + NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} + CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }} + CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} + CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} + CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} + CYPRESS_bumble_partner_admin_email: ${{secrets.CYPRESS_BUMBLE_ADMIN_EMAIL}} + CYPRESS_bumble_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_badoo_partner_admin_email: ${{secrets.CYPRESS_BADOO_ADMIN_EMAIL}} + CYPRESS_badoo_partner_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_super_admin_email: ${{secrets.CYPRESS_SUPER_ADMIN_EMAIL}} + CYPRESS_super_admin_password: ${{secrets.CYPRESS_TEST_ACCOUNT_PASSWORD}} + CYPRESS_public_email: ${{secrets.CYPRESS_PUBLIC_EMAIL}} + CYPRESS_public_password: ${{secrets.CYPRESS_PUBLIC_PASSWORD}} + CYPRESS_api_url: ${{secrets.CYPRESS_BLOOM_BACKEND_API_URL}} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cypress-test.yml b/.github/workflows/cypress-test.yml index ac521351..897f2046 100644 --- a/.github/workflows/cypress-test.yml +++ b/.github/workflows/cypress-test.yml @@ -80,7 +80,7 @@ jobs: NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} - CYPRESS_BASE_URL: 'https://bloom-frontend-git-develop-chaynhq.vercel.app/' # runs cypress against staging + CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }} CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} From 40072e6417a86c619ad53d3a68795ac1026e370a Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 12:05:50 +0000 Subject: [PATCH 03/12] Fix dep on create-release-pr action(#724) --- .github/workflows/create-release-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index fd900b8e..f12db750 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -8,7 +8,6 @@ on: jobs: create-pr-to-main: name: Create release PR to main - needs: cypress-run runs-on: ubuntu-latest steps: - name: Create Pull Request From 735705e21a1d7ea0adb147a32b3c73c6bac5fda7 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 12:27:32 +0000 Subject: [PATCH 04/12] Fix cypress release tests (#726) --- .github/workflows/cypress-release-test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index da26ef07..8abd9470 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -2,7 +2,8 @@ name: Cypress release tests on: pull_request: - branches: [main] + branches: + - main jobs: # vercel will redeploy the develop/staging app on creating a PR to main @@ -10,19 +11,17 @@ jobs: wait-for-vercel-deployment: name: Wait for vercel deployment runs-on: ubuntu-latest - outputs: - preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} steps: - name: Wait for Vercel preview deployment to be ready - uses: patrickedqvist/wait-for-vercel-preview@master - id: waitForVercelPreviewDeployment + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitForVercelDeployment with: token: ${{ secrets.GITHUB_TOKEN }} max_timeout: 120 cypress-run: name: Cypress e2e tests - needs: build + needs: wait-for-vercel-deployment runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other From f97af58e58ba4d83ce0cff8d7a6a50eeb0e25894 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 12:36:22 +0000 Subject: [PATCH 05/12] Fix cypress-release-tests - increase timeout (#727) * increase timeout * increase check interval --- .github/workflows/cypress-release-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 8abd9470..287a019b 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -17,7 +17,8 @@ jobs: id: waitForVercelDeployment with: token: ${{ secrets.GITHUB_TOKEN }} - max_timeout: 120 + max_timeout: 1000 + check_interval: 5 cypress-run: name: Cypress e2e tests From 13efec3cb90f529ede63a9ad659e667ff87889a5 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 12:48:38 +0000 Subject: [PATCH 06/12] Fix cypress-release-test - downgrade action (#728) * downgrade * 1.2.0 --- .github/workflows/cypress-release-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 287a019b..60410ad5 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Wait for Vercel preview deployment to be ready - uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + uses: patrickedqvist/wait-for-vercel-preview@v1.2.0 id: waitForVercelDeployment with: token: ${{ secrets.GITHUB_TOKEN }} From 152bc87ff7fe9882e7af095f9c4cdeac2606b23f Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Thu, 30 Nov 2023 13:11:22 +0000 Subject: [PATCH 07/12] Temporarily skip cypress-release-test (#729) --- .github/workflows/cypress-release-test.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 60410ad5..4a628d50 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -1,9 +1,11 @@ name: Cypress release tests -on: - pull_request: - branches: - - main +# TODO: FIX 401 issue on wait-for-vercel-preview and uncomment lines below + +# on: +# pull_request: +# branches: +# - main jobs: # vercel will redeploy the develop/staging app on creating a PR to main @@ -11,9 +13,11 @@ jobs: wait-for-vercel-deployment: name: Wait for vercel deployment runs-on: ubuntu-latest + outputs: + preview_url: ${{ steps.waitForVercelDeployment.outputs.url }} steps: - name: Wait for Vercel preview deployment to be ready - uses: patrickedqvist/wait-for-vercel-preview@v1.2.0 + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 id: waitForVercelDeployment with: token: ${{ secrets.GITHUB_TOKEN }} @@ -56,7 +60,7 @@ jobs: NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} - CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }} + CYPRESS_BASE_URL: ${{ needs.wait-for-vercel-deployment.outputs.preview_url }} CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} From 43952aee4625f90a92d9f2d37de4fc24d1a078de Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 4 Dec 2023 16:26:48 +0000 Subject: [PATCH 08/12] Fix cypress-release-tests with deployment_status (#731) --- .github/workflows/cypress-release-test.yml | 28 ++++------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 4a628d50..d6ae687c 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -1,32 +1,12 @@ name: Cypress release tests -# TODO: FIX 401 issue on wait-for-vercel-preview and uncomment lines below - -# on: -# pull_request: -# branches: -# - main +on: + deployment_status: jobs: - # vercel will redeploy the develop/staging app on creating a PR to main - # wait for new deployment to complete before running tests - wait-for-vercel-deployment: - name: Wait for vercel deployment - runs-on: ubuntu-latest - outputs: - preview_url: ${{ steps.waitForVercelDeployment.outputs.url }} - steps: - - name: Wait for Vercel preview deployment to be ready - uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 - id: waitForVercelDeployment - with: - token: ${{ secrets.GITHUB_TOKEN }} - max_timeout: 1000 - check_interval: 5 - cypress-run: name: Cypress e2e tests - needs: wait-for-vercel-deployment + if: github.ref == 'refs/heads/develop' && github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other @@ -60,7 +40,7 @@ jobs: NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} - CYPRESS_BASE_URL: ${{ needs.wait-for-vercel-deployment.outputs.preview_url }} + CYPRESS_BASE_URL: ${{ github.event.deployment_status.environment_url }} CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}} From 2f566f45abb10d5d13c802050860c36ad864f30b Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 4 Dec 2023 16:54:46 +0000 Subject: [PATCH 09/12] Restyle NPS survey (#733) --- .github/workflows/cypress-release-test.yml | 2 +- public/hotjarNPS.css | 212 +++++++-------------- 2 files changed, 69 insertions(+), 145 deletions(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index d6ae687c..3eaa48ae 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -6,7 +6,7 @@ on: jobs: cypress-run: name: Cypress e2e tests - if: github.ref == 'refs/heads/develop' && github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' + if: github.ref == 'refs/heads/main' && github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other diff --git a/public/hotjarNPS.css b/public/hotjarNPS.css index b36326ff..bcf29a32 100644 --- a/public/hotjarNPS.css +++ b/public/hotjarNPS.css @@ -1,205 +1,129 @@ /* Hotjar CUSTOM styles to override default hotjar CSS */ -._hj-widget-container ._hj-Pbej5__styles__resetStyles * { +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-sf3vvt *, +._hj-widget-container ._hj-s3UIi__styles__globalStyles p, +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-1xfwja.css-1xfwja.css-1xfwja p, +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-zxqk8.css-zxqk8, +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-k8m2z1.css-k8m2z1.css-k8m2z1, +._hj-widget-container + ._hj-s3UIi__styles__globalStyles + .css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp { font-family: 'Open Sans', 'Nunito', 'roboto', 'hotjar', 'sans-serif' !important; } -._hj-PZjqr__styles__surveyBranding { - display: none !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles a, +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-k8m2z1.css-k8m2z1.css-k8m2z1 { + text-decoration: underline !important; + color: #000000 !important; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-5vKq2__styles__surveyContainer._hj-5vKq2__styles__surveyContainer { - width: 30rem !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-sf3vvt.css-sf3vvt { + width: 26rem !important; max-width: 100vw; border-radius: 1.25rem !important; padding: 1.5rem !important; } @media (min-width: 480px) { - ._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-5vKq2__styles__surveyContainer._hj-5vKq2__styles__surveyContainer { + ._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-sf3vvt.css-sf3vvt { bottom: 1.5rem; } } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-kWRoL__styles__openStateToggle { - border-top-left-radius: 0.75rem !important; - border-top-right-radius: 0.75rem !important; - height: 1.25rem !important; - top: -1.25rem !important; - right: 2rem !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-8Lgv6__styles__surveyActions { - min-height: unset !important; +/* Hotjar branding */ +.css-vp5o9w { + display: none !important; } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-XpAaA__styles__surveyFooter { - border: none !important; - justify-content: center !important; -} +/* Primary button styles */ -._hj-widget-container._hj-widget-theme-light - ._hj-s3UIi__styles__globalStyles - ._hj-S9XKO__styles__surveyTitle, -._hj-widget-container._hj-widget-theme-light +._hj-widget-container ._hj-s3UIi__styles__globalStyles button[type='button'], +._hj-widget-container ._hj-s3UIi__styles__globalStyles - ._hj-S9XKO__styles__surveyTitle - > span { - font-weight: 500 !important; - font-size: 1rem !important; - line-height: 1.4 !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-hTm4\+__styles__answersContentWrapper { - padding: 0.5rem 0 1rem !important; -} - -/* Primary button styles */ -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton, -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-XpAaA__styles__surveyFooter button { - background: #ffbfa4 !important; + .css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp { + background-color: #ffbfa4 !important; color: #000000 !important; font-weight: 500 !important; + box-shadow: #ffbfa4 0px 0px 0px 1px inset !important; border: 1px solid #ffbfa4 !important; border-radius: 100rem !important; min-width: 5rem !important; box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.15) !important; } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton:hover, +._hj-widget-container ._hj-s3UIi__styles__globalStyles button[type='button']:hover, +._hj-widget-container ._hj-s3UIi__styles__globalStyles button[type='button']:focus, ._hj-widget-container ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button:hover { - background: rgb(255, 203, 182) !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton:focus, + .css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp:hover, ._hj-widget-container ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button:focus { - background: rgb(255, 203, 182) !important; - box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.15) !important; + .css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp.css-lhe9wp:focus { + background-color: rgb(255, 203, 182) !important; } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton[disabled], -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button[disabled] { - border-color: transparent !important; -} -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton[disabled]:hover, +/* Consent decline button */ ._hj-widget-container ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button[disabled]:hover { - background: rgb(255, 203, 182) !important; + .css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8 { + color: #000000 !important; + background-color: unset !important; + box-shadow: unset !important; + font-weight: 400 !important; } -/* Input styles */ - ._hj-widget-container ._hj-s3UIi__styles__globalStyles - ._hj-P-UNr__styles__inputField._hj-Wk\+wZ__styles__light { - border-color: rgba(0, 0, 0, 0.12) !important; + .css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8.css-zxqk8:hover:enabled { + color: #000000 !important; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-P-UNr__styles__inputField._hj-Wk\+wZ__styles__light:hover { - border-color: #ffbfa4 !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-1xfwja.css-1xfwja.css-1xfwja div, +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-vr45vp.css-vr45vp { + margin-bottom: 0 !important; } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-P-UNr__styles__inputField:focus { - outline: none !important; - border-color: #ffbfa4 !important; +/* Collapse popover button */ +._hj-widget-container ._hj-s3UIi__styles__globalStyles .css-1ftaqxs.css-1ftaqxs { + margin-bottom: 0 !important; } -/* Scales styles */ - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-ILZpN__styles__scaleLabels { - padding-top: 0.5rem !important; -} +/* Input styles */ -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-CvVSY__styles__scaleOption span, -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-CvVSY__styles__scaleOption._hj-V57HW__styles__selected - span { - background: none !important; - border: 1px solid rgba(0, 0, 0, 0.12) !important; - border-radius: 2rem !important; - height: 2.125rem !important; - width: 2.125rem !important; - color: #ea0050 !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='text'], +._hj-widget-container ._hj-s3UIi__styles__globalStyles textarea:focus { + border-color: rgba(0, 0, 0, 0.12) !important; } -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-CvVSY__styles__scaleOption span:hover { - border-color: rgba(0, 0, 0, 0.28) !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='text']:hover, +._hj-widget-container ._hj-s3UIi__styles__globalStyles textarea:focus:hover { + border-color: #ffbfa4 !important; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-CvVSY__styles__scaleOption:focus-within - span { +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='text']:focus, +._hj-widget-container ._hj-s3UIi__styles__globalStyles textarea:focus { outline: none !important; - border-color: #ff976a !important; - border-width: 1.5px !important; -} - -/* Thank you page styles */ - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-tHiZi__styles__finalStep { - padding: 0.75rem 0.5rem 0 !important; + border-color: #ffbfa4 !important; + box-shadow: none !important; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-2JZDx__styles__thankYouMessage._hj-iinO7__styles__withConsent { - margin-bottom: 0.75rem !important; - font-size: 1rem !important; - font-weight: 400 !important; -} +/* Scales styles */ -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-cK\+L-__styles__consentMessage._hj-N21Xh__styles__light, -._hj-widget-container - ._hj_feedback_container - ._hj-cK\+L-__styles__consentMessage._hj-N21Xh__styles__light { - margin-bottom: 0 !important; - color: #000000 !important; - font-size: 0.875rem !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='range' i] { + appearance: none; + background: rgba(0, 0, 0, 0.1) !important; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton._hj-oxtSd__styles__declineButton { - background-color: transparent !important; - color: #000000 !important; - margin-right: 0 !important; - box-shadow: none !important; - border-color: #ffbfa4 !important; - border: 1px solid #ffbfa4 !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='range' i]::-webkit-slider-thumb { + appearance: none; + background-color: #ff976a !important; + outline: unset !important; + margin-left: -1px; } -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton._hj-oxtSd__styles__declineButton:hover { - background: rgb(255, 203, 182) !important; - color: #000000 !important; - box-shadow: none !important; +._hj-widget-container ._hj-s3UIi__styles__globalStyles input[type='range' i]::-moz-range-thumb { + appearance: none; + background-color: #ff976a !important; + outline: unset !important; + margin-left: -1px; } - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-B\+0X3__styles__consentButton i, ._hj_feedback_container ._hj-B\+0X3__styles__consentButton i { - font-size: 15px !important; - height: 17px !important; -} \ No newline at end of file From a5bdb99eeb8eb8b3e39c55a1b640f140039f2334 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 4 Dec 2023 17:06:11 +0000 Subject: [PATCH 10/12] Fix cypress-release-tests - rearrange if (#734) --- .github/workflows/cypress-release-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 3eaa48ae..d418f65a 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -6,7 +6,7 @@ on: jobs: cypress-run: name: Cypress e2e tests - if: github.ref == 'refs/heads/main' && github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' + if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other From 241235d93410b3c77eecc4d08fed38ac69f15808 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 4 Dec 2023 17:13:17 +0000 Subject: [PATCH 11/12] develop branch (#735) --- .github/workflows/cypress-release-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index d418f65a..1a00da21 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -6,7 +6,7 @@ on: jobs: cypress-run: name: Cypress e2e tests - if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/main' + if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/develop' runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other From 5454f0caa8f2c9dcbc1974cc8f4f52c6238f9062 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 4 Dec 2023 18:09:58 +0000 Subject: [PATCH 12/12] Final fix for cypress-release-tests - wait-for-vercel-preview (#736) --- .github/workflows/cypress-release-test.yml | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-release-test.yml b/.github/workflows/cypress-release-test.yml index 1a00da21..934c9d7f 100644 --- a/.github/workflows/cypress-release-test.yml +++ b/.github/workflows/cypress-release-test.yml @@ -1,12 +1,30 @@ name: Cypress release tests on: - deployment_status: + pull_request: + branches: + - main jobs: + # vercel will redeploy the develop/staging app on creating a PR to main + # wait for new deployment to complete before running tests + wait-for-vercel-deployment: + name: Wait for vercel deployment + runs-on: ubuntu-latest + outputs: + preview_url: ${{ steps.waitForVercelDeployment.outputs.url }} + steps: + - name: Wait for Vercel preview deployment to be ready + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitForVercelDeployment + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_timeout: 1000 + check_interval: 5 + cypress-run: name: Cypress e2e tests - if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.ref == 'refs/heads/develop' + needs: wait-for-vercel-deployment runs-on: ubuntu-latest strategy: # when one test fails, DO NOT cancel the other @@ -40,7 +58,7 @@ jobs: NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}} NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} - CYPRESS_BASE_URL: ${{ github.event.deployment_status.environment_url }} + CYPRESS_BASE_URL: ${{ needs.wait-for-vercel-deployment.outputs.preview_url }} CYPRESS_mail_slurp_api_key: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}} CYPRESS_inbox_id: ${{secrets.CYPRESS_INBOX_ID}} CYPRESS_reset_pwd_content_email: ${{secrets.CYPRESS_RESET_PWD_CONTENT_EMAIL}}