Skip to content

Commit

Permalink
[ci] Set timeout to browser tests
Browse files Browse the repository at this point in the history
Co-authored-by: Federico Capoano <f.capoano@openwisp.io>
  • Loading branch information
dee077 and nemesifier authored Feb 28, 2025
1 parent 50fc6e0 commit 1d606a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ jobs:
chromedriver --version
which chromedriver
- name: Tests
run: yarn coverage
- name: Unit tests
run: yarn coverage --testPathIgnorePatterns=test/netjsongraph.browser.test.js

- name: Browser tests
# Test timeout set to 30 seconds in CI since it runs slower
run: yarn test --runInBand --testTimeout=30000 test/netjsongraph.browser.test.js

- name: Coveralls
uses: coverallsapp/github-action@master
Expand Down
4 changes: 3 additions & 1 deletion test/browser.test.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const url = "http://0.0.0.0:8080";
export const getDriver = async () => {
try {
const options = new chrome.Options();
options.addArguments("--headless");
options.addArguments("--headless=new");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--no-sandbox");
options.addArguments("--remote-debugging-pipe");
return new Builder().forBrowser("chrome").setChromeOptions(options).build();
} catch (err) {
Expand Down

0 comments on commit 1d606a7

Please sign in to comment.