From 4374878a0945536bbca7da5f497d39dcbaff72cc Mon Sep 17 00:00:00 2001 From: DaevMithran <61043607+DaevMithran@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:12:41 +0530 Subject: [PATCH] test: Add release test workflow [DEV-4160] (#562) * test: Add release test worflow * Exclude release tests in PR flow * Debug * Refactor --- .github/workflows/build.yml | 1 + playwright.config.ts | 1 + .../{create-positive.spec.ts => create-positive.release.spec.ts} | 0 ...oller-flow.spec.ts => switch-controller-flow.release.spec.ts} | 0 4 files changed, 2 insertions(+) rename tests/e2e/did/{create-positive.spec.ts => create-positive.release.spec.ts} (100%) rename tests/e2e/did/{switch-controller-flow.spec.ts => switch-controller-flow.release.spec.ts} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2f71c94a..7eb4c3d5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,7 @@ jobs: run: npm run test env: CI: true + RELEASE: ${{ github.ref_name == 'develop' }} APPLICATION_BASE_URL: ${{ vars.APPLICATION_BASE_URL }} COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} ENABLE_AUTHENTICATION: ${{ vars.ENABLE_AUTHENTICATION }} diff --git a/playwright.config.ts b/playwright.config.ts index a25eee599..5720304dd 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -74,6 +74,7 @@ export default defineConfig({ }, { name: 'Logged In User Tests', + ...(process.env.RELEASE === 'true' ? {} : { testIgnore: /.*\.release\.spec\.ts/ }), use: { ...devices['Desktop Chrome'], // Use prepared auth state. diff --git a/tests/e2e/did/create-positive.spec.ts b/tests/e2e/did/create-positive.release.spec.ts similarity index 100% rename from tests/e2e/did/create-positive.spec.ts rename to tests/e2e/did/create-positive.release.spec.ts diff --git a/tests/e2e/did/switch-controller-flow.spec.ts b/tests/e2e/did/switch-controller-flow.release.spec.ts similarity index 100% rename from tests/e2e/did/switch-controller-flow.spec.ts rename to tests/e2e/did/switch-controller-flow.release.spec.ts