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({
|
character.set({
|
||||||
id: 'character-id',
|
id: 'character-id',
|
||||||
name: 'Mara Ashfall',
|
name: 'Mara Ashfall',
|
||||||
level: 7,
|
renown: 7,
|
||||||
experience: 320,
|
|
||||||
silver: 150,
|
silver: 150,
|
||||||
currentHp: 52,
|
currentHp: 52,
|
||||||
maxHp: 80,
|
maxHp: 80,
|
||||||
@@ -155,10 +154,9 @@ describe('App', () => {
|
|||||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain(
|
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain(
|
||||||
'Mara Ashfall',
|
'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('52 / 80');
|
||||||
expect(fixture.nativeElement.querySelector('app-top-bar')?.textContent).toContain('150');
|
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', () => {
|
it('lands root and unknown routes on the place the character is standing in', () => {
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ export function burnedRoadFixture(
|
|||||||
],
|
],
|
||||||
rewardPreview: [
|
rewardPreview: [
|
||||||
{ key: 'silver', label: 'Silber', iconKey: 'silver' },
|
{ key: 'silver', label: 'Silber', iconKey: 'silver' },
|
||||||
{ key: 'experience', label: 'Erfahrung', iconKey: 'experience' },
|
|
||||||
{ key: 'equipment', label: 'Ausrüstung', iconKey: 'equipment' },
|
{ key: 'equipment', label: 'Ausrüstung', iconKey: 'equipment' },
|
||||||
{ key: 'material', label: 'Material', iconKey: 'material' },
|
{ 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',
|
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.
|
// 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',
|
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.
|
// 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',
|
equipment: 'M12 3 5 6v6c0 4 3 7 7 9 4-2 7-5 7-9V6zM12 8v7M10 10l2-2 2 2',
|
||||||
// Bundled pelt.
|
// Bundled pelt.
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ describe('LocationSidebarComponent', () => {
|
|||||||
|
|
||||||
expect([...rewards].map((item) => item.textContent?.trim())).toEqual([
|
expect([...rewards].map((item) => item.textContent?.trim())).toEqual([
|
||||||
'Silber',
|
'Silber',
|
||||||
'Erfahrung',
|
|
||||||
'Ausrüstung',
|
'Ausrüstung',
|
||||||
'Material',
|
'Material',
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import { WorldStore } from './world.store';
|
|||||||
const character: CharacterResponse = {
|
const character: CharacterResponse = {
|
||||||
id: 'character-id',
|
id: 'character-id',
|
||||||
name: 'Aric Duskwalker',
|
name: 'Aric Duskwalker',
|
||||||
level: 1,
|
renown: 1,
|
||||||
experience: 0,
|
|
||||||
silver: 0,
|
silver: 0,
|
||||||
currentHp: 100,
|
currentHp: 100,
|
||||||
maxHp: 100,
|
maxHp: 100,
|
||||||
@@ -355,10 +354,9 @@ describe('WorldStore', () => {
|
|||||||
it('refreshCharacter replaces the character from authoritative server data', async () => {
|
it('refreshCharacter replaces the character from authoritative server data', async () => {
|
||||||
await store.load();
|
await store.load();
|
||||||
|
|
||||||
api.getCharacter.mockReturnValue(of({ ...character, experience: 32, silver: 18 }));
|
api.getCharacter.mockReturnValue(of({ ...character, silver: 18 }));
|
||||||
await store.refreshCharacter();
|
await store.refreshCharacter();
|
||||||
|
|
||||||
expect(store.character()?.experience).toBe(32);
|
|
||||||
expect(store.character()?.silver).toBe(18);
|
expect(store.character()?.silver).toBe(18);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user