From 6ebcbe87757619e3e2dacaafee0740d65f2234ff Mon Sep 17 00:00:00 2001 From: splincode Date: Wed, 28 Aug 2024 18:35:05 +0300 Subject: [PATCH] ci: add clone action --- .github/workflows/e2e.yml | 10 ++++++++++ projects/demo-playwright/tests/groups.spec.ts | 1 + projects/demo-playwright/tests/toolbar.spec.ts | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 87f0fc756..b68fe87b9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -37,6 +37,16 @@ jobs: - run: npx nx e2e editor-demo-playwright continue-on-error: true + - uses: actions/upload-artifact@v4.3.6 + with: + path: | + ./projects/demo-playwright/tests-results/**/*.diff.png + !./projects/demo-playwright/tests-results/**/*-retry*/*.diff.png + name: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} + if-no-files-found: ignore + compression-level: 0 + retention-days: 1 + - id: diff-checker run: | echo "diff_exist=$(find ./projects/demo-playwright/tests-results -regex '.*diff\.png$' | wc -l | sed -e 's/^[[:space:]]*//')" >> $GITHUB_OUTPUT diff --git a/projects/demo-playwright/tests/groups.spec.ts b/projects/demo-playwright/tests/groups.spec.ts index 41459e722..7b6ca0c92 100644 --- a/projects/demo-playwright/tests/groups.spec.ts +++ b/projects/demo-playwright/tests/groups.spec.ts @@ -49,6 +49,7 @@ test.describe('Groups', () => { await page.keyboard.press('Enter'); await page.locator('[contenteditable]').nth(0).focus(); + await page.keyboard.press('Enter'); await page.keyboard.type('456'); await expect(page.locator('#draggable-groups tui-editor')).toHaveScreenshot( diff --git a/projects/demo-playwright/tests/toolbar.spec.ts b/projects/demo-playwright/tests/toolbar.spec.ts index 19c392f5b..22d69d16c 100644 --- a/projects/demo-playwright/tests/toolbar.spec.ts +++ b/projects/demo-playwright/tests/toolbar.spec.ts @@ -105,22 +105,27 @@ test.describe('Toolbar', () => { await expect(page.locator('tui-editor')).toHaveScreenshot('Toolbar-13.png'); await page.locator('[automation-id="toolbar__ordering-list-button"]').focus(); + await page.waitForTimeout(100); await page.keyboard.press('Enter'); await page .locator('[automation-id="toolbar__un-ordered-list-button"].t-option') .focus(); + await page.waitForTimeout(100); await page.keyboard.press('Enter'); await page.locator('[automation-id="toolbar__font-style-button"]').focus(); + await page.waitForTimeout(100); await page.keyboard.press('Enter'); await page.locator('[contenteditable]').nth(0).focus(); + await page.waitForTimeout(100); await page.keyboard.type('12345'); await expect(page.locator('tui-editor')).toHaveScreenshot('Toolbar-14.png'); await page.locator('[automation-id="toolbar__insert-table-button"]').focus(); + await page.waitForTimeout(100); await page.keyboard.press('Enter'); const cell = page @@ -129,6 +134,7 @@ test.describe('Toolbar', () => { .locator('.t-cell') .nth(1); + await page.waitForTimeout(100); await cell.hover(); await cell.click();