Skip to content

Images are broken after adding playwright tests to build #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
"predev": "concurrently 'npm run clean' 'npm run generate-tags'",
"dev": "eleventy --serve --quiet",
"debug:eleventy": "DEBUG=Eleventy* eleventy",
"generate-tags": "./tools/tag-helper.js 'content/blog' 'data/content-tags.json'",
"generate-tags": "node ./tools/tag-helper.js 'content/blog' 'data/content-tags.json'",
"prestart": "npm run build",
"start": "http-server ./dist --port 8081",
"test": "playwright test --config=playwright.config.js"
"start": "http-server ./_site --port 8081",
"test": "playwright test --config=playwright.config.js",
"postinstall": "playwright install-deps"
},
"devDependencies": {
"@11ty/eleventy": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:8080',
baseURL: 'http://localhost:8081',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down Expand Up @@ -72,8 +72,8 @@ export default defineConfig({
],

webServer: {
command: 'npm run dev',
url: 'http://127.0.0.1:8080',
command: 'npm start',
url: 'http://127.0.0.1:8081',
reuseExistingServer: !process.env.CI,
},
});
Expand Down
3 changes: 2 additions & 1 deletion tests/metadata.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ test.describe('Page Metadata Checks', () => {

test.beforeAll(async () => {
// Replace with your sitemap URL
const sitemapUrl = 'http://localhost:8080/sitemap.xml';
const sitemapUrl = 'http://localhost:8081/sitemap.xml';

routes = await getRoutesFromSitemap(sitemapUrl);
});

Expand Down