Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Sep 28, 2023
1 parent 68a0094 commit a96d74e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
3 changes: 2 additions & 1 deletion ui-tests/playwright.config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
2 changes: 2 additions & 0 deletions ui-tests/tests/voici.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a96d74e

Please sign in to comment.