fix snapshot tests, don't let them silently fail (#3228)

fix snapshots, don't let them silently fail
This commit is contained in:
Kurt Hutten
2024-08-04 08:29:28 +10:00
committed by GitHub
parent b0a41c31ac
commit fd1b4c3a32
7 changed files with 17 additions and 11 deletions

View File

@ -106,13 +106,19 @@ jobs:
- name: build web
run: yarn build:local
- name: Run ubuntu/chrome snapshots
continue-on-error: true
run: |
yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts
yarn playwright test --project="Google Chrome" --retries="3" --update-snapshots e2e/playwright/snapshot-tests.spec.ts
env:
CI: true
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-ubuntu-snapshot-${{ github.sha }}
path: playwright-report/
retention-days: 30
overwrite: true
- name: Clean up test-results
if: always()
continue-on-error: true

View File

@ -65,7 +65,7 @@ const part001 = startSketchOn('-XZ')
angle: topAng,
to: totalHeightHalf,
}, %, $seg04)
|> xLineTo(totalLen, %, $seg03')
|> xLineTo(totalLen, %, $seg03)
|> yLine(-armThick, %, $seg01)
|> angledLineThatIntersects({
angle: HALF_TURN,
@ -689,14 +689,14 @@ test('Sketch on face with none z-up', async ({ page, context }) => {
'persistCode',
`const part001 = startSketchOn('-XZ')
|> startProfileAt([1.4, 2.47], %)
|> line([9.31, 10.55], %, 'seg01')
|> line([9.31, 10.55], %, $seg01)
|> line([11.91, -10.42], %)
|> close(%)
|> extrude(${KCL_DEFAULT_LENGTH}, %)
const part002 = startSketchOn(part001, 'seg01')
const part002 = startSketchOn(part001, seg01)
|> startProfileAt([8, 8], %)
|> line([4.68, 3.05], %)
|> line([0, -7.79], %, 'seg02')
|> line([0, -7.79], %)
|> close(%)
|> extrude(${KCL_DEFAULT_LENGTH}, %)
`
@ -711,7 +711,7 @@ const part002 = startSketchOn(part001, 'seg01')
// wait for execution done
await expect(
page.locator('[data-message-type="execution-done"]')
).toHaveCount(2)
).toHaveCount(1, { timeout: 10_000 })
await u.closeDebugPanel()
// Wait for the second extrusion to appear
@ -761,7 +761,7 @@ test('Zoom to fit on load - solid 2d', async ({ page, context }) => {
// wait for execution done
await expect(
page.locator('[data-message-type="execution-done"]')
).toHaveCount(2)
).toHaveCount(1)
await u.closeDebugPanel()
// Wait for the second extrusion to appear
@ -798,7 +798,7 @@ test('Zoom to fit on load - solid 3d', async ({ page, context }) => {
// wait for execution done
await expect(
page.locator('[data-message-type="execution-done"]')
).toHaveCount(2)
).toHaveCount(1)
await u.closeDebugPanel()
// Wait for the second extrusion to appear
@ -829,7 +829,7 @@ test.describe('Grid visibility', () => {
// wait for execution done
await expect(
page.locator('[data-message-type="execution-done"]')
).toHaveCount(2)
).toHaveCount(1)
await u.closeDebugPanel()
await u.closeKclCodePanel()
// TODO: Find a way to truly know that the objects have finished
@ -877,7 +877,7 @@ test.describe('Grid visibility', () => {
// wait for execution done
await expect(
page.locator('[data-message-type="execution-done"]')
).toHaveCount(2)
).toHaveCount(1)
await u.closeDebugPanel()
await u.closeKclCodePanel()
// TODO: Find a way to truly know that the objects have finished

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB