mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-22 19:57:14 +01:00
Add a test for empty behavior
This commit is contained in:
parent
9bdb3a334f
commit
79c611a6f9
1 changed files with 10 additions and 1 deletions
|
@ -61,7 +61,16 @@ describe('Suggestions', () => {
|
|||
[popup, input] = mockBaseSuggestionsPopup();
|
||||
|
||||
expect(document.querySelector('.autocomplete')).toBeInstanceOf(HTMLElement);
|
||||
expect(popup.isHidden).toBe(false);
|
||||
assert(popup.isHidden);
|
||||
});
|
||||
|
||||
it('should hide the popup when there are no suggestions to show', () => {
|
||||
[popup, input] = mockBaseSuggestionsPopup();
|
||||
|
||||
popup.setSuggestions({ history: [], tags: [] });
|
||||
popup.showForElement(input);
|
||||
|
||||
assert(popup.isHidden);
|
||||
});
|
||||
|
||||
it('should render suggestions', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue