Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit f8a8054

Browse files
author
Ian Walter
committed
Adding TEST_HOST logic
1 parent a1f132b commit f8a8054

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
container:
1111
image: node:13.6
12+
options: --network-alias testHost
1213
env:
1314
SELENIUM_HUB_HOST: hub
15+
TEST_HOST: testHost
1416
services:
1517
hub:
1618
image: selenium/hub:3.141.59-gold

tests.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ test('test server', async ({ browser, expect }) => {
1515
</html>
1616
`
1717
})
18-
await browser.url(server.url)
18+
const url = new URL(server.url)
19+
if (process.env.TEST_HOST) {
20+
url.host = process.env.TEST_HOST
21+
}
22+
await browser.url(url.href)
1923
expect(await browser.getTitle()).toBe('Hello World!')
2024
})

0 commit comments

Comments
 (0)