Skip to content

Commit

Permalink
#3667 – fixed CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitvex committed Dec 28, 2023
1 parent f99cfe9 commit 2f9697c
Show file tree
Hide file tree
Showing 28 changed files with 235 additions and 363 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ const topLeftCorner = {
y: -235,
};

async function zoomWithMouseWheel(
page: Page,
numberOfMouseWheelScroll: number,
randomMouseWheelScroll: number,
) {
async function zoomWithMouseWheel(page: Page, scrollValue: number) {
await page.keyboard.down('Control');
for (let i = 0; i < numberOfMouseWheelScroll; i++) {
await page.mouse.wheel(0, randomMouseWheelScroll);
}
await page.mouse.wheel(0, scrollValue);
await page.keyboard.up('Control');
}

Expand Down Expand Up @@ -269,13 +263,14 @@ test.describe('Macro-Micro-Switcher', () => {
page,
);
await turnOnMicromoleculesEditor(page);
await turnOnMacromoleculesEditor(page);
// eslint-disable-next-line no-magic-numbers
await zoomWithMouseWheel(page, 5, -80);
await zoomWithMouseWheel(page, -400);

await takeEditorScreenshot(page);

// eslint-disable-next-line no-magic-numbers
await zoomWithMouseWheel(page, 5, 50);
await zoomWithMouseWheel(page, 250);

await takeEditorScreenshot(page);
await page.getByTestId('reset-zoom-button').click();
Expand Down Expand Up @@ -303,7 +298,7 @@ test.describe('Macro-Micro-Switcher', () => {
await takeEditorScreenshot(page);

// eslint-disable-next-line no-magic-numbers
await zoomWithMouseWheel(page, 5, 50);
await zoomWithMouseWheel(page, 250);

await turnOnMacromoleculesEditor(page);
await takeEditorScreenshot(page);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2f9697c

Please sign in to comment.