Skip to content
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

chore(deps): update node.js to v22 #247

Merged
merged 2 commits into from
Jan 13, 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Only used for testing
FROM node:20-bookworm
FROM node:22-bookworm

WORKDIR /opt

Expand Down
22 changes: 19 additions & 3 deletions tests/selenium.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,28 @@ async function waitForLoad() {
hasLoadingElements ||
debounceValue + busyWait > new Date().getTime()
);
await driver.sleep(busyWait);
}

// making this a little easier to read in tests
async function clickByCss(css) {
let element = await driver.findElement(By.css(css));
await element.click();
async function clickByCss(css, retries = 3) {
let attempts = 0;
while (attempts < retries) {
try {
let element = await driver.findElement(By.css(css));
await element.click();
return;
} catch (error) {
if (error.name === "StaleElementReferenceError") {
console.log(`Attempt ${attempts + 1} failed. Retrying...`);
attempts++;
await driver.sleep(busyWait);
} else {
// Re-throw other errors
throw error;
}
}
}
}

describe("End to end browser tests", () => {
Expand Down
Loading