Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 7af9d73

Browse files
committed
fix(browser-service-worker): move initial page.goto inside test
1 parent 76a94cc commit 7af9d73

File tree

1 file changed

+7
-5
lines changed
  • examples/browser-service-worker/tests

1 file changed

+7
-5
lines changed

examples/browser-service-worker/tests/test.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ play.describe('browser service worker:', () => {
1212
const textDOM = "body"
1313
const debugDOM = "#debug"
1414

15-
play.beforeEach(async ({servers, page}) => {
16-
await page.goto(`http://localhost:${servers[0].port}/`);
17-
})
15+
// play.beforeEach(async ({servers, page}) => {
16+
// await page.goto(`http://localhost:${servers[0].port}/`);
17+
// })
1818

19-
play('should properly load the content of an IPFS hash', async ({ page }) => {
19+
play('should properly load the content of an IPFS hash', async ({ servers, page }) => {
20+
const currentURL = `http://localhost:${servers[0].port}/`
21+
await page.goto(currentURL);
2022
await page.waitForSelector(textDOM)
2123
await page.waitForSelector(linkDOM)
2224

@@ -27,7 +29,7 @@ play.describe('browser service worker:', () => {
2729
state: 'attached'
2830
})
2931

30-
const currentURL = await page.url();
32+
// const currentURL = await page.url();
3133
await page.goto(`${currentURL}ipfs/Qmf412jQZiuVUtdgnB36FXFX7xg5V6KEbSJ4dpQuhkLyfD`);
3234
await page.waitForSelector(textDOM)
3335

0 commit comments

Comments
 (0)