diff --git a/.github/workflows/e2e_api_tests.yml b/.github/workflows/e2e_api_tests.yml index 91a059ff27..336a4b7be3 100644 --- a/.github/workflows/e2e_api_tests.yml +++ b/.github/workflows/e2e_api_tests.yml @@ -69,6 +69,9 @@ jobs: tests: name: e2e_api tests runs-on: ubuntu-latest + strategy: + matrix: + test_group: [e2e_1, e2e_2] steps: - name: Checkout testing repo @@ -161,13 +164,17 @@ jobs: # npm run pw:deps-only # Run e2e tests - - name: 🧪 Run e2e tests + - name: 🧪 Run e2e tests ${{ matrix.group }} id: e2e-test if: success() && (github.event_name != 'workflow_dispatch' || ( github.event_name == 'workflow_dispatch' && (github.event.inputs.testsuite == 'E2E' || github.event.inputs.testsuite == 'All'))) timeout-minutes: 40 working-directory: tests/pw run: | - npm run test:e2e + if [[ "${{ matrix.group }}" == e2e_1 ]]; then + npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts + elif [[ "${{ matrix.group }}" == a2e_2 ]]; then + npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts + fi # Run e2e coverage - name: 🧪 Run e2e coverage diff --git a/tests/pw/e2e.config.ts b/tests/pw/e2e.config.ts index afc051c1dd..8cdc27a8ae 100644 --- a/tests/pw/e2e.config.ts +++ b/tests/pw/e2e.config.ts @@ -151,6 +151,24 @@ export default defineConfig({ // teardown: NO_SETUP ? undefined : 'coverage_report', }, + + // e2e_tests + { + name: 'e2e_1', + testMatch: /.*\.spec\.ts/, + grep: [/@e2e_1/], + dependencies: NO_SETUP ? [] : ['e2e_setup'], + }, + + + // e2e_tests + { + name: 'e2e_2', + testMatch: /.*\.spec\.ts/, + grep: [/@e2e_2/], + dependencies: NO_SETUP ? [] : ['e2e_setup'], + }, + // coverage_report { name: 'coverage_report', diff --git a/tests/pw/tests/e2e/admin.spec.ts b/tests/pw/tests/e2e/admin.spec.ts index 5c18d0942d..aba5d67425 100644 --- a/tests/pw/tests/e2e/admin.spec.ts +++ b/tests/pw/tests/e2e/admin.spec.ts @@ -3,12 +3,12 @@ import { LoginPage } from '@pages/loginPage'; import { data } from '@utils/testData'; test.describe('Admin functionality test', () => { - test('admin can login', { tag: ['@lite', '@admin'] }, async ({ page }) => { + test('admin can login', { tag: ['@lite', '@admin', '@e2e_1'] }, async ({ page }) => { const loginPage = new LoginPage(page); await loginPage.adminLogin(data.admin); }); - test('admin can logout', { tag: ['@lite', '@admin'] }, async ({ page }) => { + test('admin can logout', { tag: ['@lite', '@admin', '@e2e_2'] }, async ({ page }) => { const loginPage = new LoginPage(page); await loginPage.adminLogin(data.admin); await loginPage.logoutBackend();