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

Macro: #3756 - Loading from file and than - Undo changes causes exceptions and breakes selection/moving fuctionality #3822

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 @@ -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.
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": 10.625000000000002,
"y": -9.600000000000001
Expand Down Expand Up @@ -363,9 +363,9 @@
],
"naturalAnalogShort": "A"
},
"monomer1": {
"monomer6": {
"type": "monomer",
"id": "1",
"id": "6",
"position": {
"x": 10.625000000000002,
"y": -7.050000000000001
Expand Down Expand Up @@ -558,9 +558,9 @@
],
"naturalAnalogShort": "R"
},
"monomer2": {
"monomer7": {
"type": "monomer",
"id": "2",
"id": "7",
"position": {
"x": 13.175,
"y": -7.050000000000001
Expand Down
Loading