feat(library): add the merge duplicate dialog
Build, Test & Push Frontend / quality-check (push) Successful in 18s
Build, Test & Push Frontend / docker (push) Successful in 24s

This commit is contained in:
lobo committed 2026-09-28 11:25:45 +02:00
1 parent 01ae372b2d
commit 78ba0700c8
10 files changed
+355 -84

No files matched your search

+10
View File
@@ -257,6 +257,15 @@ describe('GameDetail of a game added by hand', () => {
expect(await screen.findByText('CORRECTION.TITLE')).toBeTruthy();
});
it('offers "merge duplicate" to an active auditor', async () => {
loggedInAs({role: 'AUDITOR', activeRole: 'AUDITOR'});
renderDetail();
fireEvent.click(await screen.findByRole('button', {name: 'MERGE.OPEN'}));
expect(await screen.findByText('MERGE.TITLE')).toBeTruthy();
});
it('offers nothing to a user or to an admin viewing as user', async () => {
for (const me of [{role: 'USER', activeRole: 'USER'}, {role: 'PLATFORM_ADMIN', activeRole: 'USER'}]) {
loggedInAs(me);
@@ -267,6 +276,7 @@ describe('GameDetail of a game added by hand', () => {
// Let the answer of /me reach the page before looking for the button.
await act(async () => {});
expect(screen.queryByRole('button', {name: 'CORRECTION.OPEN'})).toBeNull();
expect(screen.queryByRole('button', {name: 'MERGE.OPEN'})).toBeNull();
cleanup();
}
});