fix(notification): replace view-all anchor with button to prevent iframe navigation #552

Merged
marcel merged 5 commits from feat/issue-545-notification-dropdown-iframe-fix into main 2026-05-12 18:56:14 +02:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 89860403f6 - Show all commits

View File

@@ -135,7 +135,6 @@ function handleViewAll() {
<div class="border-t border-line px-4 py-2">
<button
type="button"
role="link"
onclick={handleViewAll}
class="min-h-[44px] px-1 text-xs font-medium text-ink-2 transition-colors hover:text-ink"
>

View File

@@ -159,7 +159,7 @@ describe('NotificationDropdown', () => {
expect(onMarkAllRead).toHaveBeenCalledOnce();
});
it('calls onClose when the view-all link is clicked', async () => {
it('calls onClose when the view-all button is clicked', async () => {
const onClose = vi.fn();
render(NotificationDropdown, {
props: {
@@ -170,12 +170,12 @@ describe('NotificationDropdown', () => {
}
});
await page.getByRole('link', { name: /alle aktivitäten|view all/i }).click();
await page.getByRole('button', { name: /alle aktivitäten|view all/i }).click();
expect(onClose).toHaveBeenCalledOnce();
});
it('navigates to /aktivitaeten when the view-all link is clicked', async () => {
it('navigates to /aktivitaeten when the view-all button is clicked', async () => {
render(NotificationDropdown, {
props: {
notifications: [],
@@ -185,7 +185,7 @@ describe('NotificationDropdown', () => {
}
});
await page.getByRole('link', { name: /alle aktivitäten|view all/i }).click();
await page.getByRole('button', { name: /alle aktivitäten|view all/i }).click();
expect(goto).toHaveBeenCalledWith('/aktivitaeten');
});
@@ -203,7 +203,7 @@ describe('NotificationDropdown', () => {
}
});
await page.getByRole('link', { name: /alle aktivitäten|view all/i }).click();
await page.getByRole('button', { name: /alle aktivitäten|view all/i }).click();
expect(callOrder).toEqual(['close', 'goto']);
});