Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions e2e/fixtures/map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { type Page, expect } from "@playwright/test";
import { clickViaEvaluate } from "./dom";

/** Matches Playwright `use.geolocation` in playwright.config.ts */
export const E2E_GEOLOCATION = { latitude: 53.35, longitude: -6.26 };

export const LOCAL_GAME_AREA = {
type: "Polygon" as const,
coordinates: [
Expand Down
10 changes: 7 additions & 3 deletions e2e/fixtures/session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Browser, type Page, expect } from "@playwright/test";
import { LOCAL_GAME_AREA } from "./map";
import { E2E_GEOLOCATION, LOCAL_GAME_AREA } from "./map";
import { dismissMapOnboarding, prepareE2EPage } from "./page-init";
import type { BlockExternalAssetsOptions } from "./network";

Expand Down Expand Up @@ -172,8 +172,12 @@ export async function createMultiplayerContexts(
browser: Browser,
network: BlockExternalAssetsOptions = {},
) {
const hostContext = await browser.newContext();
const guestContext = await browser.newContext();
const contextOptions = {
geolocation: E2E_GEOLOCATION,
permissions: ["geolocation"],
};
const hostContext = await browser.newContext(contextOptions);
const guestContext = await browser.newContext(contextOptions);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const hostPage = await hostContext.newPage();
const guestPage = await guestContext.newPage();

Expand Down
Loading