Skip to content

Commit

Permalink
#3902 - Macro: If open a macro file and put in center of canvas in mi…
Browse files Browse the repository at this point in the history
…cro mode then switch to macro, structure is not in center of canvas
  • Loading branch information
ilya-asiyuk-epam committed Feb 29, 2024
1 parent 96c0b1b commit a0f963f
Show file tree
Hide file tree
Showing 551 changed files with 4,412 additions and 1,542 deletions.
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
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.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test } from '@playwright/test';
import {
moveMouseAway,
openFileAndAddToCanvas,
takeEditorScreenshot,
waitForPageInit,
Expand All @@ -18,6 +19,7 @@ test.describe('Ket Deserialize', () => {
Description: Ket Deserialize
*/
await openFileAndAddToCanvas('KET/monomers-with-bonds.ket', page);
await moveMouseAway(page);
await takeEditorScreenshot(page);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ test.describe('Peptide library testing', () => {
Description: Selected 'Nal' monomer appear above the others when you click on it.
And you can move it on new position.
*/
const x = 200;
const y = 200;
const x = 100;
const y = 100;
await openFileAndAddToCanvas('KET/stuck-peptides-connected.ket', page);
await page.getByText('Nal').locator('..').first().click();
await selectSingleBondTool(page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ test.describe('Snake Bond Tool', () => {
MONOMER_ALIAS_TZA,
100,
100,
50,
50,
12,
25,
25,
18,
);

await selectSnakeLayoutModeTool(page);
Expand Down Expand Up @@ -235,21 +235,66 @@ test.describe('Snake Bond Tool', () => {
3,
3,
);
const { sugar: sugar4 } = await addRnaPresetOnCanvas(
const { sugar: sugar4, phosphate: phosphate4 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
100,
100,
4,
4,
);
const { sugar: sugar5, phosphate: phosphate5 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
200,
200,
5,
5,
);
const { sugar: sugar6, phosphate: phosphate6 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
300,
200,
6,
6,
);
const { sugar: sugar7, phosphate: phosphate7 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
400,
200,
7,
7,
);
const { sugar: sugar8, phosphate: phosphate8 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
500,
200,
8,
8,
);
const { sugar: sugar9 } = await addRnaPresetOnCanvas(
page,
'T_T_R_P',
600,
200,
9,
9,
);

await selectSingleBondTool(page);

await bondTwoMonomers(page, phosphate, sugar1);
await bondTwoMonomers(page, phosphate1, sugar2);
await bondTwoMonomers(page, phosphate2, sugar3);
await bondTwoMonomers(page, phosphate3, sugar4);
await bondTwoMonomers(page, phosphate4, sugar5);
await bondTwoMonomers(page, phosphate5, sugar6);
await bondTwoMonomers(page, phosphate6, sugar7);
await bondTwoMonomers(page, phosphate7, sugar8);
await bondTwoMonomers(page, phosphate8, sugar9);

await selectSnakeLayoutModeTool(page);
await takeEditorScreenshot(page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,28 @@ test.describe('RNA Library', () => {
Test is not working properly. Need fix bug https://github.com/epam/ketcher/issues/3489
*/
const monomers = [
{ type: 'sugar', name: "3A6___6-amino-hexanol (3' end)" },
{ type: 'base', name: 'baA___N-benzyl-adenine' },
{ type: 'phosphate', name: 'bP___Boranophosphate' },
{
type: 'sugar',
groupName: 'Sugars',
name: "3A6___6-amino-hexanol (3' end)",
},
{ type: 'base', groupName: 'Bases', name: 'baA___N-benzyl-adenine' },
{
type: 'phosphate',
groupName: 'Phosphates',
name: 'bP___Boranophosphate',
},
];

await expandCollapseRnaBuilder(page);

for (const monomer of monomers) {
await page.getByTestId(`rna-builder-slot--${monomer.type}`).click();
await page.getByTestId(monomer.name).click();
await page
.getByTestId(`rna-accordion-details-${monomer.groupName}`)
.hover();
await page.mouse.wheel(0, 0);
await clickInTheMiddleOfTheScreen(page);
await takeMonomerLibraryScreenshot(page);
}
Expand Down Expand Up @@ -830,7 +842,13 @@ test.describe('RNA Library', () => {
Description: Ketcher switch to Micromolecule mode
Test is not working properly because we have bug.
*/
await openFileAndAddToCanvas('KET/monomers-connected-with-bonds.ket', page);
const offsetFromCenter = -200;
await openFileAndAddToCanvas(
'KET/monomers-connected-with-bonds.ket',
page,
offsetFromCenter,
offsetFromCenter,
);
await turnOnMicromoleculesEditor(page);
await takePageScreenshot(page);
});
Expand Down
Loading

0 comments on commit a0f963f

Please sign in to comment.