From 511e0ed43d1a7ad8e7ce2a563bf432040ebae74a Mon Sep 17 00:00:00 2001 From: ashwinnair-chimple Date: Thu, 2 Jul 2026 17:28:54 +0530 Subject: [PATCH 1/2] feat: FM-949 Added e2e playwright automation to circle ci/cd pipeline --- .circleci/config.yml | 27 +++++++++++++++++++++++++++ playwright.config.ts | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cc98747..623c5020 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,6 +93,24 @@ jobs: distribution-id: 'E2QD6IZIYBGTJK' paths: '"/*"' + e2e-tests: + docker: + - image: mcr.microsoft.com/playwright:v1.60.0-jammy + steps: + - checkout + - node/install-packages + - run: + name: Run Playwright E2E tests + command: npm run test:e2e + environment: + CI: 'true' + - store_test_results: + path: test-results + - store_artifacts: + path: playwright-report + - store_artifacts: + path: test-results + # TODO: move invalidate-cloudfront-cache parameters to project env variables # Eventually these will be the new cloudfront name for apps and app name respectively. @@ -103,9 +121,15 @@ workflows: s3-deploy-workflow: jobs: - node/test + - e2e-tests: + requires: + - node/test - build-and-deploy-dev: context: - aws-context + requires: + - node/test + - e2e-tests filters: branches: only: @@ -115,6 +139,7 @@ workflows: - aws-context requires: - node/test + - e2e-tests filters: branches: only: @@ -124,6 +149,7 @@ workflows: - aws-context requires: - node/test + - e2e-tests filters: branches: only: @@ -133,6 +159,7 @@ workflows: - aws-context requires: - node/test + - e2e-tests filters: branches: only: diff --git a/playwright.config.ts b/playwright.config.ts index f10cdff1..5ad3afc4 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -22,7 +22,8 @@ export default defineConfig({ ['json', { outputFile: 'test-results/results.json' }], ], use: { - baseURL: 'http://localhost:8080', + headless: process.env.CI ? true : false, + baseURL: process.env.BASE_URL || 'http://localhost:8080', // Capture screenshot on every failure for debugging screenshot: 'only-on-failure', // Retain video for failed tests so failures are reproducible From 5a2ece91f0a89fc54885fd330324555db1eae481 Mon Sep 17 00:00:00 2001 From: ashwinnair-chimple Date: Fri, 3 Jul 2026 11:43:09 +0530 Subject: [PATCH 2/2] fix: handling artifact storage using s3 --- .circleci/config.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 623c5020..7be27bf0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -106,10 +106,16 @@ jobs: CI: 'true' - store_test_results: path: test-results - - store_artifacts: - path: playwright-report - - store_artifacts: - path: test-results + - aws-cli/setup: + aws_access_key_id: $AWS_ACCESS_KEY + region: $AWS_DEFAULT_REGION + aws_secret_access_key: $AWS_SECRET_ACCESS_KEY + - run: + name: Upload Playwright report to S3 + when: always + command: | + aws s3 sync playwright-report \ + "s3://globallit-aws-s3-static-webapp-test-us-east-2/e2e-reports/${CIRCLE_BRANCH}/${CIRCLE_BUILD_NUM}/" # TODO: move invalidate-cloudfront-cache parameters to project env variables # Eventually these will be the new cloudfront name for apps and app name respectively. @@ -122,6 +128,8 @@ workflows: jobs: - node/test - e2e-tests: + context: + - aws-context requires: - node/test - build-and-deploy-dev: