From 3045fee366eff714271d621af01890cf28ef7738 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 20:15:09 +0500 Subject: [PATCH] Replacement of methods --- ketcher-autotests/tests/utils/clicks/index.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ketcher-autotests/tests/utils/clicks/index.ts b/ketcher-autotests/tests/utils/clicks/index.ts index 00a37974fc..529df0113c 100644 --- a/ketcher-autotests/tests/utils/clicks/index.ts +++ b/ketcher-autotests/tests/utils/clicks/index.ts @@ -59,7 +59,22 @@ export async function clickOnCanvas( page: Page, x: number, y: number, - options?: any, + options?: { + /** + * Defaults to `left`. + */ + button?: 'left' | 'right' | 'middle'; + + /** + * defaults to 1. See [UIEvent.detail]. + */ + clickCount?: number; + + /** + * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0. + */ + delay?: number; + }, ) { await waitForRender(page, async () => { await page.mouse.click(x, y, options); @@ -98,6 +113,7 @@ export function selectOption(page: Page, name = '') { export function selectOptionByText(page: Page, text = '') { return page.getByText(text, { exact: true }).click(); } + /* Usage: await pressTab(page, 'Functional Groups') Click on specified Tab in Templates dialog */