Skip to content

Commit cbd74d4

Browse files
fix #653 (#654)
* fix #653 * update minor version * Update package.json Co-authored-by: Christian Bromann <[email protected]> * fix linting error Co-authored-by: Christian Bromann <[email protected]>
1 parent a682f2d commit cbd74d4

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

lib/compute-download-urls.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ async function computeDownloadUrls(opts) {
4444
util.format(
4545
isSelenium4(opts.seleniumVersion) ? urls.seleniumV4 : urls.selenium,
4646
opts.seleniumBaseURL,
47-
`selenium-${
48-
isSelenium4(opts.seleniumVersion) ? getVersionWithZeroedPatchPart(opts.seleniumVersion) : opts.seleniumVersion
49-
}`,
47+
isSelenium4(opts.seleniumVersion)
48+
? `selenium-${getVersionWithZeroedPatchPart(opts.seleniumVersion)}`
49+
: opts.seleniumVersion.replace(/(\d+\.\d+)\.\d+/, '$1'),
5050
opts.seleniumVersion
5151
),
5252
};

test/compute-download-urls-test.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('compute-download-urls', () => {
3636
drivers: {},
3737
});
3838

39-
assert.strictEqual(actual.selenium, 'https://localhost/selenium-1.0/selenium-server-standalone-1.0.jar');
39+
assert.strictEqual(actual.selenium, 'https://localhost/1.0/selenium-server-standalone-1.0.jar');
4040
});
4141

4242
it('version with patch', async () => {
@@ -46,7 +46,7 @@ describe('compute-download-urls', () => {
4646
drivers: {},
4747
});
4848

49-
assert.strictEqual(actual.selenium, 'https://localhost/selenium-1.0.1/selenium-server-standalone-1.0.1.jar');
49+
assert.strictEqual(actual.selenium, 'https://localhost/1.0/selenium-server-standalone-1.0.1.jar');
5050
});
5151

5252
it('version with beta string', async () => {
@@ -56,10 +56,7 @@ describe('compute-download-urls', () => {
5656
drivers: {},
5757
});
5858

59-
assert.strictEqual(
60-
actual.selenium,
61-
'https://localhost/selenium-3.0.0-beta2/selenium-server-standalone-3.0.0-beta2.jar'
62-
);
59+
assert.strictEqual(actual.selenium, 'https://localhost/3.0-beta2/selenium-server-standalone-3.0.0-beta2.jar');
6360
});
6461

6562
it('version 4 basic', async () => {

0 commit comments

Comments
 (0)