feat(web): add Inventar öffnen button to the victory screen
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user