(page: Page, value: string)
| 293 | }; |
| 294 | |
| 295 | export const setSearchInputValue = async (page: Page, value: string): Promise<void> => { |
| 296 | await page.evaluate( |
| 297 | ({ attrName, inputAttr, nextValue }) => { |
| 298 | const host = document.querySelector(`[${attrName}]`); |
| 299 | const shadowRoot = host?.shadowRoot; |
| 300 | if (!shadowRoot) throw new Error("No shadow root"); |
| 301 | const input = shadowRoot.querySelector<HTMLTextAreaElement>(`[${inputAttr}]`); |
| 302 | if (!input) throw new Error("Search input not found"); |
| 303 | input.focus(); |
| 304 | input.value = nextValue; |
| 305 | input.dispatchEvent( |
| 306 | new InputEvent("input", { bubbles: true, composed: true, data: nextValue }), |
| 307 | ); |
| 308 | }, |
| 309 | { attrName: ATTRIBUTE_NAME, inputAttr: SEARCH_INPUT_ATTR, nextValue: value }, |
| 310 | ); |
| 311 | }; |
| 312 | |
| 313 | export const getInlineStyleProperty = async ( |
| 314 | page: Page, |
no outgoing calls
no test coverage detected
searching dependent graphs…