forked from phenom/healer-man
Release Healer Man 0.1.38
This commit is contained in:
1 parent
361734bc41
commit
b417b7c3c3
48 files changed
+1982
-90
No files matched your search
@@ -7,16 +7,22 @@ import {
|
||||
} from "./dungeonCatalog";
|
||||
import { DUNGEON_MANIFEST } from "./dungeonManifest";
|
||||
import { RUNEWAKER_DUNGEON_DEFINITIONS } from "./generated/runewakerDungeonDefinitions.generated";
|
||||
import { compareDungeonReleaseOrder } from "./dungeonReleaseStage";
|
||||
import availability from "./generated/dungeonAvailability.json";
|
||||
|
||||
describe("dungeon catalog", () => {
|
||||
it("lists the complete generated campaign with authored Wailing Caverns first", () => {
|
||||
it("lists the complete generated campaign with Stormwind Stockades in Beta first", () => {
|
||||
expect(DUNGEON_CATALOG).toHaveLength(84);
|
||||
expect(DUNGEON_CATALOG[0]).toMatchObject({
|
||||
id: DUNGEON_MANIFEST.id,
|
||||
id: "stormwind-stockade",
|
||||
releaseStage: "beta",
|
||||
available: true,
|
||||
});
|
||||
expect(dungeonById(DUNGEON_MANIFEST.id)).toMatchObject({
|
||||
title: DUNGEON_MANIFEST.title,
|
||||
mapId: DUNGEON_MANIFEST.mapId,
|
||||
entranceName: DUNGEON_MANIFEST.entrance.name,
|
||||
available: true,
|
||||
releaseStage: "alpha",
|
||||
});
|
||||
expect(DUNGEON_CATALOG.find((dungeon) => dungeon.id === "deadmines")).toMatchObject({
|
||||
id: "deadmines",
|
||||
@@ -33,10 +39,10 @@ describe("dungeon catalog", () => {
|
||||
|
||||
it("separates WoW and RoM dungeons with all RuneWaker imports under RoM", () => {
|
||||
expect(DUNGEON_CATEGORIES.map((category) => category.id)).toEqual(["wow", "rom"]);
|
||||
expect(dungeonsByCategory("rom").map((dungeon) => dungeon.id)).toEqual([
|
||||
expect(dungeonsByCategory("rom").map((dungeon) => dungeon.id).sort()).toEqual([
|
||||
"forsaken-abbey",
|
||||
...RUNEWAKER_DUNGEON_DEFINITIONS.map((definition) => definition.id),
|
||||
]);
|
||||
].sort());
|
||||
expect(dungeonsByCategory("wow")).not.toContainEqual(
|
||||
expect.objectContaining({ id: "forsaken-abbey" }),
|
||||
);
|
||||
@@ -46,7 +52,7 @@ describe("dungeon catalog", () => {
|
||||
it("keeps stable unique ids and resolves only catalogued dungeons", () => {
|
||||
const ids = DUNGEON_CATALOG.map((dungeon) => dungeon.id);
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
expect(dungeonById(DUNGEON_MANIFEST.id)).toBe(DUNGEON_CATALOG[0]);
|
||||
expect(dungeonById(DUNGEON_MANIFEST.id)).toBe(DUNGEON_CATALOG.find((dungeon) => dungeon.id === DUNGEON_MANIFEST.id));
|
||||
expect(dungeonById("missing-dungeon")).toBeNull();
|
||||
});
|
||||
|
||||
@@ -57,4 +63,30 @@ describe("dungeon catalog", () => {
|
||||
expect(dungeon.summary.trim()).not.toBe("");
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps only Stockades in Beta and alphabetizes each release group", () => {
|
||||
expect(DUNGEON_CATALOG.filter((dungeon) => dungeon.releaseStage === "beta").map((dungeon) => dungeon.id))
|
||||
.toEqual(["stormwind-stockade"]);
|
||||
expect(DUNGEON_CATALOG.filter((dungeon) => dungeon.id !== "stormwind-stockade").every((dungeon) => dungeon.releaseStage === "alpha"))
|
||||
.toBe(true);
|
||||
for (const category of DUNGEON_CATEGORIES) {
|
||||
const dungeons = dungeonsByCategory(category.id);
|
||||
expect(dungeons).toEqual([...dungeons].sort(compareDungeonReleaseOrder));
|
||||
}
|
||||
const stages = [
|
||||
{ title: "Zeta", releaseStage: "alpha" as const },
|
||||
{ title: "Beta Z", releaseStage: "beta" as const },
|
||||
{ title: "Released Z", releaseStage: "full-release" as const },
|
||||
{ title: "Alpha", releaseStage: "alpha" as const },
|
||||
{ title: "Beta A", releaseStage: "beta" as const },
|
||||
{ title: "Released A", releaseStage: "full-release" as const },
|
||||
];
|
||||
expect(stages.sort(compareDungeonReleaseOrder).map((entry) => entry.title))
|
||||
.toEqual(["Released A", "Released Z", "Beta A", "Beta Z", "Alpha", "Zeta"]);
|
||||
});
|
||||
|
||||
it("shares the complete dungeon identity list used to validate reports on the server", () => {
|
||||
expect(DUNGEON_CATALOG.map((dungeon) => dungeon.id).sort())
|
||||
.toEqual(["forsaken-abbey", ...Object.keys(availability.enabled)].sort());
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user