Public Access
feat(library): add the merge duplicate dialog
This commit is contained in:
1 parent
01ae372b2d
commit
78ba0700c8
10 files changed
+355
-84
No files matched your search
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user