Apply patch [skip ci]
This commit is contained in:
parent
d3052a5528
commit
26de468f5a
@ -4,7 +4,7 @@ const FIXED_TIME_MS = new Date("2024-01-01T00:00:00.000Z").getTime();
|
|||||||
|
|
||||||
export async function applyDeterministicPage(page: Page) {
|
export async function applyDeterministicPage(page: Page) {
|
||||||
await page.addInitScript(
|
await page.addInitScript(
|
||||||
({ now }) => {
|
({ now }: { now: number }) => {
|
||||||
Math.random = () => 0.42;
|
Math.random = () => 0.42;
|
||||||
|
|
||||||
const OriginalDate = Date;
|
const OriginalDate = Date;
|
||||||
@ -77,8 +77,8 @@ export async function useE2EUser(page: Page, userKey: string) {
|
|||||||
landlord: "e2e-landlord-1",
|
landlord: "e2e-landlord-1",
|
||||||
"landlord-onboarding": "e2e-landlord-setup-1",
|
"landlord-onboarding": "e2e-landlord-setup-1",
|
||||||
tenant: "e2e-tenant-1",
|
tenant: "e2e-tenant-1",
|
||||||
};
|
} as Record<string, string>;
|
||||||
const userId = userIdMap[userKey] ?? userKey;
|
const userId: string = userIdMap[userKey] ?? userKey;
|
||||||
await page.addInitScript(({ id }: { id: string }) => {
|
await page.addInitScript(({ id }: { id: string }) => {
|
||||||
(window as { __E2E_SKIP_ENCRYPTION__?: boolean }).__E2E_SKIP_ENCRYPTION__ =
|
(window as { __E2E_SKIP_ENCRYPTION__?: boolean }).__E2E_SKIP_ENCRYPTION__ =
|
||||||
true;
|
true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user