Skip to content

Commit

Permalink
remove duplicate test case
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 24, 2020
1 parent 0ee9f80 commit 6815a59
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1144,10 +1144,11 @@ describe('<Autocomplete />', () => {
expect(combobox).to.have.attribute('aria-expanded', 'true');
});

it('should toggle list box when input is empty', () => {
it('should not toggle list box', () => {
const handleChange = spy();
const { getByRole } = render(
<Autocomplete
value="one"
onHighlightChange={handleChange}
options={['one']}
renderInput={(params) => <TextField {...params} />}
Expand All @@ -1157,11 +1158,9 @@ describe('<Autocomplete />', () => {
const textbox = getByRole('textbox');

expect(combobox).to.have.attribute('aria-expanded', 'false');
fireEvent.mouseDown(textbox); // Open listbox
fireEvent.mouseDown(textbox);
expect(combobox).to.have.attribute('aria-expanded', 'true');
fireEvent.mouseDown(textbox); // close listbox
expect(combobox).to.have.attribute('aria-expanded', 'false');
fireEvent.mouseDown(textbox); // open listbox
fireEvent.mouseDown(textbox);
expect(combobox).to.have.attribute('aria-expanded', 'true');
});
});
Expand Down

0 comments on commit 6815a59

Please sign in to comment.