diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ad9dcb..aa0b903 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,11 +82,7 @@ jobs: npx playwright install chromium - name: Run Playwright tests working-directory: plugin/end_to_end - run: | - ../validation/graylog_control start - npx playwright test; result=$? - ../validation/graylog_control stop - (exit $result) + run: npx playwright test - uses: actions/upload-artifact@v3 if: always() with: diff --git a/end_to_end/tests/end_to_end.spec.js b/end_to_end/tests/end_to_end.spec.js index 5a1fcf3..2e8b29e 100644 --- a/end_to_end/tests/end_to_end.spec.js +++ b/end_to_end/tests/end_to_end.spec.js @@ -1,6 +1,17 @@ // @ts-check +const { execSync } = require('child_process'); const { test, expect } = require('@playwright/test'); +test.beforeAll(async () => { + test.setTimeout(5*60*1000); + execSync('../validation/graylog_control start'); +}); + + +test.afterAll(async () => { + execSync('../validation/graylog_control stop'); +}); + test.beforeEach(async ({ page }) => { await page.goto('http://127.0.0.1:9000/'); // note: could also be: getByRole('textbox', { name: 'Username' })