Skip to content

Commit

Permalink
test: reenable Firefox stable testing
Browse files Browse the repository at this point in the history
fixes #1136
  • Loading branch information
fippo committed Mar 30, 2024
1 parent 54ab59d commit f5d3a63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome]
version: [stable, beta, dev]
browser: [chrome, stable]
version: [stable, beta]
include:
- browser: firefox
version: nightly
version: [nightly, esr]
include:
- browser: chrome
version: [dev]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
22 changes: 0 additions & 22 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,7 @@
const os = require('os');
const puppeteerBrowsers = require('@puppeteer/browsers');

async function determineFirefoxVersion(version) {
const rawVersions = await fetch('https://product-details.mozilla.org/1.0/firefox_versions.json');
const versions = await rawVersions.json();
return versions.FIREFOX_NIGHTLY;
// TODO: support stable, beta, nightly, esr.
// This has issues with the assumptions browsers makes about download urls
// (or Firefox about directory structure and where it includes the platform)
// This base url coems close:
// 'https://archive.mozilla.org/pub/firefox/releases/' + buildId + '/' + platform + '/en-US/';
}

async function download(browser, version, cacheDir, platform) {
if (browser === 'firefox') {
// TODO: see above, resolve stable, beta, nightly, esr
const buildId = await determineFirefoxVersion(version);
await puppeteerBrowsers.install({
browser,
buildId,
cacheDir,
platform,
});
return buildId;
}
const buildId = await puppeteerBrowsers
.resolveBuildId(browser, platform, version);
await puppeteerBrowsers.install({
Expand Down

0 comments on commit f5d3a63

Please sign in to comment.