From 73c40a6405413d5f1a4323b4c329cebe983521cf Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Wed, 20 Nov 2024 16:31:25 +0500 Subject: [PATCH 01/19] replacing function to clickOnCanvas --- .../tests/API/view-only-mode.spec.ts | 5 ++- .../Rxn-Files/rxn-files.spec.ts | 7 ++-- .../aromatize-dearomatize.spec.ts | 5 ++- .../calculate-cip-tool.spec.ts | 11 +++--- .../calculated-values.spec.ts | 19 +++++----- .../tests/Indigo-Tools/Layout/layout.spec.ts | 3 +- .../toggle-explicit-hydrogens.spec.ts | 37 ++++++++++--------- .../Erase-Tool/erase-tool.spec.ts | 3 +- 8 files changed, 48 insertions(+), 42 deletions(-) diff --git a/ketcher-autotests/tests/API/view-only-mode.spec.ts b/ketcher-autotests/tests/API/view-only-mode.spec.ts index ccedf38223..e128490246 100644 --- a/ketcher-autotests/tests/API/view-only-mode.spec.ts +++ b/ketcher-autotests/tests/API/view-only-mode.spec.ts @@ -24,6 +24,7 @@ import { dragMouseTo, selectAllStructuresOnCanvas, pasteFromClipboardByKeyboard, + clickOnCanvas, } from '@utils'; import { closeErrorAndInfoModals } from '@utils/common/helpers'; import { @@ -194,7 +195,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { await page.getByTitle('Copy as MOL (Ctrl+M)').click(); await disableViewOnlyModeBySetOptions(page); await pasteFromClipboardByKeyboard(page); - await page.mouse.click(200, 200); + await clickOnCanvas(page, 200, 200); await takeEditorScreenshot(page); }); @@ -213,7 +214,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { await page.getByTitle('Copy as KET (Ctrl+Shift+K)').click(); await disableViewOnlyModeBySetOptions(page); await pasteFromClipboardByKeyboard(page); - await page.mouse.click(200, 200); + await clickOnCanvas(page, 200, 200); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Rxn-Files/rxn-files.spec.ts b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Rxn-Files/rxn-files.spec.ts index 1a9d783390..ee3985a8dd 100644 --- a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Rxn-Files/rxn-files.spec.ts +++ b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Rxn-Files/rxn-files.spec.ts @@ -29,6 +29,7 @@ import { setBondLengthOptionUnit, setBondLengthValue, openSettings, + clickOnCanvas, } from '@utils'; import { getRxn } from '@utils/formats'; import { drawReactionWithTwoBenzeneRings } from '@utils/canvas/drawStructures'; @@ -104,7 +105,7 @@ test.describe('Tests for Open and Save RXN file operations', () => { await page.getByRole('button', { name: 'Cancel' }).click(); await selectNestedTool(page, RgroupTool.R_GROUP_FRAGMENT); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByRole('button', { name: 'R22' }).click(); await page.getByRole('button', { name: 'Apply' }).click(); await selectTopPanelButton(TopPanelButton.Save, page); @@ -161,7 +162,7 @@ test.describe('Tests for Open and Save RXN file operations', () => { await pressButton(page, 'Cancel'); await selectLeftPanelButton(LeftPanelButton.ReactionPlusTool, page); - await page.mouse.click(xCoordinatesWithShiftHalf, yCoordinatesWithShift); + await clickOnCanvas(page, xCoordinatesWithShiftHalf, yCoordinatesWithShift); const ySecondChain = yCoordinatesWithShift + yDelta50; await selectLeftPanelButton(LeftPanelButton.Chain, page); await page.mouse.move(x, ySecondChain); @@ -170,7 +171,7 @@ test.describe('Tests for Open and Save RXN file operations', () => { await pressButton(page, 'Cancel'); await selectLeftPanelButton(LeftPanelButton.Erase, page); - await page.mouse.click(xCoordinatesWithShiftHalf, yCoordinatesWithShift); + await clickOnCanvas(page, xCoordinatesWithShiftHalf, yCoordinatesWithShift); await selectNestedTool(page, ArrowTool.ARROW_FILLED_BOW); const yArrowStart = y + yDelta20; const yArrowEnd = yArrowStart + yDelta20; diff --git a/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts index a5da058a42..743a5afc0d 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts @@ -18,6 +18,7 @@ import { waitForSpinnerFinishedWork, waitForPageInit, openFileAndAddToCanvasAsNewProject, + clickOnCanvas, } from '@utils'; import { getCml, getMolfile, getRxn, getSmiles } from '@utils/formats'; import { @@ -164,7 +165,7 @@ test.describe('Aromatize/Dearomatize Tool', () => { page, ); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_X); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton(TopPanelButton.Aromatize, page); }); @@ -184,7 +185,7 @@ test.describe('Aromatize/Dearomatize Tool', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_X); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton(TopPanelButton.Aromatize, page); }); diff --git a/ketcher-autotests/tests/Indigo-Tools/Calculate-CIP-Tool/calculate-cip-tool.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Calculate-CIP-Tool/calculate-cip-tool.spec.ts index da29b5b317..03e81a6519 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Calculate-CIP-Tool/calculate-cip-tool.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Calculate-CIP-Tool/calculate-cip-tool.spec.ts @@ -26,6 +26,7 @@ import { clickOnBond, openFileAndAddToCanvasAsNewProject, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -122,9 +123,7 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => { ); await selectTopPanelButton(TopPanelButton.Calculate, page); await copyAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(x, y); - }); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -144,7 +143,7 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => { ); await selectTopPanelButton(TopPanelButton.Calculate, page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -368,7 +367,7 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => { await selectTopPanelButton(TopPanelButton.Calculate, page); await selectLeftPanelButton(LeftPanelButton.Erase, page); const point = await getAtomByIndex(page, { label: 'N' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await takeEditorScreenshot(page); @@ -425,7 +424,7 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => { }); await selectNestedTool(page, BondTool.UP); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 5); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Indigo-Tools/Calculated-Values-Tool/calculated-values.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Calculated-Values-Tool/calculated-values.spec.ts index 2cd4bcd318..326a1683ac 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Calculated-Values-Tool/calculated-values.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Calculated-Values-Tool/calculated-values.spec.ts @@ -15,6 +15,7 @@ import { AtomButton, waitForPageInit, waitForSpinnerFinishedWork, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -127,11 +128,11 @@ test.describe('Calculated Values Tools', () => { point = await getBondByIndex(page, { type: BondType.SINGLE }, 3); await page.keyboard.down('Shift'); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getBondByIndex(page, { type: BondType.SINGLE }, 4); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getBondByIndex(page, { type: BondType.SINGLE }, 5); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.keyboard.up('Shift'); await waitForSpinnerFinishedWork(page, async () => { @@ -494,7 +495,7 @@ test.describe('Calculated Values Tools', () => { */ await openFileAndAddToCanvas('Molfiles-V3000/a-query-non-hsub.mol', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); @@ -512,7 +513,7 @@ test.describe('Calculated Values Tools', () => { page, ); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); @@ -527,7 +528,7 @@ test.describe('Calculated Values Tools', () => { */ await openFileAndAddToCanvas('Molfiles-V3000/a-query-ring-bonds.mol', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); @@ -542,7 +543,7 @@ test.describe('Calculated Values Tools', () => { */ await openFileAndAddToCanvas('Molfiles-V3000/a-query-aq.mol', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); @@ -557,7 +558,7 @@ test.describe('Calculated Values Tools', () => { */ await openFileAndAddToCanvas('Molfiles-V3000/a-query-atom-list.mol', page); const point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); @@ -572,7 +573,7 @@ test.describe('Calculated Values Tools', () => { */ await openFileAndAddToCanvas('Molfiles-V3000/a-query-not-list.mol', page); const point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Calculated, page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Indigo-Tools/Layout/layout.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Layout/layout.spec.ts index e0778ceedb..d596065929 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Layout/layout.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Layout/layout.spec.ts @@ -18,6 +18,7 @@ import { takeTopToolbarScreenshot, selectPartOfMolecules, selectPartOfChain, + clickOnCanvas, } from '@utils'; async function openFileWithShift(filename: string, page: Page) { @@ -28,7 +29,7 @@ async function openFileWithShift(filename: string, page: Page) { }); const { x, y } = await getCoordinatesOfTheMiddleOfTheScreen(page); const shift = 150; - await page.mouse.click(x + shift, y + shift); + await clickOnCanvas(page, x + shift, y + shift); } test.describe('Indigo Tools - Layout', () => { diff --git a/ketcher-autotests/tests/Indigo-Tools/Toggle-Explicit-Hydrogens/toggle-explicit-hydrogens.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Toggle-Explicit-Hydrogens/toggle-explicit-hydrogens.spec.ts index d2370502d2..333dfefefd 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Toggle-Explicit-Hydrogens/toggle-explicit-hydrogens.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Toggle-Explicit-Hydrogens/toggle-explicit-hydrogens.spec.ts @@ -11,6 +11,7 @@ import { RingButton, openFileAndAddToCanvasAsNewProject, screenshotBetweenUndoRedo, + clickOnCanvas, } from '@utils'; test.describe('Toggle-Explicit-Hydrogens Tool', () => { @@ -55,7 +56,7 @@ test.describe('Toggle-Explicit-Hydrogens Tool', () => { const x = 200; const y = 200; await selectRing(RingButton.Benzene, page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton(TopPanelButton.toggleExplicitHydrogens, page); }); @@ -133,7 +134,7 @@ test.describe('1. Molecules connected ', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/${fileName}`, page, ); - await page.mouse.click(200, 200); + await clickOnCanvas(page, 200, 200); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -181,7 +182,7 @@ test.describe('2. Molecules connected ', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Custom Query Bonds/${fileName}`, page, ); - await page.mouse.click(200, 200); + await clickOnCanvas(page, 200, 200); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -250,7 +251,7 @@ test.describe('3. Molecules connected ', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/All types of bond with Query feature atom on the canvas/${fileName}`, page, ); - await page.mouse.click(200, 200); + await clickOnCanvas(page, 200, 200); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -318,7 +319,7 @@ test.describe('4. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Ordinary Atoms/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -373,7 +374,7 @@ test.describe('5. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Custom Query Atoms/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -422,7 +423,7 @@ test.describe('6. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Custom Query Atoms/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -486,7 +487,7 @@ test.describe('7. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Ordinary Atoms with Custom query feature atom on the canvas/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -534,7 +535,7 @@ test.describe('8. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Ordinary Atoms/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -585,7 +586,7 @@ test.describe('9. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/Atoms/Ordinary Atoms with Custom query feature atom on the canvas/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -656,7 +657,7 @@ test.describe('10. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Custom Query Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -712,7 +713,7 @@ test.describe('11. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Custom Query Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -765,7 +766,7 @@ test.describe('12. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Custom Query Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -858,7 +859,7 @@ test.describe('13. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -911,7 +912,7 @@ test.describe('14. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -965,7 +966,7 @@ test.describe('15. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/Groups/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -1042,7 +1043,7 @@ test.describe('16. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/Groups/Groups with Query feature atom on the canvas/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, @@ -1099,7 +1100,7 @@ test.describe('17. Fold/unfold hydrogens for', () => { `KET/Toggle-Explicit-Hydrogens/All types of bond/Ordinary Bonds/Groups/Groups with Query feature atom on the canvas/${fileName}`, page, ); - await page.mouse.click(20, 20); + await clickOnCanvas(page, 20, 20); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton( TopPanelButton.toggleExplicitHydrogens, diff --git a/ketcher-autotests/tests/Macromolecule-editor/Erase-Tool/erase-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Erase-Tool/erase-tool.spec.ts index a9ee20bd29..9bb37c1910 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Erase-Tool/erase-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Erase-Tool/erase-tool.spec.ts @@ -22,6 +22,7 @@ import { selectRectangleSelectionTool, Bases, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { hideMonomerPreview, @@ -315,7 +316,7 @@ test.describe('Erase Tool', () => { page, ); await selectEraseTool(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); From 86057ec8904efb8529a3562334249da7cd5d3a7a Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Thu, 21 Nov 2024 14:45:06 +0500 Subject: [PATCH 02/19] imports --- .../Import-Saving-Files/import-saving-idt.spec.ts | 15 ++++++++------- .../connection-rules-common.spec.ts | 3 ++- .../Polymer-Bond-Tool/polymer-bond-tool.spec.ts | 5 +++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ketcher-autotests/tests/Macromolecule-editor/Import-Saving-Files/import-saving-idt.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Import-Saving-Files/import-saving-idt.spec.ts index 1b400c0058..6e51dde331 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Import-Saving-Files/import-saving-idt.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Import-Saving-Files/import-saving-idt.spec.ts @@ -34,6 +34,7 @@ import { copyToClipboardByKeyboard, pasteFromClipboardByKeyboard, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { closeErrorMessage, @@ -798,7 +799,7 @@ test.describe('Import-Saving .idt Files', () => { const secondMonomer = await page.getByText('1Nal').locator('..').first(); await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await page.getByTestId('1Nal___3-(1-naphthyl)-alanine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await bondTwoMonomersPointToPoint( page, firstMonomer, @@ -828,7 +829,7 @@ test.describe('Import-Saving .idt Files', () => { await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await chooseTab(page, Tabs.Chem); await page.getByTestId('Test-6-Ch___Test-6-AP-Chem').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await bondTwoMonomersPointToPoint( page, firstMonomer, @@ -850,7 +851,7 @@ test.describe('Import-Saving .idt Files', () => { await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await page.getByTestId('1Nal___3-(1-naphthyl)-alanine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await bondTwoMonomersPointToPoint( page, firstMonomer, @@ -890,7 +891,7 @@ test.describe('Import-Saving .idt Files', () => { await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await chooseTab(page, Tabs.Chem); await page.getByTestId('Test-6-Ch___Test-6-AP-Chem').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await bondTwoMonomersPointToPoint( page, firstMonomer, @@ -932,7 +933,7 @@ test.describe('Import-Saving .idt Files', () => { const y = 400; await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await page.getByTestId('1Nal___3-(1-naphthyl)-alanine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSingleBondTool(page); await page.getByText('1Nal').locator('..').first().click(); await page.mouse.down(); @@ -952,7 +953,7 @@ test.describe('Import-Saving .idt Files', () => { const y = 400; await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await page.getByTestId('1Nal___3-(1-naphthyl)-alanine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSnakeLayoutModeTool(page); await selectSingleBondTool(page); await page.getByText('1Nal').locator('..').first().click(); @@ -974,7 +975,7 @@ test.describe('Import-Saving .idt Files', () => { await pasteFromClipboardAndAddToMacromoleculesCanvas('IDT', `/iMe-dC/`); await chooseTab(page, Tabs.Chem); await page.getByTestId('Test-6-Ch___Test-6-AP-Chem').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSingleBondTool(page); await page.getByText('iMe-dC').locator('..').click(); await page.mouse.down(); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/connection-rules-common.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/connection-rules-common.spec.ts index c07830513c..29a125516d 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/connection-rules-common.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/connection-rules-common.spec.ts @@ -18,6 +18,7 @@ import { receiveFileComparisonData, getMolfile, delay, + clickOnCanvas, } from '@utils'; import { turnOnMacromoleculesEditor, @@ -170,7 +171,7 @@ test.describe('Common connection rules: ', () => { .first(); // removing selections - await page.mouse.click(100, 100); + await clickOnCanvas(page, 100, 100); await monomerLocator.click(); await selectEraseTool(page); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts index 7c2e6806aa..84641a658d 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts @@ -32,6 +32,7 @@ import { waitForIndigoToLoad, selectClearCanvasTool, selectOptionInTypeDropdown2, + clickOnCanvas, } from '@utils'; import { pageReload } from '@utils/common/helpers'; import { @@ -203,8 +204,8 @@ test('Create bond between two chems', async () => { await page.getByTestId(Chems.hxy).click(); // Create 2 chems on canvas - await page.mouse.click(300, 300); - await page.mouse.click(400, 400); + await clickOnCanvas(page, 300, 300); + await clickOnCanvas(page, 400, 400); // Get 2 chems locators const chems = await page.getByText('hxy').locator('..'); From 50af2345918a9ae0b2a51c936c051bff636b6b14 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 15:43:12 +0500 Subject: [PATCH 03/19] Replacement of methods --- .../tests/API/api-set-get-molecule.spec.ts | 3 +- .../aromatize-dearomatize.spec.ts | 4 +- .../polymer-bond-tool.spec.ts | 6 +- .../RNA-Builder/rna-library.spec.ts | 17 +++--- .../rectangle-selection-tool.spec.ts | 23 ++++---- .../Sequence-Mode/sequence-mode-edit.spec.ts | 3 +- .../sequence-mode-selection.spec.ts | 3 +- .../Snake-Mode/snake-bond-tool.spec.ts | 5 +- .../Undo-Redo/undo-redo.spec.ts | 5 +- .../Zoom-Tool/zoom.spec.ts | 5 +- .../mapping-tool.spec.ts | 3 +- .../attachment-point-tool.spec.ts | 5 +- .../r-group-fragment-tool.spec.ts | 15 ++--- .../R-group-tool/r-group-label-dialog.spec.ts | 29 +++++---- .../R-group-tool/r-group-tool.spec.ts | 5 +- .../s-group-click-atom-bond.spec.ts | 9 +-- .../Track-Changes/track-changes.spec.ts | 3 +- .../Atom/Atom-Tool/atom-tool.spec.ts | 5 +- .../reaction-queries-attributes.spec.ts | 3 +- .../Text-Tool/text-formating.spec.ts | 3 +- ...ools-modification-and-manipulation.spec.ts | 3 +- .../functional-group-tools.spec.ts | 3 +- .../functional-groups.spec.ts | 9 +-- .../Template-Library/template-library.spec.ts | 3 +- .../Copy-Cut-Paste/copy-cut-paste.spec.ts | 59 ++++++++++--------- .../Undo-Redo/undo-redo-actions.spec.ts | 5 +- .../utils/canvas/arrow-signes/getArrow.ts | 3 +- .../utils/canvas/plus-signes/getPluses.ts | 3 +- ketcher-autotests/tests/utils/clicks/index.ts | 9 ++- 29 files changed, 138 insertions(+), 113 deletions(-) diff --git a/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts b/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts index 7c55422cfb..d141108a4c 100644 --- a/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts +++ b/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts @@ -13,6 +13,7 @@ import { openFileAndAddToCanvasAsNewProject, drawBenzeneRing, waitForLoad, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { @@ -364,7 +365,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts b/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts index 743a5afc0d..698500b406 100644 --- a/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts +++ b/ketcher-autotests/tests/Indigo-Tools/Aromatize-Dearomatize/aromatize-dearomatize.spec.ts @@ -165,7 +165,7 @@ test.describe('Aromatize/Dearomatize Tool', () => { page, ); await copyAndPaste(page); - await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_X); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton(TopPanelButton.Aromatize, page); }); @@ -185,7 +185,7 @@ test.describe('Aromatize/Dearomatize Tool', () => { page, ); await cutAndPaste(page); - await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_X); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await waitForSpinnerFinishedWork(page, async () => { await selectTopPanelButton(TopPanelButton.Aromatize, page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts index 84641a658d..12a82f95b6 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts @@ -279,7 +279,7 @@ test('Check in full-screen mode it is possible to add a bond between a Peptide m await page.getByTestId(Peptides.BetaAlanine).click(); await clickInTheMiddleOfTheScreen(page); await page.getByTestId(Peptides.Ethylthiocysteine).click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await connectMonomersWithBonds(page, ['Bal', 'Edc']); await takeEditorScreenshot(page, { masks: [page.getByTestId('polymer-library-preview')], @@ -299,7 +299,7 @@ test('Check in full-screen mode it is possible to add a bond between a RNA monom await page.getByTestId('MOE(A)P_A_MOE_P').click(); await clickInTheMiddleOfTheScreen(page); await page.getByTestId('dR(U)P_U_dR_P').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await connectMonomersWithBonds(page, ['P', 'dR']); await takeEditorScreenshot(page, { masks: [page.getByTestId('polymer-library-preview')], @@ -319,7 +319,7 @@ test('Check in full-screen mode it is possible to add a bond between a CHEM mono await page.getByTestId('A6OH___6-amino-hexanol').click(); await clickInTheMiddleOfTheScreen(page); await page.getByTestId('Test-6-Ch___Test-6-AP-Chem').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await connectMonomersWithBonds(page, ['A6OH', 'Test-6-Ch']); await page .locator('div') diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts index ea7b56aab9..aa50c189d1 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts @@ -37,6 +37,7 @@ import { TopPanelButton, selectClearCanvasTool, Peptides, + clickOnCanvas, } from '@utils'; import { getKet } from '@utils/formats'; import { @@ -73,11 +74,11 @@ async function drawThreeMonomers(page: Page) { const x3 = 705; const y3 = 106; await selectMonomer(page, Sugars.ThreeA6); - await page.mouse.click(x1, y1); + await clickOnCanvas(page, x1, y1); await selectMonomer(page, Bases.baA); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await selectMonomer(page, Phosphates.Phosphate); - await page.mouse.click(x3, y3); + await clickOnCanvas(page, x3, y3); } async function drawThreeMonomersConnectedWithBonds(page: Page) { @@ -109,7 +110,7 @@ async function drawBasePhosphate(page: Page) { await selectMonomer(page, Bases.baA); await clickInTheMiddleOfTheScreen(page); await selectMonomer(page, Phosphates.Phosphate); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSingleBondTool(page); await base1.hover(); await page.mouse.down(); @@ -129,7 +130,7 @@ async function drawSugarPhosphate(page: Page) { await selectMonomer(page, Sugars.ThreeA6); await clickInTheMiddleOfTheScreen(page); await selectMonomer(page, Phosphates.Phosphate); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSingleBondTool(page); await sugar1.hover(); await page.mouse.down(); @@ -147,7 +148,7 @@ async function drawSugarBase(page: Page) { await selectMonomer(page, Sugars.ThreeA6); await clickInTheMiddleOfTheScreen(page); await selectMonomer(page, Bases.baA); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectSingleBondTool(page); await sugar1.hover(); await page.mouse.down(); @@ -1081,7 +1082,7 @@ test.describe('RNA Library', () => { await dragMouseTo(x, y, page); await takeEditorScreenshot(page); await selectEraseTool(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); } @@ -1203,7 +1204,7 @@ test.describe('RNA Library', () => { await takeEditorScreenshot(page); await selectTopPanelButton(TopPanelButton.Redo, page); await selectEraseTool(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); await selectTopPanelButton(TopPanelButton.Undo, page); await takeEditorScreenshot(page); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts index f8f1a9d6c6..ccf686e58c 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts @@ -15,6 +15,7 @@ import { selectSnakeLayoutModeTool, moveMouseAway, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { turnOnMacromoleculesEditor } from '@utils/macromolecules'; import { bondTwoMonomers } from '@utils/macromolecules/polymerBond'; @@ -131,10 +132,10 @@ test.describe('Rectangle Selection Tool', () => { await page.getByText('Tza').click(); // Create 4 peptides on canvas - await page.mouse.click(300, 300); - await page.mouse.click(400, 400); - await page.mouse.click(500, 500); - await page.mouse.click(600, 600); + await clickOnCanvas(page, 300, 400); + await clickOnCanvas(page, 400, 400); + await clickOnCanvas(page, 500, 500); + await clickOnCanvas(page, 600, 600); // Get 4 peptides locators const peptides = await page.getByText('Tza').locator('..'); @@ -172,15 +173,15 @@ test.describe('Rectangle Selection Tool', () => { y: center.y, }; await page.getByTestId(Peptides.BetaAlanine).click(); - await page.mouse.click(betaAlaninePosition.x, betaAlaninePosition.y); + await clickOnCanvas(page, betaAlaninePosition.x, betaAlaninePosition.y); await page.getByTestId(Peptides.Ethylthiocysteine).click(); // Ethylthiocysteine was added later, so it is located above Beta Alanine - await page.mouse.click(center.x + shift, center.y); + await clickOnCanvas(page, center.x + shift, center.y); await page.keyboard.press('Escape'); // Now Beta Alanine must be above Ethylthiocysteine - await page.mouse.click(betaAlaninePosition.x, betaAlaninePosition.y); + await clickOnCanvas(page, betaAlaninePosition.x, betaAlaninePosition.y); await moveMouseAway(page); await takeEditorScreenshot(page); }); @@ -244,9 +245,9 @@ test.describe('Rectangle Selection Tool', () => { // Select monomers pointly by clicking Shift+LClick await page.keyboard.down('Shift'); - await page.mouse.click(300, 300); - await page.mouse.click(400, 400); - await page.mouse.click(500, 350); + await clickOnCanvas(page, 300, 300); + await clickOnCanvas(page, 400, 400); + await clickOnCanvas(page, 500, 350); await page.keyboard.up('Shift'); @@ -376,7 +377,7 @@ test.describe('Rectangle Selection Tool', () => { await selectAllStructuresOnCanvas(page); await moveMouseAway(page); await takeEditorScreenshot(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts index 414c9a33e7..d12da7096b 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts @@ -1,6 +1,7 @@ /* eslint-disable no-magic-numbers */ import { test } from '@playwright/test'; import { + clickOnCanvas, copyToClipboardByKeyboard, moveMouseAway, openFileAndAddToCanvasMacro, @@ -104,7 +105,7 @@ test.describe('Sequence edit mode', () => { await startNewSequence(page); await enterSequence(page, 'acgtu'); await takeEditorScreenshot(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts index 9388195ff8..97c18329ff 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts @@ -15,6 +15,7 @@ import { waitForRender, clickInTheMiddleOfTheScreen, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { turnOnMacromoleculesEditor } from '@utils/macromolecules'; import { @@ -206,7 +207,7 @@ test.describe('Sequence mode selection for view mode', () => { await openFileAndAddToCanvasMacro('KET/rna-dna-peptides-chains.ket', page); await selectPartOfMolecules(page); await takeEditorScreenshot(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts index 89162c2d58..1a422cc50e 100755 --- a/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts @@ -22,6 +22,7 @@ import { waitForIndigoToLoad, waitForKetcherInit, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { pageReload } from '@utils/common/helpers'; import { @@ -912,7 +913,7 @@ test.describe('Snake Bond Tool', () => { await takeEditorScreenshot(page); await selectSnakeLayoutModeTool(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -931,7 +932,7 @@ test.describe('Snake Bond Tool', () => { ); await takeEditorScreenshot(page); await selectSnakeLayoutModeTool(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts index 40b2dce633..f8c63543ba 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts @@ -25,6 +25,7 @@ import { copyToClipboardByKeyboard, pasteFromClipboardByKeyboard, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { goToRNATab } from '@utils/macromolecules/library'; import { @@ -212,7 +213,7 @@ test.describe('Undo-Redo tests', () => { const addMonomers = async (x: number, y: number) => { await page.getByTestId(Peptides.BetaAlanine).click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); }; const numberOfRows = 6; @@ -252,7 +253,7 @@ test.describe('Undo-Redo tests', () => { const addMonomers = async (x: number, y: number) => { await page.getByTestId('CHEM-TAB').click(); await page.getByTestId('SMPEG2___SM(PEG)2').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); }; const numberOfRows = 6; diff --git a/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts index 6a444ede76..969508ed53 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts @@ -16,6 +16,7 @@ import { dragMouseTo, clickOnMiddleOfCanvas, zoomWithMouseWheel, + clickOnCanvas, } from '@utils'; import { turnOnMacromoleculesEditor } from '@utils/macromolecules'; import { connectMonomersWithBonds } from '@utils/macromolecules/monomer'; @@ -318,7 +319,7 @@ test.describe('Zoom Tool', () => { }); } await page.getByTestId('Edc___S-ethylthiocysteine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await connectMonomersWithBonds(page, ['bAla', 'Edc']); for (let i = 0; i < 5; i++) { await waitForRender(page, async () => { @@ -342,7 +343,7 @@ test.describe('Zoom Tool', () => { await page.getByTestId(Peptides.BetaAlanine).click(); await clickInTheMiddleOfTheScreen(page); await page.getByTestId('Edc___S-ethylthiocysteine').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await connectMonomersWithBonds(page, ['bAla', 'Edc']); await takeEditorScreenshot(page); for (let i = 0; i < 5; i++) { diff --git a/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts b/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts index 4632c24ceb..af32ae7742 100644 --- a/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts +++ b/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts @@ -17,6 +17,7 @@ import { receiveFileComparisonData, saveToFile, selectDropdownTool, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getRxn } from '@utils/formats'; @@ -88,7 +89,7 @@ test.describe('Mapping Tools', () => { await clickInTheMiddleOfTheScreen(page); await selectDropdownTool(page, 'reaction-map', 'reaction-map'); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); await selectTopPanelButton(TopPanelButton.Undo, page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts index fe6a1b9636..136bb01a7d 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts @@ -28,6 +28,7 @@ import { waitForRender, waitForSpinnerFinishedWork, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; @@ -359,7 +360,7 @@ test.describe('Attachment Point Tool', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -376,7 +377,7 @@ test.describe('Attachment Point Tool', () => { page, ); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-fragment-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-fragment-tool.spec.ts index cb8f24ac43..7412e54c19 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-fragment-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-fragment-tool.spec.ts @@ -24,6 +24,7 @@ import { waitForRender, resetCurrentTool, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getExtendedSmiles, getMolfile } from '@utils/formats'; @@ -33,7 +34,7 @@ async function openRGroupModalForTopAtom(page: Page) { await selectNestedTool(page, RgroupTool.R_GROUP_FRAGMENT); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); return { x, y }; } @@ -105,7 +106,7 @@ test.describe('Open Ketcher', () => { await page.getByText('R5').click(); await page.getByTestId('OK').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectRGroup(page, rGroupFromFile); await page.getByTestId('OK').click(); await takeEditorScreenshot(page); @@ -120,7 +121,7 @@ test.describe('Open Ketcher', () => { await page.getByTestId('OK').click(); await page.keyboard.press('Control+r'); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByLabel(AttachmentPoint.PRIMARY).check(); await page.getByTestId('OK').click(); await takeEditorScreenshot(page); @@ -208,14 +209,14 @@ test.describe('Open Ketcher', () => { await selectNestedTool(page, RgroupTool.ATTACHMENT_POINTS); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByLabel(AttachmentPoint.PRIMARY).check(); await page.getByLabel(AttachmentPoint.SECONDARY).check(); await page.getByTestId('OK').click(); await page.keyboard.press('Control+r'); await page.keyboard.press('Control+r'); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectRGroup(page, 'R5'); await page.getByTestId('OK').click(); await takeEditorScreenshot(page); @@ -294,7 +295,7 @@ test.describe('Open Ketcher', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -310,7 +311,7 @@ test.describe('Open Ketcher', () => { page, ); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts index 4c2f19f037..b9210d2948 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts @@ -22,6 +22,7 @@ import { waitForRender, waitForPageInit, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getRxn, getSmiles } from '@utils/formats'; @@ -40,7 +41,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -64,7 +65,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await waitForRender(page, async () => { await pressButton(page, 'Apply'); @@ -82,7 +83,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R4'); await pressButton(page, 'R5'); await pressButton(page, 'R6'); @@ -102,7 +103,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -123,7 +124,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -146,7 +147,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByTestId('s-group-type-input-span').click(); await page.getByRole('option', { name: 'Multiple group' }).click(); @@ -176,7 +177,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -197,7 +198,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -226,7 +227,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -253,7 +254,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -284,7 +285,7 @@ test.describe('R-Group Label Tool', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); @@ -377,9 +378,7 @@ test.describe('R-Group Label Tool', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/chain-with-r-group.rxn', page); await copyAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(x, y); - }); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -392,7 +391,7 @@ test.describe('R-Group Label Tool', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/chain-with-r-group.rxn', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-tool.spec.ts index 9d03f0637a..f86a8fe078 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-tool.spec.ts @@ -1,5 +1,6 @@ import { expect, test } from '@playwright/test'; import { + clickOnCanvas, copyAndPaste, cutAndPaste, openFileAndAddToCanvas, @@ -47,7 +48,7 @@ test.describe('R-Group', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -65,7 +66,7 @@ test.describe('R-Group', () => { page, ); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/s-group-click-atom-bond.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/s-group-click-atom-bond.spec.ts index 00339d975c..00913f0d18 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/s-group-click-atom-bond.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/s-group-click-atom-bond.spec.ts @@ -8,6 +8,7 @@ import { takeEditorScreenshot, RingButton, waitForPageInit, + clickOnCanvas, } from '@utils'; test.describe('S-Group Properties', () => { @@ -26,7 +27,7 @@ test.describe('S-Group Properties', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByTestId('s-group-type-input-span').click(); await takeEditorScreenshot(page); }); @@ -41,7 +42,7 @@ test.describe('S-Group Properties', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByTestId('s-group-type-input-span').click(); await page.getByRole('option', { name: 'Superatom' }).click(); await page.getByLabel('Name').click(); @@ -66,7 +67,7 @@ test.describe('S-Group Properties', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByPlaceholder('Enter name').click(); await page.getByPlaceholder('Enter name').fill(testName); await page.getByPlaceholder('Enter value').click(); @@ -83,7 +84,7 @@ test.describe('S-Group Properties', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByTestId('s-group-type-input-span').click(); await page.getByRole('option', { name: 'Query component' }).click(); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Track-Changes/track-changes.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Track-Changes/track-changes.spec.ts index f7d89f2cab..11d23ab884 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Track-Changes/track-changes.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Track-Changes/track-changes.spec.ts @@ -6,6 +6,7 @@ import { waitForPageInit, selectAtomInToolbar, AtomButton, + clickOnCanvas, } from '@utils'; test.describe('Track Changes', () => { @@ -23,7 +24,7 @@ test.describe('Track Changes', () => { const addAtom = async (x: number, y: number) => { await selectAtomInToolbar(atomType, page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); }; const numberOfRows = 6; diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts index d890f3828e..32fc90e3f1 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts @@ -31,6 +31,7 @@ import { drawBenzeneRing, getCoordinatesTopAtomOfBenzeneRing, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { atomsNames } from '@utils/canvas/atoms/excludedAtoms'; import { getMolfile, getRxn } from '@utils/formats'; @@ -272,7 +273,7 @@ test.describe('Atom Tool', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -290,7 +291,7 @@ test.describe('Atom Tool', () => { page, ); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts index 8e9d3451c9..a4d16d56f0 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts @@ -26,6 +26,7 @@ import { takeEditorScreenshot, waitForLoad, waitForPageInit, + clickOnCanvas, } from '@utils'; import { checkSmartsValue } from '../utils'; @@ -97,7 +98,7 @@ test.describe('Checking reaction queries attributes in SMARTS format', () => { await selectLeftPanelButton(LeftPanelButton.S_Group, page); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByTestId('s-group-type').first().click(); await page.getByRole('option', { name: 'Query component' }).click(); await page.getByRole('button', { name: 'Apply' }).click(); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-formating.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-formating.spec.ts index c11619ff73..448b644f41 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-formating.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-formating.spec.ts @@ -16,6 +16,7 @@ import { waitForRender, receiveFileComparisonData, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getKet } from '@utils/formats'; import { addTextBoxToCanvas } from '@utils/selectors/addTextBoxToCanvas'; @@ -177,7 +178,7 @@ test.describe('Text tools test cases', () => { await page.getByRole('dialog').getByRole('textbox').fill('TEXT001'); await pressButton(page, 'Apply'); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-tools-modification-and-manipulation.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-tools-modification-and-manipulation.spec.ts index a03477f0ae..158086799e 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-tools-modification-and-manipulation.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Text-Tool/text-tools-modification-and-manipulation.spec.ts @@ -15,6 +15,7 @@ import { selectDropdownTool, waitForRender, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { addTextBoxToCanvas } from '@utils/selectors/addTextBoxToCanvas'; @@ -142,7 +143,7 @@ test.describe('Text tools test cases', () => { await page.keyboard.type('+++'); await pressButton(page, 'Apply'); await takeEditorScreenshot(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await page.getByRole('dialog').getByRole('textbox').click(); const text1 = 'Ketcher is a tool to draw molecular structures and chemical reactions'; diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts index 455b6d497b..7c4a716468 100644 --- a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts +++ b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts @@ -31,6 +31,7 @@ import { copyToClipboardByKeyboard, waitForSpinnerFinishedWork, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getRotationHandleCoordinates } from '@utils/clicks/selectButtonByTitle'; @@ -830,7 +831,7 @@ test.describe('Templates - Functional Group Tools3', () => { await moveOnAtom(page, 'C', anyAtom); await page.keyboard.press('Shift+f'); await page.getByText('Boc').click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts index f06e9ad1e2..8582040ead 100644 --- a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts +++ b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts @@ -31,6 +31,7 @@ import { clickOnAtom, moveOnAtom, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; let point: { x: number; y: number }; @@ -579,9 +580,7 @@ test.describe('Functional Groups', () => { }); await selectFunctionalGroups(FunctionalGroups.Ms, page); - await waitForRender(page, async () => { - await page.mouse.click(x, y); - }); + await clickOnCanvas(page, x, y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); @@ -749,9 +748,7 @@ test.describe('Functional Groups', () => { await page.getByText('Expand Abbreviation').click(); }); await page.keyboard.press('n'); - await waitForRender(page, async () => { - await page.mouse.click(x, y); - }); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); }); diff --git a/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts b/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts index 3e2145ac6c..3e9249bc75 100644 --- a/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts +++ b/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts @@ -1,6 +1,7 @@ import { Page, test, expect } from '@playwright/test'; import { clickInTheMiddleOfTheScreen, + clickOnCanvas, FunctionalGroups, getCoordinatesOfTheMiddleOfTheScreen, getEditorScreenshot, @@ -46,7 +47,7 @@ async function placePhenylalanineMustard(page: Page, x: number, y: number) { } await waitForRender(page, async () => { await phenylalanineLocator.first().click(); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); }); } diff --git a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts index 89a44f37fd..9972296bd9 100644 --- a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts @@ -30,6 +30,7 @@ import { pasteFromClipboardByKeyboard, moveMouseAway, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; const CANVAS_CLICK_X = 500; @@ -123,7 +124,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -138,7 +139,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 300; await openFileAndAddToCanvas('Rxn-V2000/reaction-dif-prop.rxn', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -259,7 +260,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -275,7 +276,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/reaction-dif-prop.rxn', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -293,7 +294,7 @@ test.describe('Copy/Cut/Paste Actions', () => { }); await copyToClipboardByKeyboard(page, { delay: INPUT_DELAY }); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -313,7 +314,7 @@ test.describe('Copy/Cut/Paste Actions', () => { await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -327,7 +328,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/reaction-dif-prop.rxn', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -346,7 +347,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pasteFromClipboardByKeyboard(page); await page.mouse.click(x2, y2); await takeEditorScreenshot(page); @@ -362,7 +363,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 300; await openFileAndAddToCanvas('Molfiles-V2000/generic-groups.mol', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -380,7 +381,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Molfiles-V2000/generic-groups.mol', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -415,7 +416,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Molfiles-V2000/query-features.mol', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -431,7 +432,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('Molfiles-V2000/R-Group-structure.mol', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -448,7 +449,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 5; await openFileAndAddToCanvas('Molfiles-V2000/R-Group-structure.mol', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await waitForRender(page, async () => { await selectAtomInToolbar(AtomButton.Nitrogen, page); }); @@ -468,7 +469,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 300; await openFileAndAddToCanvas('Molfiles-V2000/s-group-features.mol', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -485,7 +486,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Molfiles-V2000/s-group-features.mol', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -501,7 +502,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 300; await openFileAndAddToCanvas('Molfiles-V2000/attached.mol', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -534,7 +535,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 300; await openFileAndAddToCanvas('Molfiles-V2000/chiral-structure.mol', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -565,7 +566,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/reaction.rxn', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -617,7 +618,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await moveMouseAway(page); await takeEditorScreenshot(page); }); @@ -653,7 +654,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -689,7 +690,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -720,7 +721,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('Rxn-V2000/mapped-structure.rxn', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await moveMouseAway(page); await takeEditorScreenshot(page); }); @@ -735,7 +736,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 5; await openFileAndAddToCanvas('Rxn-V2000/mapped-structure.rxn', page); await cutAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -753,7 +754,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -766,7 +767,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 200; await openFileAndAddToCanvas('KET/stereo-test-structures.ket', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -801,7 +802,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -841,7 +842,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -916,7 +917,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const y = 150; await openFileAndAddToCanvas('KET/expanded-and-contracted-fg.ket', page); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); @@ -953,7 +954,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await copyAndPaste(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts b/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts index 27fcf0d1d3..e6860118ab 100644 --- a/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts @@ -38,6 +38,7 @@ import { copyToClipboardByKeyboard, pasteFromClipboardByKeyboard, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; @@ -508,7 +509,7 @@ test.describe('Undo/Redo Actions', () => { await selectLeftPanelButton(LeftPanelButton.R_GroupLabelTool, page); // need fix getCoordinatesTopAtomOfBenzeneRing after change canvas design const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R5'); await pressButton(page, 'Apply'); await screenshotBetweenUndoRedo(page); @@ -528,7 +529,7 @@ test.describe('Undo/Redo Actions', () => { await selectNestedTool(page, RgroupTool.R_GROUP_FRAGMENT); // need fix getCoordinatesTopAtomOfBenzeneRing after change canvas design const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); await pressButton(page, 'R8'); await pressButton(page, 'Apply'); await screenshotBetweenUndoRedo(page); diff --git a/ketcher-autotests/tests/utils/canvas/arrow-signes/getArrow.ts b/ketcher-autotests/tests/utils/canvas/arrow-signes/getArrow.ts index e274fa4a54..0f8145b78b 100644 --- a/ketcher-autotests/tests/utils/canvas/arrow-signes/getArrow.ts +++ b/ketcher-autotests/tests/utils/canvas/arrow-signes/getArrow.ts @@ -3,6 +3,7 @@ import { getLeftTopBarSize } from '../common/getLeftTopBarSize'; import { sortItems } from '../common/sortItems'; import { NO_STRUCTURE_AT_THE_CANVAS_ERROR } from '../constants'; import { ArrowXy, SORT_TYPE } from '../types'; +import { clickOnCanvas } from '@utils'; export async function getArrowsByIndex( page: Page, @@ -35,5 +36,5 @@ export async function getArrowsByIndex( export async function clickOnArrow(page: Page, index: number) { const { x, y } = await getArrowsByIndex(page, index); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); } diff --git a/ketcher-autotests/tests/utils/canvas/plus-signes/getPluses.ts b/ketcher-autotests/tests/utils/canvas/plus-signes/getPluses.ts index 90b8d7b6cb..2d4dff654e 100644 --- a/ketcher-autotests/tests/utils/canvas/plus-signes/getPluses.ts +++ b/ketcher-autotests/tests/utils/canvas/plus-signes/getPluses.ts @@ -3,6 +3,7 @@ import { getLeftTopBarSize } from '../common/getLeftTopBarSize'; import { sortItems } from '../common/sortItems'; import { NO_STRUCTURE_AT_THE_CANVAS_ERROR } from '../constants'; import { PlusXy, SORT_TYPE } from '../types'; +import { clickOnCanvas } from '@utils'; export async function getPlusesByIndex( page: Page, @@ -35,5 +36,5 @@ export async function getPlusesByIndex( export async function clickOnPlus(page: Page, index: number) { const { x, y } = await getPlusesByIndex(page, index); - await page.mouse.click(x, y); + await clickOnCanvas(page, x, y); } diff --git a/ketcher-autotests/tests/utils/clicks/index.ts b/ketcher-autotests/tests/utils/clicks/index.ts index 512969a711..d92ec1f082 100644 --- a/ketcher-autotests/tests/utils/clicks/index.ts +++ b/ketcher-autotests/tests/utils/clicks/index.ts @@ -55,9 +55,14 @@ export async function clickInTheMiddleOfTheScreen( }); } -export async function clickOnCanvas(page: Page, x: number, y: number) { +export async function clickOnCanvas( + page: Page, + x: number, + y: number, + options?: any, +) { await waitForRender(page, async () => { - await page.mouse.click(x, y); + await page.mouse.click(x, y, options); }); } From c8cac6d993c76d9b0d57df5308ebec3750baa69c Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 16:32:33 +0500 Subject: [PATCH 04/19] Replacement of methods --- .../tests/API/api-set-get-molecule.spec.ts | 10 +++---- .../Atom-Properties/atom-properties.spec.ts | 2 +- .../Bond-Tool/all-bonds.spec.ts | 29 +++++++++---------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts b/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts index d141108a4c..0a436126fa 100644 --- a/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts +++ b/ketcher-autotests/tests/API/api-set-get-molecule.spec.ts @@ -412,7 +412,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); @@ -498,7 +498,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); @@ -545,7 +545,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); @@ -628,7 +628,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); @@ -672,7 +672,7 @@ test.describe('Tests for API setMolecule/getMolecule', () => { // eslint-disable-next-line no-magic-numbers const point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts index 8a493b4a36..5bb5f2582f 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts @@ -1450,7 +1450,7 @@ test.describe('Atom Properties', () => { page, ); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts index d5f8c9f290..33a7993eec 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts @@ -42,6 +42,7 @@ import { cutToClipboardByKeyboard, copyToClipboardByKeyboard, pasteFromClipboardByKeyboard, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { @@ -113,8 +114,8 @@ test.describe(`Bond tool:`, () => { await clickInTheMiddleOfTheScreen(page); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const countBonds = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -129,7 +130,7 @@ test.describe(`Bond tool:`, () => { await selectNestedTool(page, BondTool[bondToolKey]); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const countBondsWithRing = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -140,7 +141,7 @@ test.describe(`Bond tool:`, () => { await selectTool(LeftPanelButton.Erase, page); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const sizeAfterErase = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -150,7 +151,7 @@ test.describe(`Bond tool:`, () => { await selectNestedTool(page, BondTool[bondToolKey]); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const sizeWithRingAndBond = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -173,7 +174,7 @@ test.describe(`Bond tool:`, () => { await selectNestedTool(page, BondTool[bondToolKey]); point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectAction(TopPanelButton.Clear, page); @@ -209,7 +210,7 @@ test.describe(`Bond tool:`, () => { await selectNestedTool(page, BondTool[bondToolKey]); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const chainSize = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -224,14 +225,14 @@ test.describe(`Bond tool:`, () => { expect(chainSizeAfterUndo).toEqual(chainSizeWithoutBondAfterUndo); point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getAtomByIndex( page, { label: 'C' }, DELAY_IN_SECONDS.THREE, ); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const editedChain = await page.evaluate(() => { return window.ketcher.editor.struct().bonds.size; @@ -362,9 +363,7 @@ test.describe(`Bond tool (copy-paste):`, () => { reactingCenterStatus: 0, }); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y); - }); + await clickOnCanvas(page, point.x, point.y); await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); @@ -398,14 +397,12 @@ test.describe(`Bond tool (copy-paste):`, () => { point = await getCoordinatesTopAtomOfBenzeneRing(page); await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await selectTopPanelButton(TopPanelButton.Undo, page); }); await selectRing(RingButton.Cyclohexane, page); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y); - }); + await clickOnCanvas(page, point.x, point.y); await takeEditorScreenshot(page); }, From 69c6ca2be519e857a1046ffdd7be2ae49ea7516e Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 16:33:14 +0500 Subject: [PATCH 05/19] Replacement of methods --- .../Atom/Atom-Properties/atom-properties.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts index 5bb5f2582f..4a006d693e 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Properties/atom-properties.spec.ts @@ -26,6 +26,7 @@ import { waitForAtomPropsModal, drawBenzeneRing, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getMolfile, getRxn } from '@utils/formats'; import { @@ -1450,7 +1451,7 @@ test.describe('Atom Properties', () => { page, ); await copyAndPaste(page); - await await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); From b129042fd3c32fe8a618f4a50bc059af2b60f981 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 17:32:48 +0500 Subject: [PATCH 06/19] Replacement of methods --- .../Macromolecule-editor/RNA-Builder/rna-library.spec.ts | 6 +++--- .../tests/User-Interface/Select-Tools/select-bonds.spec.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts index aa50c189d1..7a4615c6dc 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts @@ -1277,9 +1277,9 @@ test.describe('RNA Library', () => { // await rnaLibrarySearch.press('Escape'); // Case 27 here. Dirty hack, can't believe I did it. - const xCoodinate = 1241; - const yCoodinate = 62; - await page.mouse.click(xCoodinate, yCoodinate); + const xCoordinate = 1241; + const yCoordinate = 62; + await clickOnCanvas(page, xCoordinate, yCoordinate); await chooseTab(page, Tabs.Rna); await takeMonomerLibraryScreenshot(page); diff --git a/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts b/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts index 3100851f13..4f1c955c6d 100644 --- a/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts @@ -7,6 +7,7 @@ import { selectButtonById, BondTypeId, waitForPageInit, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -26,7 +27,7 @@ test.describe('Bonds plus atoms selection ', () => { await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); const point = await getBondByIndex(page, {}, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const atom1Point = await getAtomByIndex(page, {}, 0); const atom2Point = await getAtomByIndex(page, {}, 1); await page.keyboard.down('Shift'); From 85e21c28f2fe85ce0f1b46d6ea0569087b258b25 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 17:34:51 +0500 Subject: [PATCH 07/19] Replacement of methods --- .../tests/Settings/Atoms/atoms-settings.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ketcher-autotests/tests/Settings/Atoms/atoms-settings.spec.ts b/ketcher-autotests/tests/Settings/Atoms/atoms-settings.spec.ts index 7bd25d0a08..ab0e88cf0e 100644 --- a/ketcher-autotests/tests/Settings/Atoms/atoms-settings.spec.ts +++ b/ketcher-autotests/tests/Settings/Atoms/atoms-settings.spec.ts @@ -11,6 +11,7 @@ import { RingButton, getAtomByIndex, openSettings, + clickOnCanvas, } from '@utils'; import { scrollSettingBar } from '@utils/scrollSettingBar'; @@ -84,7 +85,7 @@ test.describe('Atom Settings', () => { const pointX = 250; const pointY = 250; await selectExtendedTableElements(page, 'D'); - await page.mouse.click(pointX, pointY); + await clickOnCanvas(page, pointX, pointY); await selectExtendedTableElements(page, 'T'); await clickInTheMiddleOfTheScreen(page); await takeEditorScreenshot(page); @@ -121,13 +122,13 @@ test.describe('Atom Settings', () => { await resetCurrentTool(page); const point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Query properties').click(); await ringBondCountQuery(page, 'Ring bond count'); await substitutionCountQuery(page, 'Substitution count'); await aromaticityQuery(page, 'Aromaticity'); await ringSizeQuery(page, 'Ring size'); - await page.mouse.click(pointX, pointY); + await clickOnCanvas(page, pointX, pointY); await takeEditorScreenshot(page); }); }); From 660857d701c3d2d57303ead5ecaf8dfad8778d45 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Fri, 22 Nov 2024 17:47:14 +0500 Subject: [PATCH 08/19] Replacement of methods --- .../default-settings-verification.spec.ts | 3 +- .../attachment-point-tool.spec.ts | 8 ++--- .../data-s-group-tool.spec.ts | 3 +- .../Chain-Tool/chain-tool.spec.ts | 5 +-- .../click-fg-on-canvas.spec.ts | 3 +- .../Copy-Cut-Paste/copy-cut-paste.spec.ts | 32 +++++++++---------- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/ketcher-autotests/tests/Settings/General/default-settings-verification.spec.ts b/ketcher-autotests/tests/Settings/General/default-settings-verification.spec.ts index d1b1b202bd..5b75dc9d36 100644 --- a/ketcher-autotests/tests/Settings/General/default-settings-verification.spec.ts +++ b/ketcher-autotests/tests/Settings/General/default-settings-verification.spec.ts @@ -19,6 +19,7 @@ import { moveMouseAway, openSettings, delay, + clickOnCanvas, } from '@utils'; async function resetSelectToolOff(page: Page) { @@ -55,7 +56,7 @@ test.describe('General Settings', () => { await resetSelectToolOff(page); await drawBenzeneRing(page); await copyAndPaste(page); - await page.mouse.click(pointX, pointY); + await clickOnCanvas(page, pointX, pointY); await page.keyboard.press('Control+z'); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts index 136bb01a7d..f860c6baf4 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts @@ -329,7 +329,7 @@ test.describe('Attachment Point Tool', () => { */ await openFileAndAddToCanvas('KET/chain-with-attachment-points.ket', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -342,7 +342,7 @@ test.describe('Attachment Point Tool', () => { */ await openFileAndAddToCanvas('KET/chain-with-attachment-points.ket', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); @@ -612,7 +612,7 @@ test.describe('Attachment Point Tool', () => { await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); const point = await getAtomByIndex(page, { label: 'N' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const coordinatesWithShift = point.y + yDelta; await dragMouseTo(point.x, coordinatesWithShift, page); @@ -699,7 +699,7 @@ test.describe('Attachment Point Tool', () => { await selectAtomInToolbar(AtomButton.Oxygen, page); const point = await getAtomByIndex(page, { label: 'N' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const coordinatesWithShift = point.y + yDelta; await dragMouseTo(point.x, coordinatesWithShift, page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts index 0a2ca59bad..4ef4d14a3b 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts @@ -25,6 +25,7 @@ import { saveToFile, waitForPageInit, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getCml, getKet, getMolfile } from '@utils/formats'; @@ -142,7 +143,7 @@ test.describe('Data S-Group tool', () => { */ await openFileAndAddToCanvas('KET/chain-with-name-and-value.ket', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts index de8ee41097..51adc8292e 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts @@ -8,6 +8,7 @@ import { import { getBondByIndex } from '@utils/canvas/bonds'; import { BondType } from '@utils/canvas/types'; import { + clickOnCanvas, dragMouseTo, getCoordinatesOfTheMiddleOfTheScreen, moveMouseToTheMiddleOfTheScreen, @@ -81,12 +82,12 @@ test.describe('Chain Tool drawing', () => { */ point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const doubleBond = await getBondByIndex(page, { type: BondType.DOUBLE }, 0); expect(doubleBond.type).toEqual(BondType.DOUBLE); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const tripleBond = await getBondByIndex(page, { type: BondType.TRIPLE }, 0); expect(tripleBond.type).toEqual(BondType.TRIPLE); await takeEditorScreenshot(page); diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/click-fg-on-canvas.spec.ts b/ketcher-autotests/tests/Templates/Functional-Groups/click-fg-on-canvas.spec.ts index d03247a0df..545829cb2a 100644 --- a/ketcher-autotests/tests/Templates/Functional-Groups/click-fg-on-canvas.spec.ts +++ b/ketcher-autotests/tests/Templates/Functional-Groups/click-fg-on-canvas.spec.ts @@ -14,6 +14,7 @@ import { resetCurrentTool, SaltsAndSolvents, waitForPageInit, + clickOnCanvas, } from '@utils'; test.describe('Click Functional Group on canvas', () => { @@ -98,7 +99,7 @@ test.describe('Click Functional Group on canvas', () => { await dragMouseTo(coordinatesWithShift, y, page); await selectFunctionalGroups(FunctionalGroups.Ms, page); - await page.mouse.click(coordinatesWithShift, y); + await clickOnCanvas(page, coordinatesWithShift, y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts index 9972296bd9..4c7a8c6a4e 100644 --- a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts @@ -156,7 +156,7 @@ test.describe('Copy/Cut/Paste Actions', () => { }); await cutToClipboardByKeyboard(page, { delay: INPUT_DELAY }); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -173,7 +173,7 @@ test.describe('Copy/Cut/Paste Actions', () => { }); await cutToClipboardByKeyboard(page, { delay: INPUT_DELAY }); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -519,7 +519,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Molfiles-V2000/attached.mol', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -550,7 +550,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Molfiles-V2000/chiral-structure.mol', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -580,7 +580,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 12; await openFileAndAddToCanvas('Rxn-V2000/reaction.rxn', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -597,10 +597,10 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 8; await openFileAndAddToCanvas('Rxn-V2000/rxn-reaction.rxn', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await openFileAndAddToCanvas('Rxn-V2000/allenes.rxn', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -636,7 +636,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -671,7 +671,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -706,7 +706,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -781,7 +781,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 5; await openFileAndAddToCanvas('KET/stereo-test-structures.ket', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await resetCurrentTool(page); @@ -820,7 +820,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await resetCurrentTool(page); @@ -862,7 +862,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -898,7 +898,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Oxygen, page); await clickOnAtom(page, 'C', anyAtom); await resetCurrentTool(page); @@ -933,7 +933,7 @@ test.describe('Copy/Cut/Paste Actions', () => { const anyAtom = 5; await openFileAndAddToCanvas('KET/expanded-and-contracted-fg.ket', page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'C', anyAtom); await takeEditorScreenshot(page); @@ -973,7 +973,7 @@ test.describe('Copy/Cut/Paste Actions', () => { page, ); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await selectAtomInToolbar(AtomButton.Nitrogen, page); await clickOnAtom(page, 'S', anyAtom); await takeEditorScreenshot(page); From 3901a2e9f152838f3ee693fa22644f7837ab0c4b Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 11:43:25 +0500 Subject: [PATCH 09/19] Replacement of methods --- .../attachment-point-tool.spec.ts | 10 +++++++--- .../Atom/Atom-Tool/atom-tool.spec.ts | 2 +- .../Bond-Tool/all-bonds.spec.ts | 10 ++++------ .../Simple-Objects/action-on-simple-objects.spec.ts | 7 ++++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts index f860c6baf4..2f8ff15786 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Attachment-Point-Tool/attachment-point-tool.spec.ts @@ -186,7 +186,11 @@ test.describe('Attachment Point Tool', () => { const clickToOutsideStructureY = 100; await openFileAndAddToCanvas('KET/simple-chain.ket', page); await selectNestedTool(page, RgroupTool.ATTACHMENT_POINTS); - await page.mouse.click(clickToOutsideStructureX, clickToOutsideStructureY); + await clickOnCanvas( + page, + clickToOutsideStructureX, + clickToOutsideStructureY, + ); await takeEditorScreenshot(page); }); @@ -617,7 +621,7 @@ test.describe('Attachment Point Tool', () => { await dragMouseTo(point.x, coordinatesWithShift, page); const point2 = await getAtomByIndex(page, { label: 'L#' }, 0); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); const coordinatesWithShift2 = point.y + yDelta; await dragMouseTo(point2.x, coordinatesWithShift2, page); @@ -704,7 +708,7 @@ test.describe('Attachment Point Tool', () => { await dragMouseTo(point.x, coordinatesWithShift, page); const point2 = await getAtomByIndex(page, { label: 'L#' }, 0); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); const coordinatesWithShift2 = point.y + yDelta; await dragMouseTo(point2.x, coordinatesWithShift2, page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts index 32fc90e3f1..293b3758c1 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/atom-tool.spec.ts @@ -308,7 +308,7 @@ test.describe('Atom Tool', () => { const bromineCoordinates = { x: x + X_DELTA_ONE, y }; await selectAtomInToolbar(AtomButton.Bromine, page); - await page.mouse.click(bromineCoordinates.x, bromineCoordinates.y); + await clickOnCanvas(page, bromineCoordinates.x, bromineCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(bromineCoordinates.x, bromineCoordinates.y); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts index 33a7993eec..3d12622382 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Bond-Tool/all-bonds.spec.ts @@ -185,12 +185,12 @@ test.describe(`Bond tool:`, () => { const doubleBond = await getTopBondByAttributes(page, { type: BondType.DOUBLE, }); - await page.mouse.click(doubleBond.x, doubleBond.y); + await clickOnCanvas(page, doubleBond.x, doubleBond.y); const singleBond = await getTopBondByAttributes(page, { type: BondType.SINGLE, }); - await page.mouse.click(singleBond.x, singleBond.y); + await clickOnCanvas(page, singleBond.x, singleBond.y); await takeEditorScreenshot(page); await selectAction(TopPanelButton.Clear, page); }); @@ -368,9 +368,7 @@ test.describe(`Bond tool (copy-paste):`, () => { await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); - await waitForRender(page, async () => { - await page.mouse.click(point.x + DELTA_X, point.y); - }); + await clickOnCanvas(page, point.x + DELTA_X, point.y); await waitForRender(page, async () => { await selectTopPanelButton(TopPanelButton.Undo, page); }); @@ -378,7 +376,7 @@ test.describe(`Bond tool (copy-paste):`, () => { await clickInTheMiddleOfTheScreen(page); await cutToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); - await page.mouse.click(point.x + DELTA_X, point.y); + await clickOnCanvas(page, point.x + DELTA_X, point.y); await waitForRender(page, async () => { await selectTopPanelButton(TopPanelButton.Undo, page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/action-on-simple-objects.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/action-on-simple-objects.spec.ts index 9350ebc74b..9de65180e3 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/action-on-simple-objects.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/action-on-simple-objects.spec.ts @@ -21,6 +21,7 @@ import { STRUCTURE_LIBRARY_BUTTON_NAME, cutAndPaste, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getKet } from '@utils/formats'; @@ -114,8 +115,8 @@ test.describe('Action on simples objects', () => { await drawBenzeneRing(page); await takeEditorScreenshot(page); await selectDropdownTool(page, 'select-rectangle', 'select-lasso'); + await clickOnCanvas(page, point2.x, point2.y); await waitForRender(page, async () => { - await page.mouse.click(point2.x, point2.y); await dragMouseTo(point3.x, point3.y, page); }); await takeEditorScreenshot(page); @@ -156,13 +157,13 @@ test.describe('Action on simples objects', () => { }); } await copyAndPaste(page); - await page.mouse.click(anyPointX, anyPointY); + await clickOnCanvas(page, anyPointX, anyPointY); await takeEditorScreenshot(page); for (let i = 0; i < numberOfPress; i++) { await selectTopPanelButton(TopPanelButton.Undo, page); } await cutAndPaste(page); - await page.mouse.click(anyPointX, anyPointY); + await clickOnCanvas(page, anyPointX, anyPointY); await takeEditorScreenshot(page); for (let i = 0; i < numberOfPress; i++) { await selectTopPanelButton(TopPanelButton.Undo, page); From ad60f53fe4a730f9d5106e292023b6162620cf77 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 11:47:38 +0500 Subject: [PATCH 10/19] Replacement of methods --- .../Selection-Tool/bond-properties.spec.ts | 3 ++- .../Atom-Tool/click-and-drag-atom-on-canvas.spec.ts | 3 ++- .../Atom/Atom-Tool/click-atom-on-canvas.spec.ts | 3 ++- .../Atom/Atom-Tool/drag-and-drop-atom.spec.ts | 11 ++++++----- .../Chain-Tool/chain-tool.spec.ts | 2 +- .../Salts-and-Solvents/click-salts-on-canvas.spec.ts | 3 ++- .../Copy-Cut-Paste/copy-cut-paste.spec.ts | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/bond-properties.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/bond-properties.spec.ts index 242178338e..0b231b9b92 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/bond-properties.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/bond-properties.spec.ts @@ -2,6 +2,7 @@ import { test, expect, Page } from '@playwright/test'; import { BondType, + clickOnCanvas, doubleClickOnBond, dragMouseTo, getCoordinatesOfTheMiddleOfTheScreen, @@ -554,7 +555,7 @@ test.describe('Bond Properties', () => { await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await selectRingButton(RingButton.Benzene, page); - await page.mouse.click(x + 150, y + 150); + await clickOnCanvas(page, x + 150, y + 150); const expectedFile = await getRxn(page, 'v2000'); await saveToFile('Rxn-V2000/rxn-1465-to-open-expected.rxn', expectedFile); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-and-drag-atom-on-canvas.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-and-drag-atom-on-canvas.spec.ts index 4e044203c9..0dcd2cea59 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-and-drag-atom-on-canvas.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-and-drag-atom-on-canvas.spec.ts @@ -15,6 +15,7 @@ import { resetCurrentTool, moveOnAtom, waitForPageInit, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; @@ -119,7 +120,7 @@ test.describe('Click and drag Atom on canvas', () => { await selectAtomInToolbar(AtomButton.Oxygen, page); await moveMouseToTheMiddleOfTheScreen(page); - await page.mouse.click(coordinatesWithShift, y); + await clickOnCanvas(page, coordinatesWithShift, y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-atom-on-canvas.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-atom-on-canvas.spec.ts index b47c3c045d..82a5fdd7f9 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-atom-on-canvas.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/click-atom-on-canvas.spec.ts @@ -14,6 +14,7 @@ import { FunctionalGroups, resetCurrentTool, waitForPageInit, + clickOnCanvas, } from '@utils'; test.describe('Click Atom on canvas', () => { @@ -100,7 +101,7 @@ test.describe('Click Atom on canvas', () => { await dragMouseTo(coordinatesWithShift, y, page); await selectAtomInToolbar(AtomButton.Fluorine, page); - await page.mouse.click(coordinatesWithShift, y); + await clickOnCanvas(page, coordinatesWithShift, y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/drag-and-drop-atom.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/drag-and-drop-atom.spec.ts index e2c8cd9b58..ea5674d0f3 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/drag-and-drop-atom.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Atom/Atom-Tool/drag-and-drop-atom.spec.ts @@ -16,6 +16,7 @@ import { takeEditorScreenshot, resetCurrentTool, waitForPageInit, + clickOnCanvas, } from '@utils'; const X_DELTA_ONE = 100; @@ -38,7 +39,7 @@ test.describe('Drag and drop Atom on canvas', () => { const oxygenCoordinates = { x: x + X_DELTA_ONE, y }; await selectAtomInToolbar(AtomButton.Oxygen, page); - await page.mouse.click(oxygenCoordinates.x, oxygenCoordinates.y); + await clickOnCanvas(page, oxygenCoordinates.x, oxygenCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(oxygenCoordinates.x, oxygenCoordinates.y); @@ -61,7 +62,7 @@ test.describe('Drag and drop Atom on canvas', () => { const nitrogenCoordinates = { x: x + X_DELTA_ONE, y }; await selectAtomInToolbar(AtomButton.Nitrogen, page); - await page.mouse.click(nitrogenCoordinates.x, nitrogenCoordinates.y); + await clickOnCanvas(page, nitrogenCoordinates.x, nitrogenCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(nitrogenCoordinates.x, nitrogenCoordinates.y); @@ -82,7 +83,7 @@ test.describe('Drag and drop Atom on canvas', () => { const nitrogenCoordinates = { x: x + X_DELTA_ONE, y }; await selectAtomInToolbar(AtomButton.Nitrogen, page); - await page.mouse.click(nitrogenCoordinates.x, nitrogenCoordinates.y); + await clickOnCanvas(page, nitrogenCoordinates.x, nitrogenCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(nitrogenCoordinates.x, nitrogenCoordinates.y); @@ -109,7 +110,7 @@ test.describe('Drag and drop Atom on canvas', () => { await selectAtomInToolbar(AtomButton.Oxygen, page); await moveMouseToTheMiddleOfTheScreen(page); const oxygenCoordinates = { x: x + X_DELTA_TWO, y }; - await page.mouse.click(oxygenCoordinates.x, oxygenCoordinates.y); + await clickOnCanvas(page, oxygenCoordinates.x, oxygenCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(oxygenCoordinates.x, oxygenCoordinates.y); @@ -138,7 +139,7 @@ test.describe('Drag and drop Atom on canvas', () => { await selectAtomInToolbar(AtomButton.Oxygen, page); await moveMouseToTheMiddleOfTheScreen(page); const oxygenCoordinates = { x: x + X_DELTA_TWO, y }; - await page.mouse.click(oxygenCoordinates.x, oxygenCoordinates.y); + await clickOnCanvas(page, oxygenCoordinates.x, oxygenCoordinates.y); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); await page.mouse.move(oxygenCoordinates.x, oxygenCoordinates.y); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts index 51adc8292e..1e99e8168e 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Chain-Tool/chain-tool.spec.ts @@ -49,7 +49,7 @@ test.describe('Chain Tool drawing', () => { await dragMouseTo(point.x, point.y + DELTA, page); await selectRing(RingButton.Benzene, page); - await page.mouse.click(point.x - DELTA, point.y + DELTA_Y); + await clickOnCanvas(page, point.x - DELTA, point.y + DELTA_Y); await selectTool(LeftPanelButton.Chain, page); point = await getBottomAtomByAttributes(page, { label: 'C' }); diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/click-salts-on-canvas.spec.ts b/ketcher-autotests/tests/Templates/Salts-and-Solvents/click-salts-on-canvas.spec.ts index 0c9ae092c0..0890381ba5 100644 --- a/ketcher-autotests/tests/Templates/Salts-and-Solvents/click-salts-on-canvas.spec.ts +++ b/ketcher-autotests/tests/Templates/Salts-and-Solvents/click-salts-on-canvas.spec.ts @@ -14,6 +14,7 @@ import { resetCurrentTool, SaltsAndSolvents, waitForPageInit, + clickOnCanvas, } from '@utils'; test.describe('Click Salts and Solvents on canvas', () => { @@ -102,7 +103,7 @@ test.describe('Click Salts and Solvents on canvas', () => { await dragMouseTo(coordinatesWithShift, y, page); await selectSaltsAndSolvents(SaltsAndSolvents.Sulfolane, page); - await page.mouse.click(coordinatesWithShift, y); + await clickOnCanvas(page, coordinatesWithShift, y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts index 4c7a8c6a4e..f422aed702 100644 --- a/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Editing-Tools/Copy-Cut-Paste/copy-cut-paste.spec.ts @@ -349,7 +349,7 @@ test.describe('Copy/Cut/Paste Actions', () => { await copyAndPaste(page); await clickOnCanvas(page, x, y); await pasteFromClipboardByKeyboard(page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await takeEditorScreenshot(page); }); From b3dbdcdd895134eecee457badf6b5b107b9ef2a7 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 11:50:36 +0500 Subject: [PATCH 11/19] Replacement of methods --- .../ignore-chiral-flag.spec.ts | 10 +++------- .../Erase-Tool/erase-tool.spec.ts | 5 +++-- .../fragment-selection-tool.spec.ts | 3 ++- .../functional-group-tools.spec.ts | 20 +++++++++---------- .../functional-groups.spec.ts | 10 +++------- .../tests/utils/canvas/drawStructures.ts | 9 +++++++-- .../tests/utils/canvas/helpers.ts | 7 ++++--- .../tests/utils/canvas/tools/helpers.ts | 6 ++++-- 8 files changed, 36 insertions(+), 34 deletions(-) diff --git a/ketcher-autotests/tests/Settings/Stereochemistry/ignore-chiral-flag.spec.ts b/ketcher-autotests/tests/Settings/Stereochemistry/ignore-chiral-flag.spec.ts index 9c98fb3bb3..a3e7a98e2e 100644 --- a/ketcher-autotests/tests/Settings/Stereochemistry/ignore-chiral-flag.spec.ts +++ b/ketcher-autotests/tests/Settings/Stereochemistry/ignore-chiral-flag.spec.ts @@ -3,6 +3,7 @@ import { Page, test } from '@playwright/test'; import { STRUCTURE_LIBRARY_BUTTON_TEST_ID } from '@tests/Templates/templates.costants'; import { clickInTheMiddleOfTheScreen, + clickOnCanvas, copyAndPaste, cutAndPaste, openSettings, @@ -11,7 +12,6 @@ import { takeEditorScreenshot, TopPanelButton, waitForPageInit, - waitForRender, } from '@utils'; import { scrollSettingBar } from '@utils/scrollSettingBar'; @@ -54,9 +54,7 @@ test.describe('Ignore Chiral Flag', () => { await applyIgnoreChiralFlag(page); await templateFromLAminoAcidsCategory(page); await copyAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(pointX, pointY); - }); + await clickOnCanvas(page, pointX, pointY); await takeEditorScreenshot(page); }); @@ -69,9 +67,7 @@ test.describe('Ignore Chiral Flag', () => { await applyIgnoreChiralFlag(page); await templateFromLAminoAcidsCategory(page); await cutAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(pointY, pointZ); - }); + await clickOnCanvas(page, pointY, pointZ); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts index 2311480b50..f9e99f9f10 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts @@ -11,6 +11,7 @@ import { clickOnAtom, clickOnBond, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getLeftTopBarSize } from '@utils/canvas/common/getLeftTopBarSize'; import { RxnArrow, RxnPlus } from 'ketcher-core'; @@ -88,7 +89,7 @@ test.describe('Erase Tool', () => { y: plusElement.pp.y * scale + topBarHeight, }; - await page.mouse.click(plusPnt.x, plusPnt.y); + await clickOnCanvas(page, plusPnt.x, plusPnt.y); const plusDeleted = await page.evaluate(() => { return window.ketcher.editor.struct().rxnPluses.size; @@ -125,7 +126,7 @@ test.describe('Erase Tool', () => { await selectAllStructuresOnCanvas(page); await page.getByTestId('delete').click(); - await page.mouse.click(arrowMiddle.x, arrowMiddle.y); + await clickOnCanvas(page, arrowMiddle.x, arrowMiddle.y); const arrowDeleted = await page.evaluate(() => { return window.ketcher.editor.struct().rxnArrows.size; diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Fragment selection/fragment-selection-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Fragment selection/fragment-selection-tool.spec.ts index f52e83e353..b87941e8b7 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Fragment selection/fragment-selection-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Fragment selection/fragment-selection-tool.spec.ts @@ -1,6 +1,7 @@ import { Page, test } from '@playwright/test'; import { clickOnAtom, + clickOnCanvas, doubleClickOnAtom, dragMouseTo, openFileAndAddToCanvas, @@ -110,7 +111,7 @@ test.describe('Fragment selection tool', () => { await openFileAndAddToCanvas('Molfiles-V2000/glutamine.mol', page); await selectDropdownTool(page, 'select-rectangle', 'select-fragment'); const point = await getRightAtomByAttributes(page, { label: 'N' }); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.mouse.move(point.x, point.y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts index 7c4a716468..7143760eff 100644 --- a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts +++ b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts @@ -295,7 +295,7 @@ test.describe('Templates - Functional Group Tools2', () => { await selectLeftPanelButton(LeftPanelButton.SingleBond, page); const point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await resetCurrentTool(page); await takeEditorScreenshot(page); @@ -407,7 +407,7 @@ test.describe('Templates - Functional Group Tools2', () => { await selectRingButton(RingButton.Benzene, page); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await waitForRender(page, async () => { await pressButton(page, 'Remove Abbreviation'); }); @@ -416,7 +416,7 @@ test.describe('Templates - Functional Group Tools2', () => { await selectRingButton(RingButton.Cyclopentadiene, page); point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await resetCurrentTool(page); await takeEditorScreenshot(page); }); @@ -568,11 +568,11 @@ test.describe('Templates - Functional Group Tools2', () => { page, ); await selectFunctionalGroups(FunctionalGroups.CO2Et, page); - await page.mouse.click(clickCoordines.x1, clickCoordines.y1); + await clickOnCanvas(page, clickCoordines.x1, clickCoordines.y1); await resetCurrentTool(page); await selectFunctionalGroups(FunctionalGroups.CPh3, page); - await page.mouse.click(clickCoordines.x2, clickCoordines.y2); + await clickOnCanvas(page, clickCoordines.x2, clickCoordines.y2); await resetCurrentTool(page); await takeEditorScreenshot(page); }); @@ -725,7 +725,7 @@ test.describe('Templates - Functional Group Tools3', () => { await selectAllStructuresOnCanvas(page); const point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await waitForRender(page, async () => { await page.getByText('Remove Abbreviation').click(); }); @@ -756,11 +756,11 @@ test.describe('Templates - Functional Group Tools3', () => { }; await selectFunctionalGroups(FunctionalGroups.Bn, page); - await page.mouse.click(clickCoordines.x1, clickCoordines.y1); + await clickOnCanvas(page, clickCoordines.x1, clickCoordines.y1); await resetCurrentTool(page); await selectFunctionalGroups(FunctionalGroups.Boc, page); - await page.mouse.click(clickCoordines.x2, clickCoordines.y2); + await clickOnCanvas(page, clickCoordines.x2, clickCoordines.y2); await resetCurrentTool(page); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); @@ -793,11 +793,11 @@ test.describe('Templates - Functional Group Tools3', () => { }; await selectFunctionalGroups(FunctionalGroups.CCl3, page); - await page.mouse.click(clickCoordines.x1, clickCoordines.y1); + await clickOnCanvas(page, clickCoordines.x1, clickCoordines.y1); await resetCurrentTool(page); await selectFunctionalGroups(FunctionalGroups.C2H5, page); - await page.mouse.click(clickCoordines.x2, clickCoordines.y2); + await clickOnCanvas(page, clickCoordines.x2, clickCoordines.y2); await resetCurrentTool(page); await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page); diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts index 8582040ead..67178c37bd 100644 --- a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts +++ b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts @@ -126,7 +126,7 @@ test.describe('Functional Groups', () => { page, ); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); @@ -156,9 +156,7 @@ test.describe('Functional Groups', () => { page, ); await copyAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); - }); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); @@ -575,9 +573,7 @@ test.describe('Functional Groups', () => { await openFileAndAddToCanvas('KET/chain.ket', page); await selectFunctionalGroups(FunctionalGroups.CN, page); point = await getAtomByIndex(page, { label: 'C' }, 0); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y); - }); + await clickOnCanvas(page, point.x, point.y); await selectFunctionalGroups(FunctionalGroups.Ms, page); await clickOnCanvas(page, x, y); diff --git a/ketcher-autotests/tests/utils/canvas/drawStructures.ts b/ketcher-autotests/tests/utils/canvas/drawStructures.ts index 65827f4eb0..958b7fb783 100644 --- a/ketcher-autotests/tests/utils/canvas/drawStructures.ts +++ b/ketcher-autotests/tests/utils/canvas/drawStructures.ts @@ -5,7 +5,11 @@ import { getCoordinatesTopAtomOfBenzeneRing, selectBond, } from '.'; -import { clickInTheMiddleOfTheScreen, dragMouseTo } from '@utils'; +import { + clickInTheMiddleOfTheScreen, + clickOnCanvas, + dragMouseTo, +} from '@utils'; import { ArrowTool, selectNestedTool } from './tools/selectNestedTool'; export async function drawReactionWithTwoBenzeneRings( @@ -27,7 +31,8 @@ export async function drawReactionWithTwoBenzeneRings( page, ); await page.getByRole('button', { name: 'Benzene (T)' }).click(); - await page.mouse.click( + await clickOnCanvas( + page, firstBenzineTopAtom.x, firstBenzineTopAtom.y - secondBenzeneRingOffset, ); diff --git a/ketcher-autotests/tests/utils/canvas/helpers.ts b/ketcher-autotests/tests/utils/canvas/helpers.ts index c896f6eef6..580a9c8d0d 100644 --- a/ketcher-autotests/tests/utils/canvas/helpers.ts +++ b/ketcher-autotests/tests/utils/canvas/helpers.ts @@ -7,6 +7,7 @@ import { import { clickInTheMiddleOfTheScreen, clickOnAtom, + clickOnCanvas, pressButton, } from '@utils/clicks'; import { ELEMENT_TITLE } from './types'; @@ -97,7 +98,7 @@ export async function drawElementByTitle( const topBarHeight = await getTopToolBarHeight(page); await page.getByTitle(elementTitle, { exact: true }).click(); - await page.mouse.click(leftBarWidth + offsetX, topBarHeight + offsetY); + await clickOnCanvas(page, leftBarWidth + offsetX, topBarHeight + offsetY); } export async function getLeftToolBarWidth(page: Page): Promise { @@ -314,7 +315,7 @@ export async function addSingleMonomerToCanvas( index: number, ) { await page.getByTestId(monomerFullName).click(); - await page.mouse.click(positionX, positionY); + await clickOnCanvas(page, positionX, positionY); await hideMonomerPreview(page); return await page .locator(`//\*[name() = 'g' and ./\*[name()='text' and .='${alias}']]`) @@ -380,7 +381,7 @@ export async function addRnaPresetOnCanvas( phosphateIndex: number, ) { await page.getByTestId(presetId).click(); - await page.mouse.click(positionX, positionY); + await clickOnCanvas(page, positionX, positionY); await hideMonomerPreview(page); const sugar = await page .locator(`//\*[name() = 'g' and ./\*[name()='text' and .='R']]`) diff --git a/ketcher-autotests/tests/utils/canvas/tools/helpers.ts b/ketcher-autotests/tests/utils/canvas/tools/helpers.ts index a47d2376e3..b5687f4f2d 100644 --- a/ketcher-autotests/tests/utils/canvas/tools/helpers.ts +++ b/ketcher-autotests/tests/utils/canvas/tools/helpers.ts @@ -1,6 +1,7 @@ /* eslint-disable no-magic-numbers */ import { Page } from '@playwright/test'; import { + clickOnCanvas, MacromoleculesTopPanelButton, selectOption, SequenceType, @@ -97,9 +98,10 @@ export async function selectSequenceLayoutModeTool(page: Page) { export async function startNewSequence(page: Page) { const newSequenceCellCoordinates = { x: 50, y: 50 }; - await page.mouse.click(200, 200, { button: 'right' }); + await clickOnCanvas(page, 200, 200, { button: 'right' }); await page.getByTestId('start_new_sequence').click(); - await page.mouse.click( + await clickOnCanvas( + page, newSequenceCellCoordinates.x, newSequenceCellCoordinates.y, ); From 02f77c739c046c8f197385940d3370be87f40e20 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 11:54:32 +0500 Subject: [PATCH 12/19] Replacement of methods --- .../Load-Fragment/load-fragment.spec.ts | 3 +- .../polymer-bond-tool.spec.ts | 2 +- .../mapping-tool.spec.ts | 2 +- .../multi-tailed-arrow-tool.spec.ts | 6 +- .../plus-and-arrows-tools.spec.ts | 33 ++++------- .../R-group-tool/r-group-label-dialog.spec.ts | 4 +- .../rectangle-tool.spec.ts | 6 +- .../multiple-s-group-tool.spec.ts | 3 +- .../Lasso-Selection-Tool/lasso-tool.spec.ts | 28 ++++----- .../reaction-queries-attributes.spec.ts | 6 +- .../Manipulations-rings.spec.ts | 12 ++-- ...preview-for-abbreviated-structures.spec.ts | 5 +- .../Right-Click-Menu/right-click.spec.ts | 59 ++++++++++--------- 13 files changed, 85 insertions(+), 84 deletions(-) diff --git a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/Load-Fragment/load-fragment.spec.ts b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/Load-Fragment/load-fragment.spec.ts index 5a154bde03..e21f03d95f 100644 --- a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/Load-Fragment/load-fragment.spec.ts +++ b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/Load-Fragment/load-fragment.spec.ts @@ -18,6 +18,7 @@ import { receiveFileComparisonData, saveToFile, moveOnAtom, + clickOnCanvas, } from '@utils'; import { getKet } from '@utils/formats'; @@ -197,7 +198,7 @@ test.describe('load as fragment (Add to Canvas) srtuctures from files with diffe async function addSecondHydrogen() { await selectAtomInToolbar(AtomButton.Hydrogen, page); - await page.mouse.click(x + shiftForSecondHydrogen, y, { + await clickOnCanvas(page, x + shiftForSecondHydrogen, y, { button: 'left', }); } diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts index 12a82f95b6..e078860b99 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts @@ -737,7 +737,7 @@ test('Verify behaviour when a non-bond is right-clicked', async () => { Description: Nothing happen. */ await openFileAndAddToCanvasMacro('KET/two-peptides-connected.ket', page); - await page.mouse.click(200, 200, { button: 'right' }); + await clickOnCanvas(page, 200, 200, { button: 'right' }); await takeEditorScreenshot(page, { masks: [page.getByTestId('polymer-library-preview')], }); diff --git a/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts b/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts index af32ae7742..b1572421bb 100644 --- a/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts +++ b/ketcher-autotests/tests/Reaction-tool/Mapping-Unmapping tool/mapping-tool.spec.ts @@ -75,7 +75,7 @@ test.describe('Mapping Tools', () => { await openFileAndAddToCanvas('Rxn-V2000/reaction-3.rxn', page); await selectDropdownTool(page, 'reaction-map', 'reaction-map'); const point = await getAtomByIndex(page, { label: 'C' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const { x, y } = await getCoordinatesTopAtomOfBenzeneRing(page); await dragMouseTo(x, y, page); }); diff --git a/ketcher-autotests/tests/Reactions/Reaction-tools/Multi-Tailed-Arrow-Tool/multi-tailed-arrow-tool.spec.ts b/ketcher-autotests/tests/Reactions/Reaction-tools/Multi-Tailed-Arrow-Tool/multi-tailed-arrow-tool.spec.ts index 53700d380e..e39e8d0928 100644 --- a/ketcher-autotests/tests/Reactions/Reaction-tools/Multi-Tailed-Arrow-Tool/multi-tailed-arrow-tool.spec.ts +++ b/ketcher-autotests/tests/Reactions/Reaction-tools/Multi-Tailed-Arrow-Tool/multi-tailed-arrow-tool.spec.ts @@ -90,7 +90,7 @@ async function setupElementsAndModifyMultiTailArrow(page: Page) { } async function addTail(page: Page, x: number, y: number) { - await page.mouse.click(x, y, { button: 'right' }); + await clickOnCanvas(page, x, y, { button: 'right' }); await waitForRender(page, async () => { await page.getByText('Add new tail').click(); }); @@ -142,9 +142,9 @@ async function hoverOverArrowSpine( await page.mouse.move(x - 5, y); if (clickType === 'right') { - await page.mouse.click(x - 5, y, { button: 'right' }); + await clickOnCanvas(page, x - 5, y, { button: 'right' }); } else if (clickType === 'left') { - await page.mouse.click(x - 5, y, { button: 'left' }); + await clickOnCanvas(page, x - 5, y, { button: 'left' }); } } } diff --git a/ketcher-autotests/tests/Reactions/Reaction-tools/Plus-and-Arrow-tools/plus-and-arrows-tools.spec.ts b/ketcher-autotests/tests/Reactions/Reaction-tools/Plus-and-Arrow-tools/plus-and-arrows-tools.spec.ts index 475ef69daa..e20339a02b 100644 --- a/ketcher-autotests/tests/Reactions/Reaction-tools/Plus-and-Arrow-tools/plus-and-arrows-tools.spec.ts +++ b/ketcher-autotests/tests/Reactions/Reaction-tools/Plus-and-Arrow-tools/plus-and-arrows-tools.spec.ts @@ -30,6 +30,7 @@ import { cutToClipboardByKeyboard, pasteFromClipboardByKeyboard, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; const xOffsetFromCenter = -35; @@ -139,9 +140,9 @@ test.describe('Plus and Arrows tools ', () => { await dragMouseTo(x + 100, y + 100, page); await takeEditorScreenshot(page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -230,7 +231,7 @@ test.describe('Plus and Arrows tools ', () => { tag: ['@FlackyTest'], }, async ({ page }) => { - await page.mouse.click(point.x - 200, point.y + 15); + await clickOnCanvas(page, point.x - 200, point.y + 15); await selectRectangleArea( page, point.x - 200 - 20, @@ -261,7 +262,7 @@ test.describe('Plus and Arrows tools ', () => { // Selection of plus sign doesn't happen and the rest of the scrips works wrong page, }) => { - await page.mouse.click(point.x - 150, point.y - 10); + await clickOnCanvas(page, point.x - 150, point.y - 10); await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); @@ -272,7 +273,7 @@ test.describe('Plus and Arrows tools ', () => { page, }) => { await copyAndPaste(page); - await page.mouse.click(point.x - 100, point.y - 100); + await clickOnCanvas(page, point.x - 100, point.y - 100); await takeEditorScreenshot(page); await selectTopPanelButton(TopPanelButton.Undo, page); await takeEditorScreenshot(page); @@ -316,9 +317,7 @@ test.describe('Plus and Arrows tools ', () => { test('Select reaction arrow, cut and paste it onto the canvas', async ({ page, }) => { - await waitForRender(page, async () => { - await page.mouse.click(point.x + 60, point.y); - }); + await clickOnCanvas(page, point.x + 60, point.y); await cutToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page); @@ -331,9 +330,7 @@ test.describe('Plus and Arrows tools ', () => { tag: ['@FlakyTest'], }, async ({ page }) => { - await waitForRender(page, async () => { - await page.mouse.click(point.x + 60, point.y); - }); + await clickOnCanvas(page, point.x + 60, point.y); await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); @@ -345,7 +342,7 @@ test.describe('Plus and Arrows tools ', () => { page, }) => { await copyAndPaste(page); - await page.mouse.click(point.x - 100, point.y - 100); + await clickOnCanvas(page, point.x - 100, point.y - 100); await takeEditorScreenshot(page); await selectTopPanelButton(TopPanelButton.Undo, page); await takeEditorScreenshot(page); @@ -394,9 +391,7 @@ test.describe('Plus and Arrows tools ', () => { test('Select reaction arrow, cut and paste it onto the canvas', async ({ page, }) => { - await waitForRender(page, async () => { - await page.mouse.click(point.x + OFFSET_FROM_ARROW, point.y); - }); + await clickOnCanvas(page, point.x + OFFSET_FROM_ARROW, point.y); await cutToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); await clickOnTheCanvas(page, 0, -100); @@ -417,9 +412,7 @@ test.describe('Plus and Arrows tools ', () => { test('Select reaction arrow, copy and paste it onto the canvas', async ({ page, }) => { - await waitForRender(page, async () => { - await page.mouse.click(point.x + OFFSET_FROM_ARROW, point.y); - }); + await clickOnCanvas(page, point.x + OFFSET_FROM_ARROW, point.y); await copyToClipboardByKeyboard(page); await pasteFromClipboardByKeyboard(page, { delay: INPUT_DELAY }); @@ -797,7 +790,7 @@ test.describe('Plus and Arrows tools ', () => { await selectNestedTool(page, ArrowTool.ARROW_RETROSYNTHETIC); await clickInTheMiddleOfTheScreen(page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); }); @@ -809,7 +802,7 @@ test.describe('Plus and Arrows tools ', () => { await selectNestedTool(page, ArrowTool.ARROW_RETROSYNTHETIC); await clickInTheMiddleOfTheScreen(page); await cutAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); }); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts index b9210d2948..d663afff9c 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/R-group-tool/r-group-label-dialog.spec.ts @@ -159,7 +159,7 @@ test.describe('R-Group Label Tool', () => { let point: { x: number; y: number }; // eslint-disable-next-line no-magic-numbers, prefer-const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await pressButton(page, 'R5'); await waitForRender(page, async () => { await pressButton(page, 'Apply'); @@ -235,7 +235,7 @@ test.describe('R-Group Label Tool', () => { let point: { x: number; y: number }; // eslint-disable-next-line no-magic-numbers, prefer-const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await pressButton(page, 'R5'); await waitForRender(page, async () => { diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts index bed6f48211..fd711c3702 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts @@ -3,6 +3,7 @@ import { BondType, clickOnAtom, clickOnBond, + clickOnCanvas, dragMouseTo, getCoordinatesOfTheMiddleOfTheScreen, openFileAndAddToCanvas, @@ -74,11 +75,12 @@ test.describe('Rectangle selection tool', () => { await clickCanvas(page); await page.keyboard.down('Shift'); - await page.mouse.click( + await clickOnCanvas( + page, point.x - moveMouseCoordinatesX, point.y + moveMouseCoordinatesY, ); - await page.mouse.click(point.x, point.y + atomNumber); + await clickOnCanvas(page, point.x, point.y + atomNumber); await page.keyboard.up('Shift'); await clickCanvas(page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Multiple-S-Group-Tool/multiple-s-group-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Multiple-S-Group-Tool/multiple-s-group-tool.spec.ts index d1cee517c3..accf0bcc38 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Multiple-S-Group-Tool/multiple-s-group-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Multiple-S-Group-Tool/multiple-s-group-tool.spec.ts @@ -25,6 +25,7 @@ import { setAttachmentPoints, waitForPageInit, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getKet, getMolfile } from '@utils/formats'; @@ -197,7 +198,7 @@ test.describe('Multiple S-Group tool', () => { */ await openFileAndAddToCanvas('KET/multiple-group.ket', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/Lasso-Selection-Tool/lasso-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/Lasso-Selection-Tool/lasso-tool.spec.ts index ec403c0658..1824a7b69f 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/Lasso-Selection-Tool/lasso-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/Lasso-Selection-Tool/lasso-tool.spec.ts @@ -17,6 +17,7 @@ import { selectDropdownTool, waitForRender, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -45,7 +46,7 @@ test.describe('Lasso Selection tool', () => { } async function clickCanvas(page: Page) { - await page.mouse.click(xAxis, yAxis); + await clickOnCanvas(page, xAxis, yAxis); } test('Selection of atom/bond/molecule', async ({ page }) => { @@ -56,19 +57,19 @@ test.describe('Lasso Selection tool', () => { await openFileAndAddToCanvas('KET/two-benzene-with-atoms.ket', page); const atomPoint = await getAtomByIndex(page, { label: 'C' }, 0); await page.mouse.move(atomPoint.x, atomPoint.y); - await page.mouse.click(atomPoint.x, atomPoint.y); + await clickOnCanvas(page, atomPoint.x, atomPoint.y); await takeEditorScreenshot(page); await clickCanvas(page); const bondPoint = await getBondByIndex(page, {}, 0); await page.mouse.move(bondPoint.x, bondPoint.y); - await page.mouse.click(bondPoint.x, bondPoint.y); + await clickOnCanvas(page, bondPoint.x, bondPoint.y); await takeEditorScreenshot(page); await clickCanvas(page); await page.keyboard.down('Shift'); - await page.mouse.click(atomPoint.x, atomPoint.y); - await page.mouse.click(bondPoint.x, bondPoint.y); + await clickOnCanvas(page, atomPoint.x, atomPoint.y); + await clickOnCanvas(page, bondPoint.x, bondPoint.y); await page.keyboard.up('Shift'); await takeEditorScreenshot(page); await clickCanvas(page); @@ -115,8 +116,8 @@ test.describe('Lasso Selection tool', () => { await clickCanvas(page); await page.keyboard.down('Shift'); - await page.mouse.click(point.x - shiftCoords.x, point.y + shiftCoords.y); - await page.mouse.click(point.x, point.y + yShift); + await clickOnCanvas(page, point.x - shiftCoords.x, point.y + shiftCoords.y); + await clickOnCanvas(page, point.x, point.y + yShift); await page.keyboard.up('Shift'); await clickCanvas(page); @@ -166,9 +167,7 @@ test.describe('Lasso Selection tool', () => { await drawBenzeneRing(page); await selectDropdownTool(page, 'bonds', 'bond-singlearomatic'); const coordinates = await getCoordinatesTopAtomOfBenzeneRing(page); - await waitForRender(page, async () => { - await page.mouse.click(coordinates.x + xDelta, coordinates.y - yDelta); - }); + await clickOnCanvas(page, coordinates.x + xDelta, coordinates.y - yDelta); await selectDropdownTool(page, 'select-rectangle', 'select-lasso'); await selectObjects(page, selectCoords.x, selectCoords.y); const bondIndex = 3; @@ -187,7 +186,7 @@ test.describe('Lasso Selection tool', () => { { type: BondType.SINGLE_OR_AROMATIC }, 0, ); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const shiftCoords2 = { x: 5, y: 15 }; await dragMouseTo( point.x - xDelta + shiftCoords2.x, @@ -241,7 +240,7 @@ test.describe('Lasso Selection tool', () => { { type: BondType.SINGLE }, bondIndex, ); - await page.mouse.click(bondPoint.x, bondPoint.y); + await clickOnCanvas(page, bondPoint.x, bondPoint.y); await dragMouseTo( bondPoint.x + shiftCoords.x, bondPoint.y + shiftCoords.y, @@ -250,7 +249,8 @@ test.describe('Lasso Selection tool', () => { await selectObjects(page, yAxis, yAxis); - await page.mouse.click( + await clickOnCanvas( + page, bondPoint.x + shiftCoords.x, bondPoint.y + shiftCoords.y, ); @@ -312,7 +312,7 @@ test.describe('Lasso Selection tool', () => { const yShift = 100; const xShift = 500; await selectNestedTool(page, BondTool.SINGLE_AROMATIC); - await page.mouse.click(xAxis, yAxis); + await clickOnCanvas(page, xAxis, yAxis); await page.getByTestId('select-rectangle').click(); // 'Shift+Tab' used for switch from Rectangle selection to Lasso await page.keyboard.press('Shift+Tab'); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts index a4d16d56f0..8d39256b57 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts @@ -52,7 +52,7 @@ async function drawStructureWithArrowOpenAngle(page: Page) { await page.mouse.click; await selectAtomInToolbar(AtomButton.Oxygen, page); - await page.mouse.click(x + shiftForOxygen, y, { + await clickOnCanvas(page, x + shiftForOxygen, y, { button: 'left', }); } @@ -118,7 +118,7 @@ test.describe('Checking reaction queries attributes in SMARTS format', () => { await clickInTheMiddleOfTheScreen(page); await moveMouseAway(page); await selectAtomInToolbar(AtomButton.Carbon, page); - await page.mouse.click(x + shiftValue, y); + await clickOnCanvas(page, x + shiftValue, y); await selectAllStructuresOnCanvas(page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); @@ -140,7 +140,7 @@ test.describe('Checking reaction queries attributes in SMARTS format', () => { await selectAtomInToolbar(AtomButton.Carbon, page); await clickInTheMiddleOfTheScreen(page); await selectAtomInToolbar(AtomButton.Fluorine, page); - await page.mouse.click(x + shiftValue, y); + await clickOnCanvas(page, x + shiftValue, y); await page.keyboard.press('Escape'); await selectDropdownTool(page, 'reaction-map', 'reaction-map'); diff --git a/ketcher-autotests/tests/Templates/Template-Manipulations/Manipulations-rings.spec.ts b/ketcher-autotests/tests/Templates/Template-Manipulations/Manipulations-rings.spec.ts index e19efbae94..542216a70d 100644 --- a/ketcher-autotests/tests/Templates/Template-Manipulations/Manipulations-rings.spec.ts +++ b/ketcher-autotests/tests/Templates/Template-Manipulations/Manipulations-rings.spec.ts @@ -10,6 +10,7 @@ import { } from '@utils/canvas/bonds'; import { clickInTheMiddleOfTheScreen, + clickOnCanvas, dragMouseTo, LeftPanelButton, moveMouseAway, @@ -34,26 +35,27 @@ async function placeTwoRingsMergedByAtom(type: RingButton, page: Page) { // Attaching Second Ring By Atom await selectButtonByTitle(type, page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); } async function mergeRingByBond(type: RingButton, page: Page) { await selectButtonByTitle(type, page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 5); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); } async function mergeDistantRingByABond(type: RingButton, page: Page) { await selectButtonByTitle(type, page); let point = await getAtomByIndex(page, { label: 'C' }, 2); const selectionRange = point.x / 4; - await page.mouse.click( + await clickOnCanvas( + page, selectionRange + selectionRange, selectionRange + selectionRange, ); point = await getLeftBondByAttributes(page, { reactingCenterStatus: 0 }); await selectTool(LeftPanelButton.RectangleSelection, page); - await page.mouse.click(point.x + selectionRange, point.y + selectionRange); + await clickOnCanvas(page, point.x + selectionRange, point.y + selectionRange); await dragMouseTo(point.x - selectionRange, point.y - selectionRange, page); await page.mouse.move(point.x - 1, point.y - 1); @@ -67,7 +69,7 @@ async function deleteRightBondInRing(page: Page) { }); await moveMouseAway(page); await page.keyboard.press('Escape'); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.keyboard.press('Delete'); } diff --git a/ketcher-autotests/tests/User-Interface/Preview-For-Abbreviated-Structures/preview-for-abbreviated-structures.spec.ts b/ketcher-autotests/tests/User-Interface/Preview-For-Abbreviated-Structures/preview-for-abbreviated-structures.spec.ts index 6ca648c33e..ac60c308ec 100644 --- a/ketcher-autotests/tests/User-Interface/Preview-For-Abbreviated-Structures/preview-for-abbreviated-structures.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Preview-For-Abbreviated-Structures/preview-for-abbreviated-structures.spec.ts @@ -9,6 +9,7 @@ import { moveMouseToTheMiddleOfTheScreen, BondType, waitForPageInit, + clickOnCanvas, } from '@utils'; import { getRightAtomByAttributes } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -55,7 +56,7 @@ test.describe('Preview for abbreviated structures: functional groups', () => { await selectFunctionalGroup(page); const point = await getRightAtomByAttributes(page, { label: 'C' }); await page.mouse.move(point.x, point.y); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await moveMouseToTheMiddleOfTheScreen(page); await takeEditorScreenshot(page); }); @@ -67,7 +68,7 @@ test.describe('Preview for abbreviated structures: functional groups', () => { const point = await getRightAtomByAttributes(page, { label: 'C' }); await page.mouse.move(point.x, point.y); await takeEditorScreenshot(page); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/User-Interface/Right-Click-Menu/right-click.spec.ts b/ketcher-autotests/tests/User-Interface/Right-Click-Menu/right-click.spec.ts index 8c884fbcb3..24d790c5dd 100644 --- a/ketcher-autotests/tests/User-Interface/Right-Click-Menu/right-click.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Right-Click-Menu/right-click.spec.ts @@ -14,6 +14,7 @@ import { waitForRender, clickOnBond, clickOnAtom, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getBondByIndex } from '@utils/canvas/bonds'; @@ -30,7 +31,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); @@ -41,7 +42,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Query bonds').click(); await takeEditorScreenshot(page); }); @@ -53,7 +54,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit...').click(); await page.getByTestId('type-input-span').click(); await page.getByRole('option', { name: 'Double', exact: true }).click(); @@ -68,7 +69,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Double', { exact: true }).click(); await takeEditorScreenshot(page); }); @@ -80,7 +81,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Delete', { exact: true }).click(); await takeEditorScreenshot(page); }); @@ -118,14 +119,14 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); test('Check right-click property change for atoms', async ({ page }) => { await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Query properties').click(); await page.getByText('Ring bond count').click(); await takeEditorScreenshot(page); @@ -146,7 +147,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit...').click(); await page.getByLabel('Label').click(); await page.getByLabel('Label').fill('N'); @@ -166,7 +167,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain-with-stereo.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); @@ -179,7 +180,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain-with-stereo.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); @@ -193,7 +194,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain-with-stereo.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Enhanced stereochemistry...').click(); await page.getByLabel('Create new AND Group').check(); await pressButton(page, 'Apply'); @@ -220,7 +221,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain-with-stereo.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Enhanced stereochemistry...').click(); await page.getByLabel('Create new OR Group').check(); await pressButton(page, 'Apply'); @@ -246,7 +247,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain-with-stereo.ket', page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Delete').click(); await takeEditorScreenshot(page); }); @@ -262,12 +263,12 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain-with-stereo-and-atoms.ket', page); point = await getAtomByIndex(page, { label: 'N' }, 0); await page.keyboard.down('Shift'); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getAtomByIndex(page, { label: 'O' }, 0); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.keyboard.up('Shift'); point = await getAtomByIndex(page, { label: 'N' }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Delete').click(); await takeEditorScreenshot(page); }); @@ -282,8 +283,8 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain.ket', page); await selectAtomInToolbar(AtomButton.Oxygen, page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); - await page.mouse.click(canvasClickX, canvasClickY); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, canvasClickX, canvasClickY); await takeEditorScreenshot(page); }); @@ -297,7 +298,7 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain.ket', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); @@ -311,7 +312,7 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain.ket', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await takeEditorScreenshot(page); }); @@ -324,7 +325,7 @@ test.describe('Right-click menu', () => { */ await openFileAndAddToCanvas('KET/chain.ket', page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 0); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Attach S-Group...', { exact: true }).click(); await page.getByPlaceholder('Enter name').click(); await page.getByPlaceholder('Enter name').fill('A!@#$$$test'); @@ -343,15 +344,15 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain.ket', page); point = await getAtomByIndex(page, { label: 'C' }, 1); await page.keyboard.down('Shift'); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.keyboard.up('Shift'); point = await getAtomByIndex(page, { label: 'C' }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit...').click(); await page.getByLabel('Label').click(); await page.getByLabel('Label').fill('N'); @@ -368,15 +369,15 @@ test.describe('Right-click menu', () => { await openFileAndAddToCanvas('KET/chain.ket', page); point = await getBondByIndex(page, { type: BondType.SINGLE }, 1); await page.keyboard.down('Shift'); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getBondByIndex(page, { type: BondType.SINGLE }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); point = await getBondByIndex(page, { type: BondType.SINGLE }, 3); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await page.keyboard.up('Shift'); point = await getBondByIndex(page, { type: BondType.SINGLE }, 1); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Double', { exact: true }).click(); await takeEditorScreenshot(page); }); From 71e3f88c232cba0be3d8ad7009b538734fce0e33 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 11:57:48 +0500 Subject: [PATCH 13/19] Replacement of methods --- .../Sequence-Mode/sequence-mode-edit.spec.ts | 2 +- .../sequence-mode-replacement.spec.ts | 3 ++- .../sequence-mode-selection.spec.ts | 2 +- .../Snake-Mode/snake-bond-tool.spec.ts | 12 ++++++------ .../Rotation/rotation.spec.ts | 6 ++++-- .../SRU-Polymer/sru-polymer-tool.spec.ts | 9 +++++---- .../superatom-s-group-tool.spec.ts | 9 +++++---- .../Selection-Tool/select-all.spec.ts | 5 +++-- .../simple-objects-draw-ellipse.spec.ts | 9 +++++---- .../simple-objects-draw-line.spec.ts | 10 +++++----- .../simple-objects-draw-rectangle.spec.ts | 18 +++++++++--------- .../Select-Tools/select-bonds.spec.ts | 4 ++-- .../tests/utils/canvas/selectBond.ts | 7 ++++--- 13 files changed, 52 insertions(+), 44 deletions(-) diff --git a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts index d12da7096b..d76bb3c584 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-edit.spec.ts @@ -65,7 +65,7 @@ test.describe('Sequence edit mode', () => { */ const x = 100; const y = 100; - await page.mouse.click(x, y, { button: 'right' }); + await clickOnCanvas(page, x, y, { button: 'right' }); await takeEditorScreenshot(page); await page.getByTestId('start_new_sequence').click(); await enterSequence(page, 'acgtu'); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-replacement.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-replacement.spec.ts index f6806db04c..860ce3fc94 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-replacement.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-replacement.spec.ts @@ -23,6 +23,7 @@ import { saveToFile, copyToClipboardByKeyboard, pasteFromClipboardByKeyboard, + clickOnCanvas, } from '@utils'; import { @@ -812,7 +813,7 @@ async function selectAndReplaceSymbolInEditMode( await pressYesInConfirmYourActionDialog(page); } await moveMouseToTheMiddleOfTheScreen(page); - await page.mouse.click(400, 400); + await clickOnCanvas(page, 400, 400); } async function selectAndReplaceSymbolInEditModeWithError( diff --git a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts index 97c18329ff..b24f534501 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection.spec.ts @@ -88,7 +88,7 @@ test.describe('Sequence mode selection for edit mode', () => { await takeEditorScreenshot(page); const blankAreaAxis = { x: 200, y: 200 }; - await page.mouse.click(blankAreaAxis.x, blankAreaAxis.y); + await clickOnCanvas(page, blankAreaAxis.x, blankAreaAxis.y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts index 1a422cc50e..cc4715be31 100755 --- a/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Snake-Mode/snake-bond-tool.spec.ts @@ -647,7 +647,7 @@ test.describe('Snake Bond Tool', () => { await takeEditorScreenshot(page); await page.getByText('meE').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x1, y1); + await clickOnCanvas(page, x1, y1); await moveMouseAway(page); await takeEditorScreenshot(page); }); @@ -718,7 +718,7 @@ test.describe('Snake Bond Tool', () => { await takeEditorScreenshot(page); await page.getByText('meS').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await moveMouseAway(page); await takeEditorScreenshot(page); }); @@ -745,7 +745,7 @@ test.describe('Snake Bond Tool', () => { await takeEditorScreenshot(page); await page.getByText('DHis1B').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await takeEditorScreenshot(page); }); @@ -841,7 +841,7 @@ test.describe('Snake Bond Tool', () => { await selectAllStructuresOnCanvas(page); await page.getByText('DHis1B').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await takeEditorScreenshot(page); }); @@ -868,7 +868,7 @@ test.describe('Snake Bond Tool', () => { await selectPartOfMolecules(page); await page.getByText('DHis1B').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await takeEditorScreenshot(page); }); @@ -890,7 +890,7 @@ test.describe('Snake Bond Tool', () => { await selectPartOfMolecules(page); await page.getByText('DHis1B').locator('..').first().hover(); await dragMouseTo(x, y, page); - await page.mouse.click(x2, y2); + await clickOnCanvas(page, x2, y2); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/rotation.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/rotation.spec.ts index 51f07c0e3e..bcca15f53b 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/rotation.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/rotation.spec.ts @@ -1,5 +1,6 @@ import { expect, test } from '@playwright/test'; import { + clickOnCanvas, getCoordinatesOfTheMiddleOfTheScreen, openFileAndAddToCanvas, selectAllStructuresOnCanvas, @@ -47,7 +48,8 @@ test.describe('Rotation', () => { COORDINATES_TO_PERFORM_ROTATION.x, COORDINATES_TO_PERFORM_ROTATION.y, ); - await page.mouse.click( + await clickOnCanvas( + page, COORDINATES_TO_PERFORM_ROTATION.x, COORDINATES_TO_PERFORM_ROTATION.y, { button: 'right' }, @@ -337,7 +339,7 @@ test.describe('Rotation', () => { await addStructureAndSelect(page); const { x: rotationHandleX, y: rotationHandleY } = await getRotationHandleCoordinates(page); - await page.mouse.click(rotationHandleX, rotationHandleY); + await clickOnCanvas(page, rotationHandleX, rotationHandleY); const { x, y } = await getRotationHandleCoordinates(page); expect(x).toEqual(rotationHandleX); expect(y).toEqual(rotationHandleY); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/SRU-Polymer/sru-polymer-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/SRU-Polymer/sru-polymer-tool.spec.ts index f658d06c77..09ee3240b5 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/SRU-Polymer/sru-polymer-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/SRU-Polymer/sru-polymer-tool.spec.ts @@ -6,6 +6,7 @@ import { clickInTheMiddleOfTheScreen, clickOnAtom, clickOnBond, + clickOnCanvas, copyAndPaste, cutAndPaste, LeftPanelButton, @@ -137,7 +138,7 @@ test.describe('SRU Polymer tool', () => { await openFileAndAddToCanvas('Molfiles-V2000/sru-polymer.mol', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit S-Group...').click(); await selectRepeatPattern(page, SGroupRepeatPattern.HeadToHead); await takeEditorScreenshot(page); @@ -152,7 +153,7 @@ test.describe('SRU Polymer tool', () => { await openFileAndAddToCanvas('Molfiles-V2000/sru-polymer.mol', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit S-Group...').click(); await selectRepeatPattern(page, SGroupRepeatPattern.EitherUnknown); await takeEditorScreenshot(page); @@ -168,7 +169,7 @@ test.describe('SRU Polymer tool', () => { await openFileAndAddToCanvas('Molfiles-V2000/sru-polymer.mol', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); const point = await getBondByIndex(page, { type: BondType.SINGLE }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Edit S-Group...').click(); await page.getByLabel('Polymer label').fill(polymerLabel); await selectRepeatPattern(page, SGroupRepeatPattern.EitherUnknown); @@ -263,7 +264,7 @@ test.describe('SRU Polymer tool', () => { */ await openFileAndAddToCanvas('Molfiles-V2000/sru-polymer.mol', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Superatom-S-Group-Tool/superatom-s-group-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Superatom-S-Group-Tool/superatom-s-group-tool.spec.ts index 70a69e532d..4662d8e085 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Superatom-S-Group-Tool/superatom-s-group-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Superatom-S-Group-Tool/superatom-s-group-tool.spec.ts @@ -21,6 +21,7 @@ import { saveToFile, waitForPageInit, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getAtomByIndex } from '@utils/canvas/atoms'; import { getKet, getMolfile } from '@utils/formats'; @@ -57,13 +58,13 @@ async function contractExpandRemoveAbbreviation( superatomName: string, ) { point = await getAtomByIndex(page, { label: 'C' }, 3); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Contract Abbreviation').click(); await takeEditorScreenshot(page); await page.getByText(superatomName).click({ button: 'right' }); await page.getByText('Expand Abbreviation').click(); await takeEditorScreenshot(page); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); await page.getByText('Remove Abbreviation').click(); } @@ -117,7 +118,7 @@ test.describe('Superatom S-Group tool', () => { const CANVAS_CLICK_Y = 380; await openFileAndAddToCanvas('Molfiles-V2000/superatom.mol', page); await selectLeftPanelButton(LeftPanelButton.S_Group, page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await fillFieldByLabel(page, 'Name', 'Test@!#$%12345'); await pressButton(page, 'Apply'); await takeEditorScreenshot(page); @@ -214,7 +215,7 @@ test.describe('Superatom S-Group tool', () => { const CANVAS_CLICK_Y = 600; await openFileAndAddToCanvas('Molfiles-V2000/superatom.mol', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/select-all.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/select-all.spec.ts index efcca70428..29e7ec644c 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/select-all.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Selection-Tool/select-all.spec.ts @@ -1,5 +1,6 @@ import { test } from '@playwright/test'; import { + clickOnCanvas, copyAndPaste, cutAndPaste, dragMouseTo, @@ -44,7 +45,7 @@ test.describe('Select all', () => { await openFileAndAddToCanvas('Molfiles-V2000/three-structures.mol', page); await selectAllStructuresOnCanvas(page); await cutAndPaste(page); - await page.mouse.click(offset, offset); + await clickOnCanvas(page, offset, offset); await takeEditorScreenshot(page); }); @@ -58,7 +59,7 @@ test.describe('Select all', () => { await openFileAndAddToCanvas('Molfiles-V2000/three-structures.mol', page); await selectAllStructuresOnCanvas(page); await copyAndPaste(page); - await page.mouse.click(offset, offset); + await clickOnCanvas(page, offset, offset); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-ellipse.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-ellipse.spec.ts index a519926082..c377cb9376 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-ellipse.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-ellipse.spec.ts @@ -1,5 +1,6 @@ import { Page, test } from '@playwright/test'; import { + clickOnCanvas, LeftPanelButton, openFileAndAddToCanvas, waitForPageInit, @@ -48,15 +49,15 @@ async function separetingAndMovingEllipse(page: Page) { const point3 = { x: 840, y: 262 }; const point4 = { x: 509, y: 367 }; const point5 = { x: 464, y: 239 }; - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); await dragMouseTo(point3.x, point3.y, page); await takeEditorScreenshot(page); await clickInTheMiddleOfTheScreen(page); await selectDropdownTool(page, 'select-rectangle', 'select-lasso'); await createSomeStructure(page); - await page.mouse.click(point4.x, point4.y); + await clickOnCanvas(page, point4.x, point4.y); await page.mouse.down(); await dragMouseTo(point5.x, point5.y, page); } @@ -82,7 +83,7 @@ test.describe('Draw Ellipse', () => { await setupEllipse(page); await clickInTheMiddleOfTheScreen(page); await selectAllStructuresOnCanvas(page); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-line.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-line.spec.ts index 3e0176391a..3a8307f7c0 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-line.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-line.spec.ts @@ -1,5 +1,5 @@ import { Page, test } from '@playwright/test'; -import { openFileAndAddToCanvas, waitForPageInit } from '@utils'; +import { clickOnCanvas, openFileAndAddToCanvas, waitForPageInit } from '@utils'; import { selectAllStructuresOnCanvas, takeEditorScreenshot, @@ -41,15 +41,15 @@ async function separetingAndMovingLines(page: Page) { const point3 = { x: 267, y: 518 }; const point4 = { x: 534, y: 467 }; const point5 = { x: 588, y: 277 }; - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); await dragMouseTo(point3.x, point3.y, page); await takeEditorScreenshot(page); await clickInTheMiddleOfTheScreen(page); await selectDropdownTool(page, 'select-rectangle', 'select-lasso'); await selectLineWithSelectionTool(page); - await page.mouse.click(point4.x, point4.y); + await clickOnCanvas(page, point4.x, point4.y); await dragMouseTo(point5.x, point5.y, page); } @@ -94,7 +94,7 @@ test.describe('draw and highlight line', () => { const LineCoordinates = await setupLine(page); await clickInTheMiddleOfTheScreen(page); await page.mouse.move(LineCoordinates.x, LineCoordinates.y); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-rectangle.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-rectangle.spec.ts index 8759571b59..17d324ddce 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-rectangle.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Simple-Objects/simple-objects-draw-rectangle.spec.ts @@ -1,5 +1,5 @@ import { Page, test } from '@playwright/test'; -import { openFileAndAddToCanvas, waitForPageInit } from '@utils'; +import { clickOnCanvas, openFileAndAddToCanvas, waitForPageInit } from '@utils'; import { selectAllStructuresOnCanvas, takeEditorScreenshot, @@ -48,11 +48,11 @@ async function resizeRectangle(page: Page) { const point3 = { x: 880, y: 596 }; const point4 = { x: 881, y: 174 }; const point5 = { x: 584, y: 371 }; - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); await await dragMouseTo(point3.x, point3.y, page); - await page.mouse.click(point4.x, point4.y); + await clickOnCanvas(page, point4.x, point4.y); await await dragMouseTo(point5.x, point5.y, page); await clickInTheMiddleOfTheScreen(page); } @@ -64,15 +64,15 @@ async function separetingAndMovingRecatngles(page: Page) { const point3 = { x: 817, y: 471 }; const point4 = { x: 496, y: 280 }; const point5 = { x: 194, y: 167 }; - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); - await page.mouse.click(point2.x, point2.y); + await clickOnCanvas(page, point2.x, point2.y); await dragMouseTo(point3.x, point3.y, page); await takeEditorScreenshot(page); await clickInTheMiddleOfTheScreen(page); await selectDropdownTool(page, 'select-rectangle', 'select-lasso'); await createSomeStructure(page); - await page.mouse.click(point4.x, point4.y); + await clickOnCanvas(page, point4.x, point4.y); await page.mouse.down(); await dragMouseTo(point5.x, point5.y, page); } @@ -102,7 +102,7 @@ test.describe('Draw Rectangle', () => { await setupRectangle(page); await clickInTheMiddleOfTheScreen(page); await selectAllStructuresOnCanvas(page); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); await takeEditorScreenshot(page); }); @@ -117,7 +117,7 @@ test.describe('Draw Rectangle', () => { await selectAllStructuresOnCanvas(page); await resizeRectangle(page); await createSomeStructure(page); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); await dragMouseTo(point1.x, point1.y, page); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts b/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts index 4f1c955c6d..e58ea7cba0 100644 --- a/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Select-Tools/select-bonds.spec.ts @@ -31,8 +31,8 @@ test.describe('Bonds plus atoms selection ', () => { const atom1Point = await getAtomByIndex(page, {}, 0); const atom2Point = await getAtomByIndex(page, {}, 1); await page.keyboard.down('Shift'); - await page.mouse.click(atom1Point.x, atom1Point.y); - await page.mouse.click(atom2Point.x, atom2Point.y); + await clickOnCanvas(page, atom1Point.x, atom1Point.y); + await clickOnCanvas(page, atom2Point.x, atom2Point.y); await takeEditorScreenshot(page); }); } diff --git a/ketcher-autotests/tests/utils/canvas/selectBond.ts b/ketcher-autotests/tests/utils/canvas/selectBond.ts index 9e1ad5400a..d1e0c51b07 100644 --- a/ketcher-autotests/tests/utils/canvas/selectBond.ts +++ b/ketcher-autotests/tests/utils/canvas/selectBond.ts @@ -1,4 +1,5 @@ import { Page } from '@playwright/test'; +import { clickOnCanvas } from '@tests/utils'; export enum BondTypeName { Single = 'Single Bond', @@ -40,14 +41,14 @@ export async function selectBond(type: BondTypeName, page: Page) { // Move mouse to empty space await page.mouse.move(MOUSE_COORDS.x1, MOUSE_COORDS.y1); // Click on canvas to clear selection - await page.mouse.click(MOUSE_COORDS.x1, MOUSE_COORDS.y1); + await clickOnCanvas(page, MOUSE_COORDS.x1, MOUSE_COORDS.y1); // Click on Bond button - await page.mouse.click(MOUSE_COORDS.x2, MOUSE_COORDS.y2); + await clickOnCanvas(page, MOUSE_COORDS.x2, MOUSE_COORDS.y2); try { await page.click(targetSelector, { timeout: TIMEOUT_MS }); } catch (e) { - await page.mouse.click(MOUSE_COORDS.x2, MOUSE_COORDS.y2); + await clickOnCanvas(page, MOUSE_COORDS.x2, MOUSE_COORDS.y2); await page.click(targetSelector, { timeout: TIMEOUT_MS }); } } From 6deddb29ac7af84f29c930be190514ae0e4d4ce3 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 13:00:26 +0500 Subject: [PATCH 14/19] Replacement of methods --- .../tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts | 2 +- .../Actions-With-Structures/Rotation/utils.ts | 3 ++- .../SMARTS-attributes/Visual-check/visual-check.spec.ts | 5 ++--- .../Template-Manipulations/Template-manipulations.spec.ts | 3 ++- .../tests/Templates/User-Templates/user-templates.spec.ts | 8 +++----- .../Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts | 8 +++----- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts index 969508ed53..9ffd8a5962 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Zoom-Tool/zoom.spec.ts @@ -327,7 +327,7 @@ test.describe('Zoom Tool', () => { }); } await page.getByTestId('meD___N-Methyl-Aspartic acid').click(); - await page.mouse.click(x1, y1); + await clickOnCanvas(page, x1, y1); await connectMonomersWithBonds(page, ['Edc', 'meD']); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/utils.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/utils.ts index 220d7b301c..9894bec9fe 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/utils.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rotation/utils.ts @@ -3,6 +3,7 @@ import { getBondByIndex } from '@utils/canvas/bonds'; import { BondType, TopPanelButton, + clickOnCanvas, getControlModifier, openFileAndAddToCanvas, selectTopPanelButton, @@ -76,7 +77,7 @@ export async function selectPartOfStructure(page: Page, shift = 5) { } export async function resetSelection(page: Page) { - page.mouse.click(EMPTY_SPACE_X, EMPTY_SPACE_Y); + await clickOnCanvas(page, EMPTY_SPACE_X, EMPTY_SPACE_Y); } export async function addStructureAndSelect( diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Visual-check/visual-check.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Visual-check/visual-check.spec.ts index ceec922475..8669740d87 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Visual-check/visual-check.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Visual-check/visual-check.spec.ts @@ -2,6 +2,7 @@ import { Page, test, expect } from '@playwright/test'; import { BondTypeName, clickInTheMiddleOfTheScreen, + clickOnCanvas, doubleClickOnAtom, getAtomByIndex, pressButton, @@ -223,9 +224,7 @@ test.describe('Checking if atoms are displayed correctly', () => { await page.getByTestId('period-table').click(); await page.getByTestId('Ti-button').click(); await page.getByRole('button', { name: 'Add', exact: true }).click(); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y); - }); + await clickOnCanvas(page, point.x, point.y); await page.mouse.move(pixelsToMoveMouse, pixelsToMoveMouse); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts index 134383a363..558c8a2851 100644 --- a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts +++ b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts @@ -49,6 +49,7 @@ import { copyToClipboardByKeyboard, selectRingButton, selectAllStructuresOnCanvas, + clickOnCanvas, } from '@utils'; import { getRotationHandleCoordinates } from '@utils/clicks/selectButtonByTitle'; import { getMolfile, getRxn } from '@utils/formats'; @@ -507,7 +508,7 @@ test.describe('Template Manupulations', () => { const { x, y } = await getCoordinatesOfTheMiddleOfTheScreen(page); const nitrogenCoordinates = { x: x + X_DELTA_ONE, y }; await selectRing(RingButton.Benzene, page); - await page.mouse.click(nitrogenCoordinates.x, nitrogenCoordinates.y); + await clickOnCanvas(page, nitrogenCoordinates.x, nitrogenCoordinates.y); await takeEditorScreenshot(page); }); }); diff --git a/ketcher-autotests/tests/Templates/User-Templates/user-templates.spec.ts b/ketcher-autotests/tests/Templates/User-Templates/user-templates.spec.ts index 0f67830b21..e8a1d9cc1c 100644 --- a/ketcher-autotests/tests/Templates/User-Templates/user-templates.spec.ts +++ b/ketcher-autotests/tests/Templates/User-Templates/user-templates.spec.ts @@ -16,10 +16,10 @@ import { waitForPageInit, copyAndPaste, cutAndPaste, - waitForRender, drawBenzeneRing, clickOnAtom, getEditorScreenshot, + clickOnCanvas, } from '@utils'; const CANVAS_CLICK_X = 300; @@ -164,7 +164,7 @@ test.describe('Click User Templates on canvas', () => { */ await openFileAndAddToCanvas('Molfiles-V2000/templates.mol', page); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); @@ -175,9 +175,7 @@ test.describe('Click User Templates on canvas', () => { */ await openFileAndAddToCanvas('Molfiles-V2000/templates.mol', page); await cutAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); - }); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await takeEditorScreenshot(page); }); }); diff --git a/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts b/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts index e6860118ab..494c44c86a 100644 --- a/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts +++ b/ketcher-autotests/tests/User-Interface/Editing-Tools/Undo-Redo/undo-redo-actions.spec.ts @@ -596,7 +596,7 @@ test.describe('Undo/Redo Actions', () => { await page.getByLabel(AttachmentPoint.SECONDARY).check(); await pressButton(page, 'Apply'); await copyAndPaste(page); - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -613,9 +613,7 @@ test.describe('Undo/Redo Actions', () => { await page.getByLabel(AttachmentPoint.SECONDARY).check(); await pressButton(page, 'Apply'); await cutAndPaste(page); - await waitForRender(page, async () => { - await page.mouse.click(CANVAS_CLICK_X, CANVAS_CLICK_Y); - }); + await clickOnCanvas(page, CANVAS_CLICK_X, CANVAS_CLICK_Y); await screenshotBetweenUndoRedo(page); await takeEditorScreenshot(page); }); @@ -683,7 +681,7 @@ test.describe('Undo/Redo Actions', () => { await pressButton(page, 'Apply'); await selectLeftPanelButton(LeftPanelButton.Chain, page); const point = await getAtomByIndex(page, { label: 'C' }, 2); - await page.mouse.click(point.x, point.y); + await clickOnCanvas(page, point.x, point.y); const coordinatesWithShift = point.y + yDelta; await dragMouseTo(point.x, coordinatesWithShift, page); for (let i = 0; i < 2; i++) { From 4d69beca869a9ee56171e424717b04cd85b3895b Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 20:04:58 +0500 Subject: [PATCH 15/19] screenshot fix --- ...ond-between-two-chems-1-chromium-linux.png | Bin 4258 -> 3928 bytes ...ond-between-two-chems-2-chromium-linux.png | Bin 11225 -> 3928 bytes ...on-using-Shift-LClick-2-chromium-linux.png | Bin 9180 -> 8168 bytes ...with-another-monomers-1-chromium-linux.png | Bin 7245 -> 6489 bytes ...with-another-monomers-2-chromium-linux.png | Bin 19563 -> 20374 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts-snapshots/Create-bond-between-two-chems-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts-snapshots/Create-bond-between-two-chems-1-chromium-linux.png index a3514bfab4048307b6ffbbc0ea4c9077e2a6f16f..e3f64d16eed901b3afd542448b0aac059fb8bc28 100644 GIT binary patch delta 844 zcmV-S1GD_1A=n;}Fn2^nnQ@G zjb%XyLFpkXO$?Zez1X4!kM&gJrBHim)gCNmHBbskSkPJ#l@_r%DI#@AHVX?OY=oi0 zW;Y%RA?nwtb;AD1=X0Bxmxt%QeR=uK%;;b+7y$qP{?XW4F9iSq0PB&np#f3@lTZQe zY_N5$7l8lE>+_4>{MoPGU0EIO*bi(O`^NrHKl+J}4tFd7uz`#Y27|TU0p7p+fArJU zEn6S_(Dvbu{q2=&e_mc)dhEz>#{vKwh$qTyY=2u>J@}CiKKsbQ;f{U${2PB*TpI37 z0AOQrMw3wiCV!a?;LO~@nYo3v-U0x)y9j00wX^e!6ED5?>ipuX^NSNNy>@nfajiE3 z0PYt4!kTsMi$8z!#;Hedz8ro2mBCj&zor`j0Cx+a%-UO7Svh_B^xnODFI~EHy<}8w)^DSUrbGm-+brY<$vq9nY{1bPyYVx3wLsN0ASN{ z^n!I^&z?Qg)6)kI99Ujno|u@}wr$(LyYj}!ja%J*?CR?3sZ(G3+~J287B27K|KN$^ zkG=fzk3V(azN=TSKK$8-?!bKj0Go#=%B%}>b91w^vllL0IC0{{_U+rp$HzxTMvhMI z`tmP-cYo_;XZ~{epN?L<@XqDij2#;rd+xdK-?#7HUAuNqPfwpackaa>{P3+e-+Jn) zZyh`Kr8{;v0KjG-lvx)hCnpadKD=}1&Wjf>?%1*8=KC{;9vFT8mG=%{{N$banL`i! zuan2d#zsd+=jZ3opF2M_H8nFc^VO3lA3F4z(^#j!H|(1L05+A;!CEpMB)ue?RTJ&pfkqZRzQ!zjK>w9zXxa3yVv>I0yiDGf$M+05Xx^ zw~F4I+q!yVxHAEOjYTN4 zu^rpD_uFs(>5q$l9robS;~&3g*fRlujbwB%7_9XU006M=IHR)x3yTG_fD7&c7XA*= W7uk8}ZbJJ20000Ak@K delta 1239 zcmV;|1StF19-<+TFn)PY?Ma`#>(aI39ee$br~fp!f4nmR zfW^fbk zbMB^%S8v<)(Aj6L-nVbx#TQ-p2|Nb?aOm(xnFV3@?%g|g?%cI&*QQOIPB`I&rAwC% z27}9gSFZThFaP+#+aCGb%l~rp;=UJN{)n+tQ&V@}ea~5|&s?$M((EQ`yl{;L&|V88cli! z_z&Lu-*A_&T=DOJT6O=-+LJ$j*QIO!`)POFe*6B{_TP5f4?p6b>vueT-`sv590Y*F znK#NT0-4Ak+l@EfG{$KFz@f^A`2dmOC`b5aJ{Gs7M@;?Z)&1Yu@zi+7{`S?^mdw99 z-kAWv;v$q;+%~K}{RhuJ|L3{a$31ws@r$R7dnN#|m<&gw(WG|(0DuL@8L`nq0ck9m z^a8-AyJ9>sPT>kfQcK9Mx#mZ0DKxAc;JEKjz9j? zQ%@c5*cW&2e(t&FZoT!^@s0(6iStGo4i|5{@y3_WICJ&tv&KDm_~esMj(a8mOrA57 zF$gw)gTY|1`ph#Xy#fF%EJ7I=3Jp(ZQDatDZj@s8VX-+b-0#~gFaq_+cr2@uM_hr02mn@@J@(iaUwmnU%q_2GXY>B7>-7xN$&uB8s2*Atvm0$^OaX#8SmJW zmM{PA4L2Np^wHxT3jh-*lmP%BIHR*+2%ZHN{tk+NJoe`e(YgQt002ovPDHLkV1i$1 BlFtAD diff --git a/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts-snapshots/Create-bond-between-two-chems-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Polymer-Bond-Tool/polymer-bond-tool.spec.ts-snapshots/Create-bond-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;p9VliQ@4hoAiBRVlDqyt0Lg0CU%W8!m%ajvTUM)shwK8;f*-MyL(N^JcS%p(n}-I;0EDsz*NlKT3#Zy}}54XbFFM z2Z($;BLj*8{rQ+sXNmthzQ=|5H7`u(Z)vx+Zbu+*->W)R9UYx^O|lQhVu2M?gLTAE zb+*rW1@Sh4K0{1QtUNN{64M{}rV@SbVL}4EGYp?0a8LjOgy1t_eFP4KZjniW`+&>i z5XC?V4w`-_hI_ynwA*-jhl}9CU>viTNwiKg^s8@nn~D!DBL-vFUJ>=fTpuoJrkLjl zvFdtb#akg@*O_8ZcaZ3d$80gyDkeq~S40bK1{_jg^mqysZ^A^W^?M3Le%E0#}9k z7JaW_%JF~G_C<}Je5UDe3mzuNxp{(dN>YkFL+gHe`%azARsP@byavO6Y3)C!m&rgEfw!OANcOUHbUc4S9ZBeT- z*MT|iK+v8HVp@&i7F2R;Cy)0V8o@pJH8EpXMiqO{(YpUuhGJ8r$cz*ygGh=u;Wpe0 z0u0Xum>{vXt=UgOm&If4)iIu`Ri3IYTS$%fAX>u<<4o@gVXCRim(v*hwvOtr;5nFL zPAcz$b_YKxa2;L1uxSZ;0mPk%3bpLL4 zCvpKqwMZj?2P|s}E4l#UpySutb4UM0HuNxd#BoParW^kCM5f)VsnVPwsisDUc7tSe z17jViOHczDK!`jl?iS9r*$|{18P?lgN{m|&QB(yn)*UYx$pHOUQBqojzIp~v6fOfc ziQyg|KKv>tH%E*J0e4g-U0=Tw|9%;QL^Hqvl0?++6OU~$j4VVy*}goPK^r3iGdI@h zQ+bdWG60}d=Q^Agt%CK#po?EU3pjLt|I80xeRIJ#L2%3ol3Eo32U=sbO6qEI3h)02$M9>bx-*4Y3&-_3>mtrnd{U2XLa+49o lOR0HD|1aJ>eal(#(RJ;ycVVBL@O~^wTT}P<4E6JW{vQnKh0_24 diff --git a/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts-snapshots/Rectangle-Selection-Tool-Group-selection-using-Shift-LClick-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts-snapshots/Rectangle-Selection-Tool-Group-selection-using-Shift-LClick-2-chromium-linux.png index 37bc0f8b6bed9ee1d6169cd25ec08d2475aade52..d90e636e6629af0d467dac7f3ba523078e244fd5 100644 GIT binary patch literal 8168 zcmeI1XIN8Nx5p1=1Z2Rj7*NrnWkf+~5fF%=B0Zz1AR-QuLAnSSdcsH`G3K#;_1{VSKvypk4%ETe9% zRgZitsq{q*Vceb5cIy}k3hh!WKNfWA^W|hUr1A9|>PAmmAJm85j1M(4uGbgFnK+Oh zetBiqYL;Sm2A4z94K}c6om4q^tUe;6^8xDlm4*X_>A|PYRVu9F7>H|WoHpelN9%58 zs_7)v7q>XPrFm@5Qp1s_aR+tyAOwy0iNxFo=H*0V`5_|luaCcc@P85qAAWn-7{S|_ zroCG|3Q-cV{Kt%`Sg)D%xVx5_cYF>&bYm3apiU;V>8}{;>NRx>L>xA9`zN}MJ;m4PUSzj*>4rxa339YQ8 zZBLMAoWH}c1#!gQLMGE!LtRE|I;Gk-a&0}M@BoC9rtsMe;1_0*$6jqFr33~Ru$ajW z*C0v^mS1pwZgy*w%dt1!{^-tFn42|l6oV#DQ}}j`YaPsYLhzwfsKV#lTM+^c{!)X% zm%94AdEYC%)i^{X9i&5&Lly~2L#(9@JxK8?3XwFO=(|yK8%42Mb_~`z)A$I&p435( zyz3DPu9P5Dd92We+J1U1Byh?TZY`Maztzr;c!Bu5pDMf*`zH90$W%hWYR@~14@-f0 zmfNg~Iq;>Bs^)$i&u-!ulA%oBVl30Qqk9^clp!}=V3PUC4+TTdCTG2)1`vv&Df z_aEyE;&EsDN}LCn1FqKUzE3Swcc&c({&J~v)-YY)&>rfG zmufQCVJqFSD)DPgdhRTQQ3IYVV%4xJV*LVMD%7}hwl-SgSF$IYwFj9sKHMEY-MUqM z@->2?p%yPZT)dx4eoGo*`x}VC8D>kO;e~aL9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)~-+!a=hb;i{U zaIX1R%*JX__EO+gOD0g;YFzS7&Ow}@<@E7_tW3a8l34+|hcOL>baF(rMnXl195%NH zN8}{4dvD(8IKZW5)l6OJD`O5Jo+CovsYAP~poMlc+N_+gjTBS8L0#mwR?4!fwkK+~ z2KrGqd&(XdErX88Rgm42^z{sHz165G!uJ@%il0J=cjnydQ!N=)-})C8E_PQt2=65R zvu{xYhCKbNV+|Jc|34jUN%C9-_);Je{ubcxj{D!=8T|cq#sBTcCv^0lNPOX>Qjit+ Q76!Vbp{HK1X8qg00|6)v{r~^~ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts-snapshots/Rectangle-Selection-Tool-Move-monomer-bonded-with-another-monomers-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Rectangle-Selection-Tool/rectangle-selection-tool.spec.ts-snapshots/Rectangle-Selection-Tool-Move-monomer-bonded-with-another-monomers-1-chromium-linux.png index 17912a1e53069ac89e8a5c37a20a6ca8c982a10a..71c7ac2e5fb2db8198c98f0edee13c7aca3fc12b 100644 GIT binary patch literal 6489 zcmeHMc{tST+y9QqoJdN`uSSVFsVNDgvSgW*B}?WYvc+2_gk&8{7)8BKO;kgcu}n(D zm}5`bPTGv3m`E5R`#NM9V|nlCocH&~`@Yxp{_*?s7uPj&&Es=_p8LL^`~KX|cf=4+ z8LkzV7Do_d?Mb5(76^iViXbA%t3_ZX#pql#yrKLo4E2!whV4TLg57xX#4)QN`dFva zE$f-28Xop~0sdCz;MWSP2bE%s4NFh16{M-FXyfW3gPmHZ?0x6F7Qi3$1~{7yFv z_>sEl17VA=ZhD_>q`T)^?KeY^8bh`|GE-J z<^(GtIU1p}qq(f*CzX|9ydM4F2@C()+FDlCLhkfHBkOFKUubA3cLX6w@ePt*f9&YU z<3Bk>GOkZPtnD|@kZZL+ctQjbm8ZFHS5#EAIU7vk+S6*|Z2}jk?z0?x^aUN|e$!l0 zMBErx>++qgz)I6`)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From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 20:15:09 +0500 Subject: [PATCH 16/19] 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 */ From 9fe789d49db3a78050332b1c66611502b6f9378e Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 20:28:34 +0500 Subject: [PATCH 17/19] Replacement of methods --- .../rectangle-tool.spec.ts | 2 +- .../reaction-queries-attributes.spec.ts | 2 +- .../tests/utils/canvas/bonds/example.spec.ts | 22 ++++++------- .../tests/utils/canvas/tools/helpers.ts | 2 +- ketcher-autotests/tests/utils/clicks/index.ts | 31 ++++++------------- .../tests/utils/macromolecules/polymerBond.ts | 5 +-- .../tests/utils/selectors/templateModal.ts | 13 ++++---- 7 files changed, 34 insertions(+), 43 deletions(-) diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts index fd711c3702..fc5f2fd67f 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Rectangle selection/rectangle-tool.spec.ts @@ -38,7 +38,7 @@ test.describe('Rectangle selection tool', () => { const selectionCoords = { x: 300, y: 200 }; async function clickCanvas(page: Page) { - await page.mouse.click(selectionCoords.x, selectionCoords.y); + await clickOnCanvas(page, selectionCoords.x, selectionCoords.y); } test('Structure selection with rectangle selection tool', async ({ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts index 8d39256b57..58b2aa93aa 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Reaction-queries-attributes/reaction-queries-attributes.spec.ts @@ -49,7 +49,7 @@ async function drawStructureWithArrowOpenAngle(page: Page) { await resetCurrentTool(page); await page.mouse.move(x, y + shiftForCoordinatesToResetArrowOpenAngleTool); - await page.mouse.click; + await clickOnCanvas; await selectAtomInToolbar(AtomButton.Oxygen, page); await clickOnCanvas(page, x + shiftForOxygen, y, { diff --git a/ketcher-autotests/tests/utils/canvas/bonds/example.spec.ts b/ketcher-autotests/tests/utils/canvas/bonds/example.spec.ts index e6641d3ec9..07ab4221da 100644 --- a/ketcher-autotests/tests/utils/canvas/bonds/example.spec.ts +++ b/ketcher-autotests/tests/utils/canvas/bonds/example.spec.ts @@ -1,6 +1,6 @@ export {}; // import { test } from '@playwright/test'; -// import { drawElementByTitle, waitForPageInit } from '@utils'; +// import { drawElementByTitle, waitForPageInit, clickOnCanvas, } from '@utils'; // import { // getRightBondByAttributes, // getBottomBondByAttributes, @@ -32,7 +32,7 @@ export {}; // { type: BondType.HYDROGEN }, // searchedIndex, // ); -// await page.mouse.click(bondByIndex.x, bondByIndex.y); +// await clickOnCanvas(page, bondByIndex.x, bondByIndex.y); // const leftBond = await getLeftBondByAttributes(page, { // topology: 1, @@ -40,19 +40,19 @@ export {}; // sb: 2, // reactingCenterStatus: 2, // }); -// await page.mouse.click(leftBond.x, leftBond.y); +// await clickOnCanvas(page, leftBond.x, leftBond.y); // const rBond = await getRightBondByAttributes(page, { // stereo: 2, // type: BondType.DATIVE, // }); -// await page.mouse.click(rBond.x, rBond.y); +// await clickOnCanvas(page, rBond.x, rBond.y); // const bottomBond = await getBottomBondByAttributes(page, { sa: 1 }); -// await page.mouse.click(bottomBond.x, bottomBond.y); +// await clickOnCanvas(page, bottomBond.x, bottomBond.y); // const topBond = await getTopBondByAttributes(page, { type: BondType.DOUBLE }); -// await page.mouse.click(topBond.x, topBond.y); +// await clickOnCanvas(page, topBond.x, topBond.y); // }); // test(`ATOM`, async ({ page }) => { @@ -60,26 +60,26 @@ export {}; // await drawElementByTitle(page, ELEMENT_TITLE.BENZENE, OFFSET_X, OFFSET_Y); // const firstAtom = await getAtomByIndex(page, { label: 'C', valence: 1 }, 0); -// await page.mouse.click(firstAtom.x, firstAtom.y); +// await clickOnCanvas(page, firstAtom.x, firstAtom.y); // const leftAtom = await getLeftAtomByAttributes(page, { // stereoParity: 1, // }); -// await page.mouse.click(leftAtom.x, leftAtom.y); +// await clickOnCanvas(page, leftAtom.x, leftAtom.y); // const rightAtom = await getRightAtomByAttributes(page, { // exactChangeFlag: 2, // hCount: 1, // charge: 2, // }); -// await page.mouse.click(rightAtom.x, rightAtom.y); +// await clickOnCanvas(page, rightAtom.x, rightAtom.y); // const bottomAtom = await getBottomAtomByAttributes(page, { charge: 1 }); -// await page.mouse.click(bottomAtom.x, bottomAtom.y); +// await clickOnCanvas(page, bottomAtom.x, bottomAtom.y); // const topAtom = await getTopAtomByAttributes(page, { // substitutionCount: 1, // valence: 3, // }); -// await page.mouse.click(topAtom.x, topAtom.y); +// await clickOnCanvas(page, topAtom.x, topAtom.y); // }); diff --git a/ketcher-autotests/tests/utils/canvas/tools/helpers.ts b/ketcher-autotests/tests/utils/canvas/tools/helpers.ts index 4ecd4536f9..faf577697a 100644 --- a/ketcher-autotests/tests/utils/canvas/tools/helpers.ts +++ b/ketcher-autotests/tests/utils/canvas/tools/helpers.ts @@ -196,7 +196,7 @@ export async function selectClearCanvasTool(page: Page, maxAttempts = 10) { return; } catch (error) { attempts++; - await page.mouse.click(0, 0); + await clickOnCanvas(page, 0, 0); await page.keyboard.press('Escape'); if (await closeWindowXButton.isVisible()) { await closeWindowXButton.click(); diff --git a/ketcher-autotests/tests/utils/clicks/index.ts b/ketcher-autotests/tests/utils/clicks/index.ts index 529df0113c..a66f04d391 100644 --- a/ketcher-autotests/tests/utils/clicks/index.ts +++ b/ketcher-autotests/tests/utils/clicks/index.ts @@ -77,7 +77,7 @@ export async function clickOnCanvas( }, ) { await waitForRender(page, async () => { - await page.mouse.click(x, y, options); + await clickOnCanvas(page, x, y, options); }); } @@ -143,7 +143,8 @@ export async function clickOnTheCanvas( page, ); await waitForRender(page, async () => { - await page.mouse.click( + await clickOnCanvas( + page, secondStructureCoordinates.x + xOffsetFromCenter, secondStructureCoordinates.y + yOffsetFromCenter, ); @@ -152,9 +153,7 @@ export async function clickOnTheCanvas( export async function clickOnMiddleOfCanvas(page: Page) { const middleOfCanvas = await getCoordinatesOfTheMiddleOfTheCanvas(page); - await waitForRender(page, async () => { - await page.mouse.click(middleOfCanvas.x, middleOfCanvas.y); - }); + await clickOnCanvas(page, middleOfCanvas.x, middleOfCanvas.y); } export async function clickByLink(page: Page, url: string) { @@ -168,9 +167,7 @@ export async function clickOnBond( buttonSelect?: 'left' | 'right' | 'middle', ) { const point = await getBondByIndex(page, { type: bondType }, bondNumber); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y, { button: buttonSelect }); - }); + await clickOnCanvas(page, point.x, point.y, { button: buttonSelect }); } export async function clickOnBondById( @@ -179,9 +176,7 @@ export async function clickOnBondById( buttonSelect?: 'left' | 'right' | 'middle', ) { const point = await getBondById(page, bondId); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y, { button: buttonSelect }); - }); + await clickOnCanvas(page, point.x, point.y, { button: buttonSelect }); } export async function clickOnAtom( @@ -191,9 +186,7 @@ export async function clickOnAtom( buttonSelect?: 'left' | 'right' | 'middle', ) { const point = await getAtomByIndex(page, { label: atomLabel }, atomNumber); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y, { button: buttonSelect }); - }); + await clickOnCanvas(page, point.x, point.y, { button: buttonSelect }); } export async function clickOnAtomById( @@ -202,9 +195,7 @@ export async function clickOnAtomById( buttonSelect?: 'left' | 'right' | 'middle', ) { const point = await getAtomById(page, atomId); - await waitForRender(page, async () => { - await page.mouse.click(point.x, point.y, { button: buttonSelect }); - }); + await clickOnCanvas(page, point.x, point.y, { button: buttonSelect }); } export async function doubleClickOnAtom( @@ -213,9 +204,7 @@ export async function doubleClickOnAtom( atomNumber: number, ) { const point = await getAtomByIndex(page, { label: atomLabel }, atomNumber); - await waitForRender(page, async () => { - await page.mouse.dblclick(point.x, point.y); - }); + await clickOnCanvas(page, point.x, point.y); } export async function doubleClickOnBond( @@ -235,7 +224,7 @@ export async function rightClickOnBond( bondNumber: number, ) { const point = await getBondByIndex(page, { type: bondType }, bondNumber); - await page.mouse.click(point.x, point.y, { button: 'right' }); + await clickOnCanvas(page, point.x, point.y, { button: 'right' }); } export async function moveOnAtom( diff --git a/ketcher-autotests/tests/utils/macromolecules/polymerBond.ts b/ketcher-autotests/tests/utils/macromolecules/polymerBond.ts index 167998a98b..a002f92de6 100644 --- a/ketcher-autotests/tests/utils/macromolecules/polymerBond.ts +++ b/ketcher-autotests/tests/utils/macromolecules/polymerBond.ts @@ -1,7 +1,7 @@ /* eslint-disable no-magic-numbers */ import { Locator, Page } from '@playwright/test'; import { hideMonomerPreview } from '@utils/macromolecules/index'; -import { moveMouseAway, selectMacroBond } from '..'; +import { clickOnCanvas, moveMouseAway, selectMacroBond } from '..'; import { DropdownToolIds } from '@utils/clicks/types'; import { MacroBondTool } from '@utils/canvas/tools/selectNestedTool/types'; @@ -279,7 +279,8 @@ export async function clickOnMicroBondByIndex(page: Page, bondIndex: number) { // Simple click on element doesn't work always because only black pixels of bond are clickable (what? YES!) // So, bonds with empty space in the center (for example - double bond) are not clickable if (boundingBox) { - await page.mouse.click( + await clickOnCanvas( + page, boundingBox.x + boundingBox.width / 2 + 2, boundingBox.y + boundingBox.height / 2 + 2, ); diff --git a/ketcher-autotests/tests/utils/selectors/templateModal.ts b/ketcher-autotests/tests/utils/selectors/templateModal.ts index 13197da092..3fa8a45cdd 100644 --- a/ketcher-autotests/tests/utils/selectors/templateModal.ts +++ b/ketcher-autotests/tests/utils/selectors/templateModal.ts @@ -9,6 +9,7 @@ import { takeEditorScreenshot, STRUCTURE_LIBRARY_BUTTON_NAME, pressButton, + clickOnCanvas, } from '@utils'; import { ElementLabel } from 'ketcher-core'; @@ -333,12 +334,12 @@ const COORDS_CLICK = { Function for attaching structures on top of bonds attached on Benzene ring */ export async function attachOnTopOfBenzeneBonds(page: Page) { - await page.mouse.click(COORDS_CLICK.x1, COORDS_CLICK.y1); - await page.mouse.click(COORDS_CLICK.x2, COORDS_CLICK.y2); - await page.mouse.click(COORDS_CLICK.x3, COORDS_CLICK.y3); - await page.mouse.click(COORDS_CLICK.x4, COORDS_CLICK.y4); - await page.mouse.click(COORDS_CLICK.x5, COORDS_CLICK.y5); - await page.mouse.click(COORDS_CLICK.x6, COORDS_CLICK.y6); + await clickOnCanvas(page, COORDS_CLICK.x2, COORDS_CLICK.y2); + await clickOnCanvas(page, COORDS_CLICK.x3, COORDS_CLICK.y3); + await clickOnCanvas(page, COORDS_CLICK.x1, COORDS_CLICK.y1); + await clickOnCanvas(page, COORDS_CLICK.x4, COORDS_CLICK.y4); + await clickOnCanvas(page, COORDS_CLICK.x5, COORDS_CLICK.y5); + await clickOnCanvas(page, COORDS_CLICK.x6, COORDS_CLICK.y6); } export async function fillFieldByLabel( From c5dcc2bb8fb3d9f206175e3bb8222197729a38b8 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Mon, 25 Nov 2024 20:36:44 +0500 Subject: [PATCH 18/19] fix --- ketcher-autotests/tests/utils/clicks/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ketcher-autotests/tests/utils/clicks/index.ts b/ketcher-autotests/tests/utils/clicks/index.ts index a66f04d391..4045df715a 100644 --- a/ketcher-autotests/tests/utils/clicks/index.ts +++ b/ketcher-autotests/tests/utils/clicks/index.ts @@ -77,7 +77,7 @@ export async function clickOnCanvas( }, ) { await waitForRender(page, async () => { - await clickOnCanvas(page, x, y, options); + await page.mouse.click(x, y, options); }); } From a0cd55afd86ca6b2f156be05ab7b220dae3436a6 Mon Sep 17 00:00:00 2001 From: Konstantin_Nadonenko Date: Tue, 26 Nov 2024 10:49:54 +0500 Subject: [PATCH 19/19] fix --- ketcher-autotests/tests/utils/clicks/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ketcher-autotests/tests/utils/clicks/index.ts b/ketcher-autotests/tests/utils/clicks/index.ts index 4045df715a..326de2c1dc 100644 --- a/ketcher-autotests/tests/utils/clicks/index.ts +++ b/ketcher-autotests/tests/utils/clicks/index.ts @@ -204,7 +204,9 @@ export async function doubleClickOnAtom( atomNumber: number, ) { const point = await getAtomByIndex(page, { label: atomLabel }, atomNumber); - await clickOnCanvas(page, point.x, point.y); + await waitForRender(page, async () => { + await page.mouse.dblclick(point.x, point.y); + }); } export async function doubleClickOnBond(