diff --git a/__tests__/e2e/peer1.test.js b/__tests__/e2e/peer1.test.js index 18fc9d1771d658e6728407ae7a4318f44a72fdd1..58be35eba363059f9737d71352759f692bc64f50 100644 --- a/__tests__/e2e/peer1.test.js +++ b/__tests__/e2e/peer1.test.js @@ -1,6 +1,9 @@ import { Selector } from "testcafe" -fixture`Peer 1`.page`localhost:3000` +const host = "0.0.0.0" +const port = process.env.PORT || 3000 + +fixture`Peer 1`.page`${host}:${port}` const idAppearTimeout = 1000 const selectorOptions = { timeout: 100 } @@ -8,6 +11,7 @@ const selectorOptions = { timeout: 100 } test("Connection id appears", async (t) => { const userId = async () => await Selector("#user-id").with(selectorOptions).value + await t .wait(idAppearTimeout) .expect((await userId()).length) @@ -16,6 +20,7 @@ test("Connection id appears", async (t) => { test("Clicking and dragging on whiteboard creates a single child element", async (t) => { const whiteboard = Selector("#whiteboard").with(selectorOptions) + await t .drag(whiteboard, 10, 10) .expect(whiteboard.childElementCount) diff --git a/__tests__/e2e/peer2.test.js b/__tests__/e2e/peer2.test.js index 01e143e7a40dd64de048f42cc3b2097f94a9a558..38388a98b0e3a27bc520be8d94fe2eaa557fbaa4 100644 --- a/__tests__/e2e/peer2.test.js +++ b/__tests__/e2e/peer2.test.js @@ -1,6 +1,9 @@ import { Selector } from "testcafe" -fixture`Peer 2`.page`localhost:3000` +const host = "0.0.0.0" +const port = process.env.PORT || 3000 + +fixture`Peer 2`.page`${host}:${port}` const selectorOptions = { timeout: 100 }