epam/ketcher

Autotests: Replace ZoomIn/ZoomOut/ZoomReset operations with valid helper functions

Closed this issue · 0 comments

  1. Identify all ZoomIn/ZoomOut/ZoomReset operations made by keyboard Control+-, Control+= and Control+0 and by using methods
    selectTopPanelButton(MacromoleculesTopPanelButton.ZoomIn, page);,
    selectTool(MacromoleculesTopPanelButton.ZoomIn, page);,
    selectTopPanelButton(MacromoleculesTopPanelButton.ZoomOut, page);
    selectTool(MacromoleculesTopPanelButton.ZoomOut, page);,
    selectTopPanelButton(MacromoleculesTopPanelButton.ZoomReset, page);
    and selectTool(MacromoleculesTopPanelButton.ZoomReset, page);,
await page.getByTestId('zoom-selector').click();
await page.getByTestId('reset-zoom-button').click();'

or similar
and replace them with proper helper function (create them if they doesn't exists)

Recommendation: Try to search "page.keyboard.press(" in code
That could be page.keyboard.press('Control+-');, await page.keyboard.press('Control+Minus');
or page.keyboard.press('${modifier}+Minus'); or similar