diff --git a/testing/e2e/fixtures/map/map.fixture.ts b/testing/e2e/fixtures/map/map.fixture.ts index 9860b5a..4ea6ec0 100644 --- a/testing/e2e/fixtures/map/map.fixture.ts +++ b/testing/e2e/fixtures/map/map.fixture.ts @@ -2,8 +2,8 @@ import { authFixture } from "../auth.fixture"; import { Map } from "./map"; export const mapFixture = authFixture.extend<{ map: Map }>({ - map: async ({ page, account }, use) => { - const map = new Map(page, account); + map: async ({ page }, use) => { + const map = new Map(page); await map.create(); await use(map); }, diff --git a/testing/e2e/fixtures/map/map.ts b/testing/e2e/fixtures/map/map.ts index 157c827..ca75074 100644 --- a/testing/e2e/fixtures/map/map.ts +++ b/testing/e2e/fixtures/map/map.ts @@ -1,14 +1,11 @@ import { expect, Page } from "@playwright/test"; -import { Account } from "../auth.fixture"; export class Map { - constructor( - public readonly page: Page, - public readonly account: Account, - ) {} + constructor(public readonly page: Page) {} - async create() { - const mapName = `E2E Map ${this.account.eveId}`; + async create(name?: string) { + const hash = crypto.randomUUID().slice(9, 13); + const mapName = name || `E2E Map ${hash}`; await this.page.goto("/system/J104809"); await this.page.getByRole("button", { name: "Select active map" }).click(); await this.page.getByRole("menuitem", { name: "New Map" }).click();