feat(web): route hunt, combat and arrival back to the location
A finished journey now opens the location view instead of leaving the player on the map, and backing out of the hunt returns to the place the hunt happens in. The victory and defeat screens gain "Zum Ort" alongside "Weiter jagen", so the location is always reachable without costing the hunt loop its one-click rhythm. The store raises the arrival only after the server-owned current location has been re-read, and does not navigate itself — timers, arrival times and the server-side completion are untouched; only the screen that shows the result changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,7 +124,7 @@ describe('HuntPageComponent', () => {
|
||||
return fixture;
|
||||
}
|
||||
|
||||
it('shows the hunting-unavailable state at the Südtor, with no Jagd beginnen button, and a working Zur Karte action', async () => {
|
||||
it('shows the hunting-unavailable state at the Südtor, with no Jagd beginnen button, and a way back to the location', async () => {
|
||||
const fixture = await setup(southGate);
|
||||
const element = fixture.nativeElement as HTMLElement;
|
||||
|
||||
@@ -136,11 +136,11 @@ describe('HuntPageComponent', () => {
|
||||
),
|
||||
).toBe(false);
|
||||
|
||||
const toWorldButton = element.querySelector<HTMLButtonElement>('[data-hunt-to-world]');
|
||||
expect(toWorldButton?.textContent?.trim()).toBe('Zur Karte');
|
||||
toWorldButton?.click();
|
||||
const backButton = element.querySelector<HTMLButtonElement>('[data-hunt-to-location]');
|
||||
expect(backButton?.textContent?.trim()).toBe('Zurück zum Ort');
|
||||
backButton?.click();
|
||||
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/world']);
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/location']);
|
||||
});
|
||||
|
||||
it('calls startHunt when Jagd beginnen is clicked at a hunting-enabled location', async () => {
|
||||
|
||||
Reference in New Issue
Block a user