Merge branch 'worktree-playable-slice-0.5-first-upgrade'
# Conflicts: # apps/web/src/app/core/api/game-api.service.ts # apps/web/src/app/features/combat/combat-page/combat-page.component.html # apps/web/src/app/features/combat/combat-page/combat-page.component.scss # apps/web/src/app/features/combat/combat-page/combat-page.component.spec.ts # apps/web/src/app/features/combat/combat-page/combat-page.component.ts
This commit is contained in:
@@ -294,6 +294,15 @@ describe('CombatPageComponent', () => {
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/location']);
|
||||
});
|
||||
|
||||
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.');
|
||||
|
||||
Reference in New Issue
Block a user