mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Adds assertion to ensure that only one chip is shown when a checkbox list item is selected
This commit is contained in:
@@ -95,6 +95,7 @@ describe('<_AddResourceRole />', () => {
|
||||
|
||||
// Step 2
|
||||
await waitForElement(wrapper, 'EmptyStateBody', el => el.length === 0);
|
||||
expect(wrapper.find('Chip').length).toBe(0);
|
||||
act(() =>
|
||||
wrapper.find('CheckboxListItem[name="foo"]').invoke('onSelect')(true)
|
||||
);
|
||||
@@ -102,6 +103,7 @@ describe('<_AddResourceRole />', () => {
|
||||
expect(
|
||||
wrapper.find('CheckboxListItem[name="foo"]').prop('isSelected')
|
||||
).toBe(true);
|
||||
expect(wrapper.find('Chip').length).toBe(1);
|
||||
act(() => wrapper.find('Button[type="submit"]').prop('onClick')());
|
||||
wrapper.update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user