fix(web): sweep every remaining fixture off level/experience/requiredLevel
Task 17 (final task) of Renown & Reputation Foundation. Fixes the last 3 compile errors blocking the web suite (app.spec.ts, world.store.spec.ts) by aligning CharacterResponse fixtures to the real renown-only shape, and removes the two remaining dead 'experience' reward-preview leftovers (current-location fixture entry, location-icon glyph) now that the API no longer seeds them. Full web suite: 24 files / 228 tests, all green, for the first time this entire slice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -141,8 +141,7 @@ describe('App', () => {
|
||||
character.set({
|
||||
id: 'character-id',
|
||||
name: 'Mara Ashfall',
|
||||
level: 7,
|
||||
experience: 320,
|
||||
renown: 7,
|
||||
silver: 150,
|
||||
currentHp: 52,
|
||||
maxHp: 80,
|
||||
@@ -155,10 +154,9 @@ describe('App', () => {
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain(
|
||||
'Mara Ashfall',
|
||||
);
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('Stufe 7');
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('Ansehen 7');
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('52 / 80');
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('150');
|
||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('320');
|
||||
});
|
||||
|
||||
it('lands root and unknown routes on the place the character is standing in', () => {
|
||||
|
||||
@@ -171,7 +171,6 @@ export function burnedRoadFixture(
|
||||
],
|
||||
rewardPreview: [
|
||||
{ key: 'silver', label: 'Silber', iconKey: 'silver' },
|
||||
{ key: 'experience', label: 'Erfahrung', iconKey: 'experience' },
|
||||
{ key: 'equipment', label: 'Ausrüstung', iconKey: 'equipment' },
|
||||
{ key: 'material', label: 'Material', iconKey: 'material' },
|
||||
],
|
||||
|
||||
@@ -22,8 +22,6 @@ const GLYPHS: Readonly<Record<string, string>> = {
|
||||
map: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M15.5 8.5l-2 5-5 2 2-5z',
|
||||
// Struck coin.
|
||||
silver: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M12 7l1.7 3.3L17 12l-3.3 1.7L12 17l-1.7-3.3L7 12l3.3-1.7z',
|
||||
// Rising rune.
|
||||
experience: 'M12 3 4 12l8 9 8-9zM12 8v8M9 11l3-3 3 3',
|
||||
// Blade over a shield.
|
||||
equipment: 'M12 3 5 6v6c0 4 3 7 7 9 4-2 7-5 7-9V6zM12 8v7M10 10l2-2 2 2',
|
||||
// Bundled pelt.
|
||||
|
||||
@@ -82,7 +82,6 @@ describe('LocationSidebarComponent', () => {
|
||||
|
||||
expect([...rewards].map((item) => item.textContent?.trim())).toEqual([
|
||||
'Silber',
|
||||
'Erfahrung',
|
||||
'Ausrüstung',
|
||||
'Material',
|
||||
]);
|
||||
|
||||
@@ -14,8 +14,7 @@ import { WorldStore } from './world.store';
|
||||
const character: CharacterResponse = {
|
||||
id: 'character-id',
|
||||
name: 'Aric Duskwalker',
|
||||
level: 1,
|
||||
experience: 0,
|
||||
renown: 1,
|
||||
silver: 0,
|
||||
currentHp: 100,
|
||||
maxHp: 100,
|
||||
@@ -355,10 +354,9 @@ describe('WorldStore', () => {
|
||||
it('refreshCharacter replaces the character from authoritative server data', async () => {
|
||||
await store.load();
|
||||
|
||||
api.getCharacter.mockReturnValue(of({ ...character, experience: 32, silver: 18 }));
|
||||
api.getCharacter.mockReturnValue(of({ ...character, silver: 18 }));
|
||||
await store.refreshCharacter();
|
||||
|
||||
expect(store.character()?.experience).toBe(32);
|
||||
expect(store.character()?.silver).toBe(18);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user