2.6 KiB
type, status, category, isAgentGenerated
| type | status | category | isAgentGenerated |
|---|---|---|---|
| Task | AI Gen TODO | QA | true |
Test: Database Entity Consistency Across Pages
Description
Verify that entity data (name, health, damage, faction, hotkey) displayed on the Database entity-detail page matches the same entity's data shown in the Build Calculator's hotkey viewer and timeline.
Rationale
Entity stats are defined in Model/Entity/Data/EntityData.*.cs and consumed by both the Database page (full entity detail) and the Build Calculator (hotkey viewer tooltips, timeline entries). If someone edits the source data and changes a name or stat, it must update consistently across all views. No existing test cross-references entity data between the two pages.
Playwright Feature
This test uses multiple page objects within the same browserContext — one navigating the Database page and another navigating the Build Calculator. Playwright fixtures provide a fresh page per test by default, but you can open additional pages manually with await context.newPage().
Approach
- Open the Database single-entity page for "Acropolis" (e.g.
pageA.goto('/database/acropolis')). - Extract displayed values: name, faction, health, armor type, hotkey.
- Open the Build Calculator (
pageB.goto('/build-calculator')). - Select Q'Rath/Orzum filter.
- Find the Q hotkey button, read its entity name (Acropolis).
- Click the entity name / button, read the EntityClickView name.
- Click the entity in the timeline, read the same detail fields.
- Assert all values match across the three views.
What This Catches
- A typo in
EntityInfoModel.Namethat differs from the label used in the hotkey viewer. - A missing
EntityFactionModelpart that causes an entity to disappear from one view. - A hotkey assignment that renders differently in the Database vs. the Build Calculator.
- Entity requirements or costs that display inconsistently between the tooltip and the entity detail page.
Example Assertion Flow
pageA (Database) pageB (Build Calculator)
───────────────── ────────────────────────
Name: "Acropolis" → Q button shows "Acropolis"
Faction: "Q'Rath" → Only visible with Q'Rath filter
Health: 2300 → EntityClickView shows correct health
Hotkey: "Q" → Entity appears on Q button (group C)
Future Enhancement
Parameterize by entity type — run the same cross-page comparison for army units (Sipari, Xacal), research (Greaves of Ahqar), and immortals (Orzum, Mala) to validate every available entity.