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 18, 2023
1 parent 7c1d908 commit 71e999e
Show file tree
Hide file tree
Showing 38 changed files with 1,393 additions and 1,341 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ the first one disappears. Couldn't reproduct manually.

// add second structure from file to canvas
await selectTopPanelButton(TopPanelButton.Open, page);
await openFile('glutamine.mol', page);
await openFile('Molfiles-V2000/glutamine.mol', page);
await waitForLoad(page, async () => {
await pressButton(page, 'Add to Canvas');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const COORDINATES_TO_PERFORM_ROTATION = {
y: 100,
};

const topLeftCorner = {
x: -425,
y: -235,
};

async function zoomWithMouseWheel(
page: Page,
numberOfMouseWheelScroll: number,
Expand Down Expand Up @@ -111,7 +116,12 @@ test.describe('Macro-Micro-Switcher', () => {
Description: Micromolecules in macromode represented as CHEMs with generated name(F1, F2, ...Fn)
*/
await turnOnMicromoleculesEditor(page);
await openFileAndAddToCanvas('KET/eight-micromolecules.ket', page);
await openFileAndAddToCanvas(
'KET/eight-micromolecules.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await takeEditorScreenshot(page);
});
Expand Down Expand Up @@ -298,7 +308,6 @@ test.describe('Macro-Micro-Switcher', () => {
page,
);
await turnOnMicromoleculesEditor(page);
await turnOnMacromoleculesEditor(page);
// eslint-disable-next-line no-magic-numbers
await zoomWithMouseWheel(page, 5, -80);

Expand Down Expand Up @@ -441,7 +450,12 @@ test.describe('Macro-Micro-Switcher', () => {
Test case: Macro-Micro-Switcher
Description: Structure exists on the canvas with changes by Charge Plus (+) Tool and Charge Plus (-).
*/
await openFileAndAddToCanvas('KET/two-benzene-charged.ket', page);
await openFileAndAddToCanvas(
'KET/two-benzene-charged.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await page.getByText('F2').locator('..').hover();
await takeEditorScreenshot(page);
Expand All @@ -454,7 +468,12 @@ test.describe('Macro-Micro-Switcher', () => {
Test case: Macro-Micro-Switcher
Description: Structure exists on the canvas without text.
*/
await openFileAndAddToCanvas('KET/benzene-rings-with-text.ket', page);
await openFileAndAddToCanvas(
'KET/benzene-rings-with-text.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await page.getByText('F1').locator('..').hover();
await takeEditorScreenshot(page);
Expand All @@ -467,7 +486,12 @@ test.describe('Macro-Micro-Switcher', () => {
Test case: Macro-Micro-Switcher
Description: Structure exists on the canvas without Shape Ellipse.
*/
await openFileAndAddToCanvas('KET/two-benzene-and-ellipse.ket', page);
await openFileAndAddToCanvas(
'KET/two-benzene-and-ellipse.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await takeEditorScreenshot(page);
});
Expand All @@ -479,7 +503,12 @@ test.describe('Macro-Micro-Switcher', () => {
Test case: Macro-Micro-Switcher
Description: Structures exists on the canvas without arrow ( Arrow Open Angle Tool )
*/
await openFileAndAddToCanvas('KET/two-benzene-and-arrow.ket', page);
await openFileAndAddToCanvas(
'KET/two-benzene-and-arrow.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await takeEditorScreenshot(page);
});
Expand All @@ -504,7 +533,12 @@ test.describe('Macro-Micro-Switcher', () => {
Test case: Macro-Micro-Switcher
Description: In Macro mode plus sign is not appear
*/
await openFileAndAddToCanvas('KET/two-benzene-and-plus.ket', page);
await openFileAndAddToCanvas(
'KET/two-benzene-and-plus.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await turnOnMacromoleculesEditor(page);
await takeEditorScreenshot(page);
});
Expand Down Expand Up @@ -551,7 +585,12 @@ test.describe('Macro-Micro-Switcher', () => {
Description: Full screen mode is not reset
Test working not properly now because we have bug https://github.com/epam/ketcher/issues/3656
*/
await openFileAndAddToCanvas('KET/two-benzene-and-plus.ket', page);
await openFileAndAddToCanvas(
'KET/two-benzene-and-plus.ket',
page,
topLeftCorner.x,
topLeftCorner.y,
);
await page.getByTestId('fullscreen-mode-button').click();
await turnOnMacromoleculesEditor(page);
await takePageScreenshot(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

0 comments on commit 71e999e

Please sign in to comment.