Skip to content

Commit 96f49b7

Browse files
committed
🔄 ci: Attempt at fixing test-menu on the CI
1 parent ad6158d commit 96f49b7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/browser.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const makeBrowser = async (headless = false, windowSize = "1200,900") =>
1616
"--no-sandbox",
1717
"--disable-setuid-sandbox",
1818
"--disable-web-security", // Allow clipboard access
19+
"--disable-dev-shm-usage",
1920
],
2021
});
2122
return browser;
@@ -51,10 +52,14 @@ export const visitPaperPage = async (browser, target, options = {}) => {
5152
await p.goto(target);
5253
const paperIsStored = new Promise((resolve, reject) => {
5354
let screenshotTimeout;
54-
p.waitForSelector("meta[name='pm-complete-secret-html']").then(() => {
55-
clearTimeout(screenshotTimeout);
56-
resolve();
57-
});
55+
p.waitForSelector("meta[name='pm-complete-secret-html']")
56+
.then(() => {
57+
clearTimeout(screenshotTimeout);
58+
resolve();
59+
})
60+
.catch(() => {
61+
// Ignore errors (e.g. timeout or target closed)
62+
});
5863
screenshotTimeout = setTimeout(async () => {
5964
const element = await p.evaluate(() => {
6065
return document.querySelector("meta[name='pm-complete-secret-html']");

0 commit comments

Comments
 (0)