Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/epam/ketcher into 3667-ma…
Browse files Browse the repository at this point in the history
…cro-monomers-are-stacked-and-difficult-to-read-after-importing-a-file
  • Loading branch information
Nitvex committed Jan 2, 2024
2 parents 4871212 + 617edf5 commit 72c18ed
Show file tree
Hide file tree
Showing 29 changed files with 4,775 additions and 95 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.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {
addMonomerToCanvas,
clickRedo,
clickUndo,
dragMouseTo,
openFileAndAddToCanvas,
selectRectangleArea,
selectSingleBondTool,
selectSnakeBondTool,
takeEditorScreenshot,
Expand Down Expand Up @@ -110,4 +113,29 @@ test.describe('Undo Redo', () => {
await clickRedo(page);
await takeEditorScreenshot(page);
});

test('Undo redo for imported structure', async ({ page }) => {
await openFileAndAddToCanvas(
'KET/peptide-enumeration-one-two-three.ket',
page,
);
await openFileAndAddToCanvas(
'KET/peptide-enumeration-one-two-three.ket',
page,
);
await clickUndo(page);
await takeEditorScreenshot(page);

const startX = 100;
const startY = 100;
const endX = 900;
const endY = 900;
await selectRectangleArea(page, startX, startY, endX, endY);

const coords = { x: 840, y: 470 };
await page.mouse.move(coords.x, coords.y);

await dragMouseTo(coords.x + 100, coords.y + 100, page);
await takeEditorScreenshot(page);
});
});
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
Expand Up @@ -2,35 +2,35 @@
"root": {
"nodes": [
{
"$ref": "monomer0"
"$ref": "monomer5"
},
{
"$ref": "monomer1"
"$ref": "monomer6"
},
{
"$ref": "monomer2"
"$ref": "monomer7"
}
],
"connections": [
{
"connectionType": "single",
"endpoint1": {
"monomerId": "monomer0",
"monomerId": "monomer5",
"attachmentPointId": "R1"
},
"endpoint2": {
"monomerId": "monomer1",
"monomerId": "monomer6",
"attachmentPointId": "R3"
}
},
{
"connectionType": "single",
"endpoint1": {
"monomerId": "monomer1",
"monomerId": "monomer6",
"attachmentPointId": "R1"
},
"endpoint2": {
"monomerId": "monomer2",
"monomerId": "monomer7",
"attachmentPointId": "R2"
}
}
Expand All @@ -47,9 +47,9 @@
}
]
},
"monomer0": {
"monomer5": {
"type": "monomer",
"id": "0",
"id": "5",
"position": {
"x": 2.7466666666666666,
"y": -1.849999999999996
Expand Down Expand Up @@ -361,9 +361,9 @@
],
"naturalAnalogShort": "A"
},
"monomer1": {
"monomer6": {
"type": "monomer",
"id": "1",
"id": "6",
"position": {
"x": 2.7533333333333316,
"y": -2.574999999999998
Expand Down Expand Up @@ -552,9 +552,9 @@
],
"naturalAnalogShort": "R"
},
"monomer2": {
"monomer7": {
"type": "monomer",
"id": "2",
"id": "7",
"position": {
"x": 3.6000000000000005,
"y": -2.5900000000000043
Expand Down
Loading

0 comments on commit 72c18ed

Please sign in to comment.