diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ca11c9..736baaf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,18 +39,18 @@ jobs: python -m ruff check . python -m black --check . - - name: Install voici - run: pip install . - - name: Install browser run: | yarn yarn playwright install chromium working-directory: ui-tests - - name: Build UI tests - run: yarn run build - working-directory: ui-tests + - name: Install dependencies and build tests + run: | + python -m pip install . + cd ui-tests + yarn install --frozen-lockfile + yarn run build - name: Test run: yarn run test @@ -76,3 +76,12 @@ jobs: with: name: voici-test-report path: ui-tests/playwright-report + + - name: Upload voici assests + if: failure() + uses: actions/upload-artifact@v3 + with: + name: voici-app + path: | + ui-tests/material + ui-tests/lite diff --git a/ui-tests/playwright.config.js b/ui-tests/playwright.config.js index 90b7507..832464a 100644 --- a/ui-tests/playwright.config.js +++ b/ui-tests/playwright.config.js @@ -1,10 +1,11 @@ module.exports = { - timeout: 240000, + timeout: 120000, reporter: [[process.env.CI ? 'dot' : 'list'], ['html']], use: { baseURL: 'http://localhost:8866', video: 'retain-on-failure', }, + retries: 2, webServer: [ { command: 'yarn start', diff --git a/ui-tests/tests/voici.test.ts b/ui-tests/tests/voici.test.ts index 2dbf405..ab0faa9 100644 --- a/ui-tests/tests/voici.test.ts +++ b/ui-tests/tests/voici.test.ts @@ -107,8 +107,10 @@ test.describe('Voici Tests', () => { await page.waitForTimeout(1000); expect(await page.screenshot()).toMatchSnapshot('voici-tree-material.png'); + await page.waitForTimeout(1000); await widget.click(); + await page.waitForTimeout(1000); expect(await page.screenshot()).toMatchSnapshot( 'voici-subtree-material.png' diff --git a/ui-tests/tests/voici.test.ts-snapshots/voici-simple-material-linux.png b/ui-tests/tests/voici.test.ts-snapshots/voici-simple-material-linux.png index c7546f9..729c389 100644 Binary files a/ui-tests/tests/voici.test.ts-snapshots/voici-simple-material-linux.png and b/ui-tests/tests/voici.test.ts-snapshots/voici-simple-material-linux.png differ