How to use the @uipath/angular/testing.Key.ArrowDown function in @uipath/angular

To help you get started, we’ve selected a few @uipath/angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github UiPath / angular-components / projects / angular / components / ui-suggest / src / ui-suggest.component.spec.ts View on Github external
it('should increment positively if DIRECTION is DOWN and NAVIGATING DOWN', () => {
            component.direction = 'down';

            fixture.detectChanges();
            const display = fixture.debugElement.query(By.css('.display'));
            display.nativeElement.dispatchEvent(
                EventGenerator.keyDown(Key.Enter),
            );

            const itemContainer = fixture.debugElement.query(By.css('.item-list-container'));

            itemContainer.nativeElement.dispatchEvent(
                EventGenerator.keyDown(Key.ArrowDown),
            );

            expect(uiSuggest.activeIndex).toEqual(1);
        });