Herstel: uitnodigingslink bevat het admin-basispad

De frontend bouwde origin + inviteLink; op een host waar de root een aparte website is
leidde de link naar die website. Nu origin + BASE_URL + pad via buildAppUrl.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 12:44:25 +01:00
co-authored by Claude Sonnet 5.5
parent 61fa5ba65d
commit 0908f42213
6 changed files with 87 additions and 4 deletions
@@ -53,7 +53,13 @@ describe('InviteUserDialog', () => {
await userEvent.click(screen.getByTestId('invite-dialog-submit'));
expect(await screen.findByTestId('invite-dialog-link-input')).toBeInTheDocument();
const linkInput = await screen.findByTestId('invite-dialog-link-input');
expect(linkInput).toBeInTheDocument();
// origin + app base + the path from the API (base is '/' under test, '/admin/' in a build).
expect((linkInput as HTMLInputElement).value).toBe(
`${window.location.origin}${import.meta.env.BASE_URL.replace(/\/+$/, '')}/invite/complete?token=${(linkInput as HTMLInputElement).value.split('token=')[1]}`,
);
expect((linkInput as HTMLInputElement).value).toContain('/invite/complete?token=');
expect(screen.getByTestId('invite-dialog-copy')).toBeInTheDocument();
});