Skip to content
Merged
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
8 changes: 3 additions & 5 deletions e2e/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const BASE_URL = "http://127.0.0.1:8787";

// Check if the path is reachable
async function checkPath(page, path) {
const res = await page.goto(`${BASE_URL}${path}`);
const res = await page.goto(`${BASE_URL}${path}`, { timeout: 60_000 });
check(res, { [`GET ${path} → 200`]: (r) => r && r.status() === 200 });
}

Expand Down Expand Up @@ -54,9 +54,8 @@ async function checkButton(page, path, buttonText) {

// Check if the button is enabled
// Note: In some cases, the button might be visible but not enabled
const isEnabled = await btn.isEnabled();
check(isEnabled, {
[`Button "${buttonText}" on "${path}" is enabled`]: () => isEnabled,
check(btn, {
[`Button "${buttonText}" on "${path}" is enabled`]: () => btn.isEnabled(),
});
}

Expand Down Expand Up @@ -129,7 +128,6 @@ const PAGES = [
async function runChecks(page) {
for (const { path, buttons = [], links = [] } of PAGES) {
await checkPath(page, path);
await page.goto(`${BASE_URL}${path}`, { waitUntil: "networkidle" });
for (const btn of buttons) {
await checkButton(page, path, btn);
}
Expand Down
Loading