Skip to content

Commit

Permalink
Autotests: #5604 autotests support of ambiguous monomers in sequence …
Browse files Browse the repository at this point in the history
…view (#5747)

* #5604 - Support of ambiguous monomers in sequence view

* #5604 - Support of ambiguous monomers in sequence view

* Last fix

* Last last fix

---------

Co-authored-by: Alexey Girin <agirin@mail.ru>
  • Loading branch information
AlinaLysenko and AlexeyGirin authored Oct 15, 2024
1 parent 8913356 commit e2c8e44
Show file tree
Hide file tree
Showing 33 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
waitForKetcherInit,
openStructurePasteFromClipboard,
waitForSpinnerFinishedWork,
selectSequenceLayoutModeTool,
selectClearCanvasTool,
delay,
} from '@utils';
Expand Down Expand Up @@ -66,6 +67,9 @@ async function loadHELMFromClipboard(page: Page, helmString: string) {
async function hoverMouseOverMonomer(page: Page, monomerLocatorIndex: number) {
await page.locator('use').nth(monomerLocatorIndex).hover();
}
async function hoverMouseOverSequenceModeMonomer(page: Page) {
await page.locator('text').first().hover();
}

interface IHELMString {
testDescription: string;
Expand Down Expand Up @@ -169,12 +173,14 @@ const ambiguousMonomers: IHELMString[] = [
'13. RNA Base N (alternative, no probabilities, from the library)',
HELMString: 'RNA1{R(U,G,C,A)P}$$$$V2.0',
monomerLocatorIndex: 1,
pageReloadNeeded: true,
},
{
testDescription:
'14. RNA Base B (alternative, no probabilities, from the library)',
HELMString: 'RNA1{R(U,G,C)P}$$$$V2.0',
monomerLocatorIndex: 1,
pageReloadNeeded: true,
},
{
testDescription:
Expand Down Expand Up @@ -339,3 +345,33 @@ test.describe('Preview tooltips checks: ', () => {
});
}
});

test.describe('Preview tooltips checks: ', () => {
for (const ambiguousMonomer of ambiguousMonomers) {
test(`${ambiguousMonomer.testDescription} in sequence view`, async () => {
/*
Test case1: https://github.com/epam/ketcher/issues/5604
Description: Verify that the ambiguous monomer preview displays a list of full names of monomers making up the ambiguous
Case:
1. Load correct HELM via paste from clipboard way
2. Hover mouse over monomer, wait for preview tooltip
2. Take screenshot of the canvas to compare it with example
*/
test.setTimeout(20000);
if (ambiguousMonomer.pageReloadNeeded) await pageReload(page);

await selectSequenceLayoutModeTool(page);
await loadHELMFromClipboard(page, ambiguousMonomer.HELMString);
await hoverMouseOverSequenceModeMonomer(page);
await delay(1);

await takeEditorScreenshot(page);

// Test should be skipped if related bug exists
test.fixme(
ambiguousMonomer.shouldFail === true,
`That test fails because of ${ambiguousMonomer.issueNumber} issue.`,
);
});
}
});
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.

0 comments on commit e2c8e44

Please sign in to comment.