Skip to content

Commit

Permalink
ci: add clone action
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Aug 28, 2024
1 parent dadf4d8 commit 6ebcbe8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions projects/demo-playwright/tests/groups.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions projects/demo-playwright/tests/toolbar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -129,6 +134,7 @@ test.describe('Toolbar', () => {
.locator('.t-cell')
.nth(1);

await page.waitForTimeout(100);
await cell.hover();
await cell.click();

Expand Down

0 comments on commit 6ebcbe8

Please sign in to comment.