Skip to content

Commit

Permalink
build: change loading behaviour to fix tests
Browse files Browse the repository at this point in the history
- reintroduce tests in cli
  • Loading branch information
DanConwayDev committed Dec 29, 2023
1 parent fb2ad81 commit a0b4b5f
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 11 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- uses: nick-fields/retry@v2
with:
name: Run Storybook tests
timeout_minutes: 5
max_attempts: 9
command: yarn test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Binary file modified __snapshots__/repo-summary-card--loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions __snapshots__/repo-summary-card.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ exports[`Repo/Summary/Card loading smoke-test 1`] = `
<div class="card w-96 bg-neutral text-neutral-focus">
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100">
</span>
<div class="h-6 mt-1 mb-3 skeleton w-40">
</div>
<div class="h-4 mb-1 skeleton w-100">
</div>
</div>
</div>
</div>
Expand Down
Binary file modified __snapshots__/repo-summary-list--loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/repo-summary-list--partially-loaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 16 additions & 8 deletions __snapshots__/repo-summary-list.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,30 @@ exports[`Repo/Summary/List Loading smoke-test 1`] = `
<div class="card w-96 bg-neutral text-neutral-focus">
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100">
</span>
<div class="h-6 mt-1 mb-3 skeleton w-40">
</div>
<div class="h-4 mb-1 skeleton w-100">
</div>
</div>
</div>
</div>
<div class="card w-96 bg-neutral text-neutral-focus">
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100">
</span>
<div class="h-6 mt-1 mb-3 skeleton w-40">
</div>
<div class="h-4 mb-1 skeleton w-100">
</div>
</div>
</div>
</div>
<div class="card w-96 bg-neutral text-neutral-focus">
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100">
</span>
<div class="h-6 mt-1 mb-3 skeleton w-40">
</div>
<div class="h-4 mb-1 skeleton w-100">
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -156,8 +162,10 @@ exports[`Repo/Summary/List Partially Loaded smoke-test 1`] = `
<div class="card w-96 bg-neutral text-neutral-focus">
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100">
</span>
<div class="h-6 mt-1 mb-3 skeleton w-40">
</div>
<div class="h-4 mb-1 skeleton w-100">
</div>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/lib/components/RepoSummaryCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
>
<div class="card-body">
<div class="text-center">
<span class="loading loading-spinner loading-lg text-base-100" />
<div class="h-6 mt-1 mb-3 skeleton w-40"></div>
<div class="h-4 mb-1 skeleton w-100"></div>

<!-- <span class="loading loading-spinner loading-lg text-base-100" /> -->
</div>
</div>
</div>
Expand Down

0 comments on commit a0b4b5f

Please sign in to comment.