feat(web): add Inventar öffnen button to the victory screen

This commit is contained in:
Bastian Wagner
2026-08-20 18:04:13 +02:00
parent 724443de1e
commit b1968da754
4 changed files with 32 additions and 3 deletions

View File

@@ -275,6 +275,15 @@ describe('CombatPageComponent', () => {
expect(router.navigate).toHaveBeenCalledWith(['/hunt']);
});
it('navigates to /inventory from the victory screen', async () => {
const fixture = await setup({ ...activeCombat, status: 'WON' });
const element = fixture.nativeElement as HTMLElement;
element.querySelector<HTMLButtonElement>('[data-combat-to-inventory]')?.click();
expect(router.navigate).toHaveBeenCalledWith(['/inventory']);
});
it('shows an error and retries loading the combat', async () => {
const fixture = await setup(null);
combatStore.error.set('Dieser Kampf wurde nicht gefunden.');