Skip to content

Commit d1fc8ad

Browse files
authored
Merge pull request #262 from davidwesst/hf/broken-images
Images are broken after adding playwright tests to build
2 parents b765c04 + b8535a7 commit d1fc8ad

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
"predev": "concurrently 'npm run clean' 'npm run generate-tags'",
2323
"dev": "eleventy --serve --quiet",
2424
"debug:eleventy": "DEBUG=Eleventy* eleventy",
25-
"generate-tags": "./tools/tag-helper.js 'content/blog' 'data/content-tags.json'",
25+
"generate-tags": "node ./tools/tag-helper.js 'content/blog' 'data/content-tags.json'",
2626
"prestart": "npm run build",
27-
"start": "http-server ./dist --port 8081",
28-
"test": "playwright test --config=playwright.config.js"
27+
"start": "http-server ./_site --port 8081",
28+
"test": "playwright test --config=playwright.config.js",
29+
"postinstall": "playwright install-deps"
2930
},
3031
"devDependencies": {
3132
"@11ty/eleventy": "^3.0.0",

playwright.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2828
use: {
2929
/* Base URL to use in actions like `await page.goto('/')`. */
30-
baseURL: 'http://localhost:8080',
30+
baseURL: 'http://localhost:8081',
3131

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

7474
webServer: {
75-
command: 'npm run dev',
76-
url: 'http://127.0.0.1:8080',
75+
command: 'npm start',
76+
url: 'http://127.0.0.1:8081',
7777
reuseExistingServer: !process.env.CI,
7878
},
7979
});

tests/metadata.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ test.describe('Page Metadata Checks', () => {
2929

3030
test.beforeAll(async () => {
3131
// Replace with your sitemap URL
32-
const sitemapUrl = 'http://localhost:8080/sitemap.xml';
32+
const sitemapUrl = 'http://localhost:8081/sitemap.xml';
33+
3334
routes = await getRoutesFromSitemap(sitemapUrl);
3435
});
3536

0 commit comments

Comments
 (0)