diff --git a/.github/workflows/component-tests_kitbook.yml b/.github/workflows/component-tests_kitbook.yml index 48811a1b..339a7335 100644 --- a/.github/workflows/component-tests_kitbook.yml +++ b/.github/workflows/component-tests_kitbook.yml @@ -31,7 +31,7 @@ jobs: run: pnpm install - name: Run Playwright Component tests - run: pnpm build && pnpm -F kitbook test:components + run: pnpm build && pnpm -F kitbook test:components:update env: CI: true PLAYWRIGHT_BASE_URL: ${{ github.event.deployment_status.target_url }} @@ -40,7 +40,7 @@ jobs: uses: actions-hub/gcloud@master env: PROJECT_ID: components-check - APPLICATION_CREDENTIALS: ${{ secrets.GCS_COMPONENT_CHECK_BUCKETS_CREDENTIALS }} + APPLICATION_CREDENTIALS: ${{ secrets.GCS_COMPONENT_CHECK_BUCKETS_CREDENTIALS_BASE64 }} with: args: storage rm gs://component-snapshots/kitbook/main/** --verbosity=critical # set verbosity to ignore errors emitted when nothing is found to delete diff --git a/.github/workflows/component-tests_template.yml b/.github/workflows/component-tests_template.yml index abb7c63f..12ba0f41 100644 --- a/.github/workflows/component-tests_template.yml +++ b/.github/workflows/component-tests_template.yml @@ -40,7 +40,7 @@ jobs: uses: actions-hub/gcloud@master env: PROJECT_ID: components-check - APPLICATION_CREDENTIALS: ${{ secrets.GCS_COMPONENT_CHECK_BUCKETS_CREDENTIALS }} + APPLICATION_CREDENTIALS: ${{ secrets.GCS_COMPONENT_CHECK_BUCKETS_CREDENTIALS_BASE64 }} with: args: storage rm gs://component-snapshots/kitbook-template/main/** --verbosity=critical # set verbosity to ignore errors emitted when nothing is found to delete diff --git a/.gitignore b/.gitignore index ca6d80fa..0ba26782 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ .DS_Store node_modules ins.md +key.json playwright-report test-results # ensure locally create snapshots are not committed -*win32.png \ No newline at end of file +**/e2e/snapshots/* \ No newline at end of file diff --git a/packages/kitbook/e2e/kitbook.spec.ts b/packages/kitbook/e2e/kitbook.spec.ts index 20ec1bd2..3432cacd 100644 --- a/packages/kitbook/e2e/kitbook.spec.ts +++ b/packages/kitbook/e2e/kitbook.spec.ts @@ -5,6 +5,7 @@ import kitbookConfig from '../kitbook.config' const skipFiles = [ '/docs/1-variants/DefaultSlot', '/lib/routes/sandbox/[...file]/+page', + '/lib/routes/sandbox/[...file]/mockComponents/NeedsPropsToNotError', // this page intentionally errors ] const variantModules = await getVariants({ skipFiles }) diff --git a/packages/kitbook/package.json b/packages/kitbook/package.json index 7250bb1c..8b71c67f 100644 --- a/packages/kitbook/package.json +++ b/packages/kitbook/package.json @@ -77,7 +77,8 @@ "check": "svelte-check --tsconfig ./tsconfig.json --threshold warning --diagnostic-sources js,svelte", "check:watch": "svelte-check --tsconfig ./jsconfig.json --threshold warning --diagnostic-sources js,svelte --watch", "test": "vitest", - "test:components": "playwright test kitbook --update-snapshots" + "test:components": "playwright test kitbook", + "test:components:update": "playwright test kitbook --update-snapshots" }, "svelte": "./dist/index.js", "peerDependencies": {