Move Cancel left and rename Back to Accept in the block modal
This commit is contained in:
@@ -113,4 +113,24 @@ describe('BlockModal', () => {
|
||||
expect(typeof result).toBe('function');
|
||||
await expect.element(page.getByRole('alert')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('shows Cancel with Accept in the browse step, and Accept returns to the details', async () => {
|
||||
mount();
|
||||
|
||||
const browse = page.getByRole('button', { name: 'Browse proclamations' });
|
||||
await expect.element(browse).toBeInTheDocument();
|
||||
(browse.element() as HTMLElement).click();
|
||||
|
||||
await expect.element(page.getByRole('button', { name: 'Cancel' })).toBeInTheDocument();
|
||||
const accept = page.getByRole('button', { name: 'Accept' });
|
||||
await expect.element(accept).toBeInTheDocument();
|
||||
await expect
|
||||
.element(page.getByRole('button', { name: 'Create Block' }))
|
||||
.not.toBeInTheDocument();
|
||||
|
||||
(accept.element() as HTMLElement).click();
|
||||
|
||||
await expect.element(page.getByRole('button', { name: 'Create Block' })).toBeInTheDocument();
|
||||
await expect.element(page.getByRole('button', { name: 'Accept' })).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user