We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da57df0 commit fb76700Copy full SHA for fb76700
e2e/test-utils/open-page.js
@@ -1,10 +1,16 @@
1
+const gameStartTime = '2025-01-01T09:00:00'
2
+
3
/**
4
* @param {import('@playwright/test').Page} page
5
* @param {number=} seed
6
* @returns {Promise<import('@playwright/test').Response | null>}
7
*/
-export const openPage = (page, seed = 0.5) => {
8
+export const openPage = async (page, seed = 0.5) => {
9
const appUrl = process.env.APP_URL || 'http://localhost:3000'
10
11
+ // NOTE: A consistent date for the game is set so that time-based events
12
+ // don't interfere with the tests
13
+ await page.clock.install({ time: gameStartTime })
14
15
return page.goto(`${appUrl}?seed=${seed}`)
16
}
0 commit comments