Skip to content

Commit c84e142

Browse files
committed
fix interop test version naming
travis-multirunner was mapping "unstable" to dev/nightly for Chrome and Firefox. Do the same here.
1 parent b3183c8 commit c84e142

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/interop-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
browserA: [chrome, firefox]
1313
browserB: [firefox, chrome]
14-
bver: ['unstable']
14+
bver: [unstable]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

test/webdriver.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,23 @@ if (os.platform() === 'win32') {
3535
process.env.PATH += ':node_modules/.bin';
3636
}
3737

38+
function mapVersion(browser, version) {
39+
const versionMap = {
40+
chrome: {
41+
unstable: 'dev',
42+
},
43+
firefox: {
44+
unstable: 'nightly',
45+
}
46+
};
47+
return (versionMap[browser] || {})[version] || version;
48+
}
49+
3850
async function buildDriver(browser = process.env.BROWSER || 'chrome', options = {version: process.env.BVER}) {
51+
const version = mapVersion(options.version);
3952
const platform = puppeteerBrowsers.detectBrowserPlatform();
4053

41-
const buildId = await download(browser, options.version || 'stable',
54+
const buildId = await download(browser, version || 'stable',
4255
cacheDir, platform);
4356

4457
// Chrome options.
@@ -88,7 +101,7 @@ async function buildDriver(browser = process.env.BROWSER || 'chrome', options =
88101

89102
// Safari options.
90103
const safariOptions = new safari.Options();
91-
safariOptions.setTechnologyPreview(options.version === 'unstable');
104+
safariOptions.setTechnologyPreview(version === 'unstable');
92105

93106
// Firefox options.
94107
const firefoxOptions = new firefox.Options();

0 commit comments

Comments
 (0)