1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00
This commit is contained in:
sjaanus 2024-05-14 10:03:06 +03:00
parent f461c3c299
commit eb38f4c6cf
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

View File

@ -30,7 +30,7 @@ test('dialog opens correctly and can be closed', async () => {
setup();
expect(screen.getByText('Mark completed')).toBeInTheDocument();
userEvent.click(screen.getByText('Cancel'));
await userEvent.click(screen.getByText('Cancel'));
expect(setIsOpen).toHaveBeenCalledWith(false);
});
@ -38,26 +38,26 @@ test('selecting options updates state appropriately', async () => {
setup();
const radioKept = screen.getByLabelText('We decided to keep the feature');
userEvent.click(radioKept);
await userEvent.click(radioKept);
expect(radioKept).toBeChecked();
const radioDiscarded = screen.getByLabelText(
'We decided to discard the feature',
);
userEvent.click(radioDiscarded);
await userEvent.click(radioDiscarded);
expect(radioDiscarded).toBeChecked();
const radioVariant = screen.getByLabelText(
'We decided to keep the feature variant',
);
userEvent.click(radioVariant);
await userEvent.click(radioVariant);
expect(radioVariant).toBeChecked();
});
test('variant selection is shown when appropriate', async () => {
setup();
userEvent.click(
await userEvent.click(
screen.getByLabelText('We decided to keep the feature variant'),
);