mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 16:01:20 -03:30
Adds assertion to ensure that only one chip is shown when a checkbox list item is selected
This commit is contained in:
parent
c2c93e7a66
commit
177901eca6
@ -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();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user