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 a230edb850..bb4fd29093 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 @@ -43,6 +43,9 @@ import { TopPanelButton, waitForPageInit, waitForRender, + selectZoomOutTool, + selectZoomReset, + selectZoomInTool, } from '@utils'; import { closeErrorAndInfoModals } from '@utils/common/helpers'; import { @@ -561,26 +564,13 @@ test.describe('Multi-Tailed Arrow Tool', () => { page, ); await takeEditorScreenshot(page); - await page.getByTestId('zoom-input').click(); - for (let i = 0; i < 8; i++) { - await waitForRender(page, async () => { - await page.getByTestId('zoom-out').click(); - }); - } + await selectZoomOutTool(page, 8); await clickInTheMiddleOfTheScreen(page); await takeEditorScreenshot(page); - await page.getByTestId('zoom-input').click(); - for (let i = 0; i < 19; i++) { - await waitForRender(page, async () => { - await page.getByTestId('zoom-in').click(); - }); - } + await selectZoomInTool(page, 19); await clickInTheMiddleOfTheScreen(page); await takeEditorScreenshot(page); - await page.getByTestId('zoom-input').click(); - await waitForRender(page, async () => { - await page.getByTestId('zoom-default').click(); - }); + await selectZoomReset(page); await clickInTheMiddleOfTheScreen(page); 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 13c77535d7..b5dba02318 100644 --- a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts +++ b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts @@ -51,6 +51,7 @@ import { selectAllStructuresOnCanvas, clickOnCanvas, selectUndoByKeyboard, + selectZoomOutTool, } from '@utils'; import { getRotationHandleCoordinates } from '@utils/clicks/selectButtonByTitle'; import { getMolfile, getRxn } from '@utils/formats'; @@ -337,8 +338,7 @@ test.describe('Template Manupulations', () => { Click the Zoom In button several times. Click the Zoom Out button several times. */ - await page.getByTestId('zoom-input').click(); - await page.getByTestId('zoom-out').click(); + await selectZoomOutTool(page); await clickInTheMiddleOfTheScreen(page); await drawBenzeneRing(page); await page.getByTestId('reaction-plus').click(); diff --git a/package-lock.json b/package-lock.json index d1b86aab59..5702f00108 100644 --- a/package-lock.json +++ b/package-lock.json @@ -599,6 +599,7 @@ }, "example-separate-editors": { "version": "1.0.0", + "extraneous": true, "dependencies": { "ketcher-core": "*", "ketcher-macromolecules": "*", @@ -13565,10 +13566,6 @@ "node": ">=0.8.x" } }, - "node_modules/example-separate-editors": { - "resolved": "example-separate-editors", - "link": true - }, "node_modules/example-ssr": { "resolved": "example-ssr", "link": true diff --git a/packages/ketcher-react/src/script/ui/views/toolbars/TopToolbar/ZoomControls.tsx b/packages/ketcher-react/src/script/ui/views/toolbars/TopToolbar/ZoomControls.tsx index 86d4589a1b..5935c21c42 100644 --- a/packages/ketcher-react/src/script/ui/views/toolbars/TopToolbar/ZoomControls.tsx +++ b/packages/ketcher-react/src/script/ui/views/toolbars/TopToolbar/ZoomControls.tsx @@ -161,7 +161,7 @@ export const ZoomControls = ({ return ( - + {Math.round(currentZoom)}%