Teaspoon test fix
This commit is contained in:
parent
91ad8c3c93
commit
88b4ea6042
|
@ -31,22 +31,37 @@
|
|||
});
|
||||
|
||||
describe('filterWithSymbol', () => {
|
||||
let input;
|
||||
const item = {
|
||||
title: '@root',
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
setFixtures(`
|
||||
<input type="text" id="test" />
|
||||
`);
|
||||
|
||||
input = document.getElementById('test');
|
||||
});
|
||||
|
||||
it('should filter without symbol', () => {
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', item, ':roo');
|
||||
input.value = ':roo';
|
||||
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', input, item);
|
||||
expect(updatedItem.droplab_hidden).toBe(false);
|
||||
});
|
||||
|
||||
it('should filter with symbol', () => {
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', item, ':@roo');
|
||||
input.value = '@roo';
|
||||
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', input, item);
|
||||
expect(updatedItem.droplab_hidden).toBe(false);
|
||||
});
|
||||
|
||||
it('should filter with colon', () => {
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', item, ':');
|
||||
input.value = 'roo';
|
||||
|
||||
const updatedItem = gl.DropdownUtils.filterWithSymbol('@', input, item);
|
||||
expect(updatedItem.droplab_hidden).toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue