mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-08 07:33:38 +00:00
Fix: two dropdown-related UI fixes (#14717)
This commit is contained in:
1 parent
0736c07d8e
commit
2e0d92d8f5
3 files changed
+11
-2
No files matched your search
@@ -97,6 +97,7 @@ describe('SelectComponent', () => {
|
||||
let createNewVal
|
||||
component.createNew.subscribe((v) => (createNewVal = v))
|
||||
expect(component.allowCreateNew).toBeTruthy()
|
||||
const closeSpy = jest.spyOn(component.ngSelectComponent, 'close')
|
||||
component.onSearch({ term: 'foo' })
|
||||
component.addItem(undefined)
|
||||
expect(createNewVal).toEqual('foo')
|
||||
@@ -105,6 +106,8 @@ describe('SelectComponent', () => {
|
||||
component.onSearch({ term: 'baz' })
|
||||
component.clickNew()
|
||||
expect(createNewVal).toEqual('baz')
|
||||
// dropdown should close when creating a new item so it isn't left open behind the modal
|
||||
expect(closeSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should search items by independent normalized terms', () => {
|
||||
|
||||
Reference in new issue
Block a user