From b7aa82d3c40106d738e45035395f5b67b012de0f Mon Sep 17 00:00:00 2001 From: wolflu05 <76838159+wolflu05@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:47:24 +0200 Subject: [PATCH] fix tests --- .github/workflows/qc_checks.yaml | 6 +----- src/frontend/tests/pui_printing.spec.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 7b1a6ad380..37c28301ea 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -532,13 +532,9 @@ jobs: run: invoke int.frontend-compile - name: Install Playwright Browsers run: cd src/frontend && npx playwright install --with-deps - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - name: Run Playwright tests id: tests - run: cd src/frontend && npx nyc playwright test -g "PUI - Report Editing" + run: cd src/frontend && npx nyc playwright test - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # pin@v4 if: ${{ !cancelled() && steps.tests.outcome == 'failure' }} with: diff --git a/src/frontend/tests/pui_printing.spec.ts b/src/frontend/tests/pui_printing.spec.ts index d57b4f7364..6381e57727 100644 --- a/src/frontend/tests/pui_printing.spec.ts +++ b/src/frontend/tests/pui_printing.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from './baseFixtures.js'; -import { baseUrl } from './defaults.js'; +import { baseUrl, classicUrl } from './defaults.js'; import { doQuickLogin } from './login.js'; /* @@ -84,6 +84,15 @@ test('PUI - Report Printing', async ({ page }) => { test('PUI - Report Editing', async ({ page }) => { await doQuickLogin(page, 'admin', 'inventree'); + // activate the sample plugin for this test + await page.request.patch(`${classicUrl}/api/plugins/sampleui/activate/`, { + headers: { + 'Content-Type': 'application/json', + Authorization: `Basic YWRtaW46aW52ZW50cmVl` + }, + data: { active: true } + }); + // Navigate to the admin center await page.getByRole('button', { name: 'admin' }).click(); await page.getByRole('menuitem', { name: 'Admin Center' }).click();