diff --git a/packages/e2e/src/constants.ts b/packages/e2e/src/constants.ts new file mode 100644 index 000000000..db39de7eb --- /dev/null +++ b/packages/e2e/src/constants.ts @@ -0,0 +1,6 @@ +/** + * Shared constants for E2E specs — keep hard-coded URLs here (rather than as + * per-spec consts) so they're maintained in one place. + */ + +export const SDV_MOD_URL = "https://www.nexusmods.com/stardewvalley/mods/2400"; diff --git a/packages/e2e/src/tests/mods-deploy.spec.ts b/packages/e2e/src/tests/mods-deploy.spec.ts index e5dab0f28..c52995675 100644 --- a/packages/e2e/src/tests/mods-deploy.spec.ts +++ b/packages/e2e/src/tests/mods-deploy.spec.ts @@ -7,6 +7,7 @@ * Deploy it from the Mods list. Runs for both free and premium. * */ +import { SDV_MOD_URL } from "../constants"; import { test, expect, type NexusUser } from "../fixtures/vortex-app"; import { downloadModViaModManager } from "../helpers/modDownload"; import { Timeouts } from "../helpers/timeouts"; @@ -15,8 +16,6 @@ import { ModsPage } from "../selectors/modsPage"; import { NavBar } from "../selectors/navbar"; import { AUTOMATION_LABELS, SettingsPage } from "../selectors/settings"; -const SDV_MOD_URL = "https://www.nexusmods.com/stardewvalley/mods/2400"; - const TIERS = [ { tier: "free", user: freeUser }, { tier: "premium", user: premiumUser }, diff --git a/packages/e2e/src/tests/mods-manual.spec.ts b/packages/e2e/src/tests/mods-manual.spec.ts index 935fce451..858a7a8f0 100644 --- a/packages/e2e/src/tests/mods-manual.spec.ts +++ b/packages/e2e/src/tests/mods-manual.spec.ts @@ -7,6 +7,7 @@ import path from "node:path"; * has no real launcher). Native file picker is bypassed by overriding * dialog.showOpenDialog from the test side. */ +import { SDV_MOD_URL } from "../constants"; import { test, expect, type NexusUser } from "../fixtures/vortex-app"; import { acceptConsent } from "../helpers/consent"; import { Timeouts } from "../helpers/timeouts"; @@ -15,8 +16,6 @@ import { ModsPage } from "../selectors/modsPage"; import { NavBar } from "../selectors/navbar"; import { NexusModPage } from "../selectors/nexusModPage"; -const SDV_MOD_URL = "https://www.nexusmods.com/stardewvalley/mods/2400"; - const TIERS = [ { tier: "free", user: freeUser }, { tier: "premium", user: premiumUser }, diff --git a/packages/e2e/src/tests/mods.spec.ts b/packages/e2e/src/tests/mods.spec.ts index 6e4182fdd..6e76cdef2 100644 --- a/packages/e2e/src/tests/mods.spec.ts +++ b/packages/e2e/src/tests/mods.spec.ts @@ -3,14 +3,13 @@ * SMAPI (mods/2400) — picked because it has no further prerequisites, so the * install completes cleanly. Premium users skip the slow-download interstitial. */ +import { SDV_MOD_URL } from "../constants"; import { test, expect, type NexusUser } from "../fixtures/vortex-app"; import { downloadModViaModManager } from "../helpers/modDownload"; import { Timeouts } from "../helpers/timeouts"; import { freeUser, premiumUser } from "../helpers/users"; import { NavBar } from "../selectors/navbar"; -const SDV_MOD_URL = "https://www.nexusmods.com/stardewvalley/mods/2400"; - const TIERS = [ { tier: "free", user: freeUser }, { tier: "premium", user: premiumUser },