Skip to content

Commit 25479e1

Browse files
committed
✅change test event, click by mousedown on dynamic-scrollable-dropdown.component.spec.ts
1 parent 6513059 commit 25479e1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,15 @@ describe('Dynamic Dynamic Scrollable Dropdown component', () => {
159159
let de: any = scrollableDropdownFixture.debugElement.query(By.css('input.form-control'));
160160
let btnEl = de.nativeElement;
161161

162-
btnEl.click();
162+
const mousedownEvent = new MouseEvent('mousedown');
163+
164+
btnEl.dispatchEvent(mousedownEvent);
163165
scrollableDropdownFixture.detectChanges();
164166

165167
de = scrollableDropdownFixture.debugElement.queryAll(By.css('button.dropdown-item'));
166168
btnEl = de[0].nativeElement;
167169

168-
btnEl.click();
169-
170+
btnEl.dispatchEvent(mousedownEvent);
170171
scrollableDropdownFixture.detectChanges();
171172

172173
expect((scrollableDropdownComp.model as any).value).toEqual(selectedValue);

0 commit comments

Comments
 (0)