Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
www
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
www
Commits
d6e6bbc1
Commit
d6e6bbc1
authored
Mar 09, 2026
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix screenshots script (playwright import + load timeout)
parent
46b2c51c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
screenshots.js
next/scripts/screenshots.js
+4
-4
No files found.
next/scripts/screenshots.js
View file @
d6e6bbc1
...
...
@@ -13,9 +13,7 @@
* Also captures anchored sections (#tour, #music, #video, #booking).
*/
// Use @playwright/test's bundled browser launcher
const
{
chromium
}
=
require
(
'playwright-core'
);
// If playwright-core isn't available, fallback:
// yarn add -D playwright-core
const
{
chromium
}
=
require
(
'playwright'
);
const
path
=
require
(
'path'
);
const
fs
=
require
(
'fs'
);
...
...
@@ -32,7 +30,9 @@ const SECTIONS = ['tour', 'music', 'video', 'booking'];
async
function
captureViewport
({
name
,
width
,
height
})
{
const
browser
=
await
chromium
.
launch
();
const
page
=
await
browser
.
newPage
({
viewport
:
{
width
,
height
}
});
await
page
.
goto
(
BASE_URL
,
{
waitUntil
:
'networkidle'
,
timeout
:
15000
});
await
page
.
goto
(
BASE_URL
,
{
waitUntil
:
'load'
,
timeout
:
30000
});
// Wait for content to render
await
new
Promise
((
r
)
=>
setTimeout
(
r
,
2000
));
// Full-page screenshot
await
page
.
screenshot
({
path
:
path
.
join
(
OUT_DIR
,
`
${
name
}
-full.png`
),
fullPage
:
true
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment