Contactformulier-module, banners, thema's, taalbestanden en CI-herstructurering #15

Merged
Sluijsens merged 84 commits from feature/contact-forms-module into master 2026-11-16 11:51:12 +01:00
2 changed files with 14 additions and 2 deletions
Showing only changes of commit 21bdddc10d - Show all commits
@@ -52,13 +52,15 @@ export function MessagesTable({ items, onOpen }: Props) {
<tr
key={m.id}
data-testid={`contact-row-${m.id}`}
className={
// The whole row opens the message; the name stays a real button for keyboard and screen readers.
onClick={() => onOpen(m.id)}
className={`cursor-pointer hover:bg-muted/50 ${
m.status === 'spam'
? 'bg-destructive/5'
: m.status === 'new'
? 'font-semibold'
: ''
}
}`}
>
<td className="p-2 whitespace-nowrap">
{format.format(new Date(m.receivedAt))}
@@ -696,3 +696,13 @@ describe('Dashboard tile', () => {
expect(screen.queryByTestId('messages-tile')).not.toBeInTheDocument();
});
});
describe('Clickable row', () => {
it('opens the message when any cell of the row is clicked', async () => {
await openPage();
const row = await screen.findByTestId(`contact-row-${MSG_READ}`);
await userEvent.click(within(row).getByText('Onderhoudspakket'));
expect(await screen.findByTestId('contact-message-dialog')).toBeInTheDocument();
expect(await screen.findByTestId('contact-message-body')).toHaveTextContent('Hallo');
});
});