-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autotests: #5960 autotests display molecules in macro mode basic stru…
…ctures with atoms and bonds (#5983) * Verify that bond lines between atoms do not overlap in any angle in macro mode * screen * Verify that connections between monomers and molecules are maintained correctly in both micro and macro modes * Verify that switching between micro and macro modes displays molecules without structural changes * Verify that deleting a bond in macro mode removes the bond while maintaining the integrity of the surrounding structure * Verify that the structure in macro mode can be saved as a .ket file, and all elements including bonds and atoms are correctly restored when re-loaded * Peptides - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode * Bases - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode * CHEMS - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode * Nucleotide - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode - Part 1 * Nucleotide - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode - Part 2 * Phosphates - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode and HELM results correction * Sugar - Verify that connection points between monomers and molecules can be created by drawing bonds in macro mode * phosphate fix * Nucleotide fix * Peptide fix * phosphate fix * Sugar fix * CHEMs fix * Bases fix * Some fixes
- Loading branch information
1 parent
0c9dc01
commit f873318
Showing
143 changed files
with
16,261 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-41.8 KB
(16%)
...9-List-of-RNAs-of-inline-Extended-Smiles-R-A-P-R-C-P-R-G-P-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+71.3 KB
...can-be-92345-d-atoms-are-correctly-restored-when-re-loaded-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71.3 KB
...can-be-dede2-d-atoms-are-correctly-restored-when-re-loaded-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
135 changes: 135 additions & 0 deletions
135
...r-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher4.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/* eslint-disable no-self-compare */ | ||
/* eslint-disable max-len */ | ||
/* eslint-disable no-magic-numbers */ | ||
import { | ||
chooseTab, | ||
Tabs, | ||
turnOnMacromoleculesEditor, | ||
turnOnMicromoleculesEditor, | ||
} from '@utils/macromolecules'; | ||
import { Page, test } from '@playwright/test'; | ||
import { | ||
takeEditorScreenshot, | ||
openFileAndAddToCanvasAsNewProject, | ||
selectClearCanvasTool, | ||
waitForPageInit, | ||
selectEraseTool, | ||
} from '@utils'; | ||
import { clickOnMicroBondByIndex } from '@utils/macromolecules/polymerBond'; | ||
|
||
let page: Page; | ||
|
||
async function configureInitialState(page: Page) { | ||
await chooseTab(page, Tabs.Rna); | ||
} | ||
|
||
test.beforeAll(async ({ browser }) => { | ||
const context = await browser.newContext(); | ||
page = await context.newPage(); | ||
|
||
await waitForPageInit(page); | ||
await turnOnMacromoleculesEditor(page); | ||
await configureInitialState(page); | ||
}); | ||
|
||
test.afterEach(async () => { | ||
await selectClearCanvasTool(page); | ||
}); | ||
|
||
test.afterAll(async ({ browser }) => { | ||
await Promise.all(browser.contexts().map((context) => context.close())); | ||
}); | ||
|
||
test(`Verify that bond lines between atoms do not overlap in any angle in macro mode`, async () => { | ||
/* | ||
* Test task: https://github.com/epam/ketcher/issues/5960 | ||
* Description: Verify that bond lines between atoms do not overlap in any angle in macro mode | ||
* | ||
* Case: 1. Load ket file with structures | ||
* 2. Take screenshot to witness canvas was rendered correct | ||
*/ | ||
await openFileAndAddToCanvasAsNewProject( | ||
'KET/Micro-Macro-Switcher/Micro bonds on macro canvas.ket', | ||
page, | ||
); | ||
await takeEditorScreenshot(page); | ||
|
||
// Test should be skipped if related bug exists | ||
test.fixme( | ||
true === true, | ||
`That test results are wrong because of https://github.com/epam/ketcher/issues/5961 issue(s).`, | ||
); | ||
}); | ||
|
||
test(`Verify that connections between monomers and molecules are maintained correctly in both micro and macro modes`, async () => { | ||
/* | ||
* Test task: https://github.com/epam/ketcher/issues/5960 | ||
* Description: Verify that connections between monomers and molecules are maintained correctly in both micro and macro modes | ||
* | ||
* Case: 1. Load ket file with structures | ||
* 2. Take screenshot to witness canvas was rendered correct at macro | ||
* 3. Switch to Micromolecules mode | ||
* 4. Take screenshot to witness canvas was rendered correct at micro | ||
*/ | ||
await openFileAndAddToCanvasAsNewProject( | ||
'KET/Micro-Macro-Switcher/All type of monomers connected to micro.ket', | ||
page, | ||
); | ||
await takeEditorScreenshot(page); | ||
|
||
await turnOnMicromoleculesEditor(page); | ||
await takeEditorScreenshot(page); | ||
|
||
await turnOnMacromoleculesEditor(page); | ||
}); | ||
|
||
test(`Verify that switching between micro and macro modes displays molecules without structural changes`, async () => { | ||
/* | ||
* Test task: https://github.com/epam/ketcher/issues/5960 | ||
* Description: Verify that switching between micro and macro modes displays molecules without structural changes | ||
* | ||
* Case: 1. Load ket file with structures at Macro | ||
* 2. Take screenshot to witness canvas was rendered correct at macro | ||
* 3. Switch to Micromolecules mode | ||
* 4. Take screenshot to witness canvas was rendered correct at micro | ||
* Canvases should be equal | ||
*/ | ||
await turnOnMicromoleculesEditor(page); | ||
await openFileAndAddToCanvasAsNewProject( | ||
'KET/Micro-Macro-Switcher/Complicated structures on the canvas.ket', | ||
page, | ||
); | ||
await takeEditorScreenshot(page); | ||
|
||
await turnOnMacromoleculesEditor(page); | ||
await takeEditorScreenshot(page); | ||
}); | ||
|
||
test(`Verify that deleting a bond in macro mode removes the bond while maintaining the integrity of the surrounding structure`, async () => { | ||
/* | ||
* Test task: https://github.com/epam/ketcher/issues/5960 | ||
* Description: Verify that deleting a bond in macro mode removes the bond while maintaining the integrity of the surrounding structure | ||
* | ||
* Case: 1. Load ket file with structures at Macro | ||
* 2. Take screenshot to witness initial state | ||
* 3. Delete all bonds at the center of every molecule | ||
* 4. Take screenshot to witness final state | ||
*/ | ||
await openFileAndAddToCanvasAsNewProject( | ||
'KET/Micro-Macro-Switcher/All Bonds on Macro.ket', | ||
page, | ||
); | ||
await takeEditorScreenshot(page); | ||
|
||
await selectEraseTool(page); | ||
// removing single bond | ||
await clickOnMicroBondByIndex(page, 39); | ||
// removing double bond | ||
await clickOnMicroBondByIndex(page, 45); | ||
// removing single up bond | ||
await clickOnMicroBondByIndex(page, 51); | ||
// removing single down bond | ||
await clickOnMicroBondByIndex(page, 51); | ||
|
||
await takeEditorScreenshot(page); | ||
}); |
Binary file added
BIN
+21.3 KB
...es-between-atoms-do-not-overlap-in-any-angle-in-macro-mode-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.9 KB
...-and-m-41159-ained-correctly-in-both-micro-and-macro-modes-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+36.4 KB
...-and-m-d9eb9-ained-correctly-in-both-micro-and-macro-modes-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24 KB
...e-remo-1edcb-ng-the-integrity-of-the-surrounding-structure-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.5 KB
...e-remo-b9010-ng-the-integrity-of-the-surrounding-structure-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+78.9 KB
...-macro-modes-displays-molecules-without-structural-changes-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.6 KB
...-macro-modes-displays-molecules-without-structural-changes-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.