Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotests: #6268 - ZoomIn/ZoomOut/ZoomReset operations have been replaced with the valid… #6307

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import {
TopPanelButton,
waitForPageInit,
waitForRender,
selectZoomOutTool,
selectZoomReset,
selectZoomInTool,
} from '@utils';
import { closeErrorAndInfoModals } from '@utils/common/helpers';
import {
Expand Down Expand Up @@ -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);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
selectAllStructuresOnCanvas,
clickOnCanvas,
selectUndoByKeyboard,
selectZoomOutTool,
} from '@utils';
import { getRotationHandleCoordinates } from '@utils/clicks/selectButtonByTitle';
import { getMolfile, getRxn } from '@utils/formats';
Expand Down Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const ZoomControls = ({

return (
<ElementAndDropdown ref={containerRef}>
<DropDownButton onClick={onExpand}>
<DropDownButton onClick={onExpand} data-testid="zoom-selector">
<ZoomLabel data-testid="zoom-input">
{Math.round(currentZoom)}%
</ZoomLabel>
Expand Down
Loading