Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Playwright Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Install Playwright Browsers
run: bunx playwright install --with-deps
- name: Set environment variables
run: |
echo "PUBLIC_TEST_CONTACT_FORM=true" >> $GITHUB_ENV
echo "PUBLIC_POSTHOG_ENABLED=false" >> $GITHUB_ENV
- name: Run Playwright tests
run: bunx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
test-results
.DS_Store
node_modules
/build
Expand All @@ -7,3 +8,4 @@ node_modules
.env.*
!.env.example
.vercel
playwright-report
55 changes: 41 additions & 14 deletions bun.lock

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions e2e/around-the-world.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { expect, test } from '@playwright/test';

test('can load all pages', async ({ page }) => {
await page.goto('/');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/screenshot-maker');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/pagespeed-testing');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/github-repositories-viewer-app');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/git-branch-name-raycast-extension');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/i-made-an-extension');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/getting-started-as-a-web-developer-in-2022');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/blog/set-up-some-aliases');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/uses');
await expect(page.locator('h1')).toBeVisible();

await page.goto('/policies');
await expect(page.locator('h1')).toBeVisible();
});
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,25 @@
"lint": "prettier --check . && eslint . && prettier --check .",
"format": "prettier --write .",
"out": "bun outdated",
"preinstall": "npx only-allow bun"
"up": "bun update",
"preinstall": "npx only-allow bun",
"test:e2e": "playwright test",
"test": "npm run test:e2e"
},
"devDependencies": {
"@eslint/compat": "^1.3.0",
"@eslint/js": "^9.28.0",
"@eslint/js": "^9.29.0",
"@playwright/test": "^1.49.1",
"@sveltejs/adapter-vercel": "^5.7.2",
"@sveltejs/enhanced-img": "^0.6.0",
"@sveltejs/kit": "^2.21.4",
"@sveltejs/kit": "^2.21.5",
"@sveltejs/vite-plugin-svelte": "^5.1.0",
"@tailwindcss/postcss": "^4.1.10",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.1.10",
"@typescript-eslint/eslint-plugin": "^8.34.0",
"@typescript-eslint/parser": "^8.34.0",
"eslint": "^9.28.0",
"eslint": "^9.29.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-svelte": "^3.9.2",
"globals": "^16.2.0",
Expand All @@ -34,7 +38,7 @@
"prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.6.12",
"sharp": "^0.34.2",
"svelte": "^5.34.1",
"svelte": "^5.34.3",
"svelte-check": "^4.2.1",
"svelte-highlight": "^7.8.3",
"svelte-preprocess": "^6.0.3",
Expand Down
10 changes: 10 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
webServer: {
command: 'bun run build && bun run preview',
port: 4173
},
testDir: 'e2e',
outputDir: 'playwright-report'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
});
28 changes: 20 additions & 8 deletions static/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,63 @@
<priority>0.7</priority>
<lastmod>2022-01-27T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/screenshot-maker</loc>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2025-05-14T16:46:00.845Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/pagespeed-testing</loc>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2025-04-09T16:00:00.000Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/github-repositories-viewer-app</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2023-09-14T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/git-branch-name-raycast-extension</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2023-01-17T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/i-made-an-extension</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2022-05-01T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/getting-started-as-a-web-developer-in-2022</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2022-12-18T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/blog/set-up-some-aliases</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2022-01-27T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/uses</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
<lastmod>2022-01-27T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/policies</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
<lastmod>2022-01-27T23:19:59.711Z</lastmod>
</url>
<url>
<loc>https://michaelbonner.dev/ellie</loc>
<changefreq>daily</changefreq>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
<lastmod>2024-06-25T16:12:21.010Z</lastmod>
</url>
Expand Down
Loading