MCPcopy Create free account
hub / github.com/angular/components / focusAndClick

Function focusAndClick

src/aria/listbox/listbox.spec.ts:47–51  ·  view source on GitHub ↗
(index: number, eventInit?: PointerEventInit)

Source from the content-addressed store, hash-verified

45
46 /** Focuses the option before clicking it, in the order a real pointer click does. */
47 const focusAndClick = async (index: number, eventInit?: PointerEventInit) => {
48 optionElements[index].focus();
49 await fixture.whenStable();
50 await click(index, eventInit);
51 };
52
53 const space = async (modifierKeys?: ModifierKeys) => await keydown(' ', modifierKeys);
54 const enter = async (modifierKeys?: ModifierKeys) => await keydown('Enter', modifierKeys);

Callers 1

listbox.spec.tsFile · 0.85

Calls 2

clickFunction · 0.70
focusMethod · 0.65

Tested by

no test coverage detected