Skip to content

Commit

Permalink
Undo removed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Jul 31, 2023
1 parent 7590228 commit 52d4e26
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ describe('Options list popover', () => {
showOnlySelectedButton.simulate('click');
};

test('available options list width responds to container size', async () => {
let popover = await mountComponent({ popoverProps: { width: 301 } });
let popoverDiv = findTestSubject(popover, 'optionsList-control-popover');
expect(popoverDiv.getDOMNode().getAttribute('style')).toBe('width: 301px; min-width: 300px;');

// the div cannot be smaller than 301 pixels wide
popover = await mountComponent({ popoverProps: { width: 300 } });
popoverDiv = findTestSubject(popover, 'optionsList-control-available-options');
expect(popoverDiv.getDOMNode().getAttribute('style')).toBe('width: 100%; height: 100%;');
});

test('no available options', async () => {
const popover = await mountComponent({ componentState: { availableOptions: [] } });
const availableOptionsDiv = findTestSubject(popover, 'optionsList-control-available-options');
Expand Down

0 comments on commit 52d4e26

Please sign in to comment.