diff --git a/.github/workflows/test.e2e.yaml b/.github/workflows/test.e2e.yaml index ee982be160..9e7ad00aac 100644 --- a/.github/workflows/test.e2e.yaml +++ b/.github/workflows/test.e2e.yaml @@ -30,6 +30,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 18.3.0 + - run: npm run prerun && bash ./Tests/Scripts/enable-billing-env-var.sh - run: npm run dev - name: Wait for server to start run: bash ./Tests/Scripts/status-check.sh http://localhost diff --git a/E2E/Config.ts b/E2E/Config.ts index 5cecfb99af..cca4d4496e 100644 --- a/E2E/Config.ts +++ b/E2E/Config.ts @@ -23,8 +23,6 @@ export const REGISTERED_USER_PASSWORD: string = export const IS_BILLING_ENABLED: boolean = env('BILLING_ENABLED') === 'true'; -export const STATUS_PAGE_URL: URL | null = env( - 'E2E_TEST_STATUS_PAGE_URL' -) +export const STATUS_PAGE_URL: URL | null = env('E2E_TEST_STATUS_PAGE_URL') ? URL.fromString(env('E2E_TEST_STATUS_PAGE_URL')) : null; diff --git a/Tests/Scripts/enable-billing-env-var.sh b/Tests/Scripts/enable-billing-env-var.sh new file mode 100644 index 0000000000..17884761f7 --- /dev/null +++ b/Tests/Scripts/enable-billing-env-var.sh @@ -0,0 +1,5 @@ +# This script replcaes BILLING_ENABLED in config.env to true +# This is used to enable billing for the tests + +# Replace BILLING_ENABLED in config.env to true +sed -i 's/BILLING_ENABLED=false/BILLING_ENABLED=true/g' config.env \ No newline at end of file