Skip to content

Commit

Permalink
Replacement of methods
Browse files Browse the repository at this point in the history
  • Loading branch information
knadonenkoepam committed Nov 25, 2024
1 parent 4d69bec commit 3045fee
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ketcher-autotests/tests/utils/clicks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 3045fee

Please sign in to comment.