Skip to content

Commit

Permalink
Macro: #3869 - Left-to-right ("Snake-like") layout for RNA (#3932)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
  • Loading branch information
StarlaStarla and rrodionov91 authored Feb 2, 2024
1 parent b5f691a commit fb33861
Show file tree
Hide file tree
Showing 39 changed files with 1,087 additions and 337 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test';
import {
addMonomerToCanvas,
addSingleMonomerToCanvas,
selectClearCanvasTool,
selectSingleBondTool,
takeEditorScreenshot,
Expand All @@ -27,31 +27,31 @@ test.describe('Clear Canvas Tool', () => {
const MONOMER_NAME = 'Tza___3-thiazolylalanine';
const MONOMER_ALIAS = 'Tza';

const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
400,
400,
1,
);
const peptide3 = await addMonomerToCanvas(
const peptide3 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
500,
500,
2,
);
const peptide4 = await addMonomerToCanvas(
const peptide4 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test';
import {
addMonomerToCanvas,
addSingleMonomerToCanvas,
selectEraseTool,
selectSingleBondTool,
takeEditorScreenshot,
Expand Down Expand Up @@ -29,31 +29,31 @@ test.describe('Erase Tool', () => {
const MONOMER_NAME = 'Tza___3-thiazolylalanine';
const MONOMER_ALIAS = 'Tza';

const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
400,
400,
1,
);
const peptide3 = await addMonomerToCanvas(
const peptide3 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
500,
500,
2,
);
const peptide4 = await addMonomerToCanvas(
const peptide4 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Locator, test } from '@playwright/test';
import {
addMonomerToCanvas,
addSingleMonomerToCanvas,
selectSingleBondTool,
takeEditorScreenshot,
waitForPageInit,
Expand All @@ -19,15 +19,15 @@ test.describe('Modal window', () => {
const MONOMER_NAME = 'Test-6-Ch___Test-6-AP-Chem';
const MONOMER_ALIAS = 'Test-6-Ch';

peptide1 = await addMonomerToCanvas(
peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
200,
200,
0,
);
peptide2 = await addMonomerToCanvas(
peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand All @@ -51,7 +51,15 @@ test.describe('Modal window', () => {
*/

// Create bonds between peptides
await bondTwoMonomers(page, peptide1, peptide2);
await bondTwoMonomers(
page,
peptide1,
peptide2,
undefined,
undefined,
false,
false,
);
});

test('"Connect" button is active', async ({ page }) => {
Expand All @@ -62,10 +70,6 @@ test.describe('Modal window', () => {
*/

// Create bonds between peptides
await bondTwoMonomers(page, peptide1, peptide2);

// Chose attachment points
await page.locator('button[title=R1]').nth(0).click();
await page.locator('button[title=R2]').nth(1).click();
await bondTwoMonomers(page, peptide1, peptide2, 'R1', 'R2', true, false);
});
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test';
import {
addMonomerToCanvas,
addSingleMonomerToCanvas,
selectSingleBondTool,
waitForPageInit,
takeEditorScreenshot,
Expand All @@ -20,7 +20,7 @@ test.describe('Check attachment point hover', () => {
const MONOMER_NAME = 'Tza___3-thiazolylalanine';
const MONOMER_ALIAS = 'Tza';
const coordinatesStart = { x: 300, y: 300 };
const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand All @@ -29,7 +29,7 @@ test.describe('Check attachment point hover', () => {
0,
);
const coordinatesEnd = { x: 400, y: 400 };
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test';
import {
addMonomerToCanvas,
addSingleMonomerToCanvas,
dragMouseTo,
selectRectangleSelectionTool,
selectSingleBondTool,
Expand Down Expand Up @@ -28,31 +28,31 @@ test.describe('Check attachment point rotation', () => {
const MONOMER_ALIAS = 'Tza';

// Get 4 peptides locators
const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
400,
400,
1,
);
const peptide3 = await addMonomerToCanvas(
const peptide3 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
500,
500,
2,
);
const peptide4 = await addMonomerToCanvas(
const peptide4 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down Expand Up @@ -98,15 +98,15 @@ test.describe('Check attachment point rotation', () => {
const MONOMER_ALIAS = 'Tza';

// Get 4 peptides locators
const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
selectSingleBondTool,
waitForPageInit,
takeEditorScreenshot,
addMonomerToCanvas,
addSingleMonomerToCanvas,
} from '@utils';
import {
hideMonomerPreview,
Expand Down Expand Up @@ -31,31 +31,31 @@ test.describe('Polymer Bond Tool', () => {
const MONOMER_NAME = 'Tza___3-thiazolylalanine';
const MONOMER_ALIAS = 'Tza';

const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
400,
400,
1,
);
const peptide3 = await addMonomerToCanvas(
const peptide3 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
500,
500,
2,
);
const peptide4 = await addMonomerToCanvas(
const peptide4 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down Expand Up @@ -126,15 +126,15 @@ test.describe('Signle Bond Tool', () => {
*/
const MONOMER_NAME = 'Tza___3-thiazolylalanine';
const MONOMER_ALIAS = 'Tza';
const peptide1 = await addMonomerToCanvas(
const peptide1 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
300,
300,
0,
);
const peptide2 = await addMonomerToCanvas(
const peptide2 = await addSingleMonomerToCanvas(
page,
MONOMER_NAME,
MONOMER_ALIAS,
Expand Down
Loading

0 comments on commit fb33861

Please sign in to comment.