#9125 - Autotests for Ketcher 3.12.0 bugs#9651
Conversation
- added 19 tests for bugs 3.12.0 - added 4 test data files#9125 - added expected screenshots
| await selectAllStructuresOnCanvas(page); | ||
| const targetAtom = getAtomLocator(page, { atomLabel: 'C' }).first(); | ||
| await ContextMenu(page, targetAtom).open(); | ||
| await expect(page.getByTestId('copy')).toBeVisible(); |
There was a problem hiding this comment.
Use page.getByTestId(MonomerOption.Copy) instead of page.getByTestId('copy')
toBeVisible is incorrect toBeDisabled should be used intead
| MacroFileType.HELM, | ||
| 'RNA1{[Unknown sugar](A)P.R([Unknown base])P.[Unknown sugar]([Unknown base])P.[Unknown sugar](A)[Unknown phosphate].R([Unknown base])[Unknown phosphate].[Unknown sugar]([Unknown base])[Unknown phosphate].[Unknown sugar](A)}|RNA2{R([Unknown base])}|RNA3{[Unknown sugar]([Unknown base])}$RNA1,RNA2,19:R2-1:R1|RNA2,RNA3,1:R2-1:R1$$$V2.0', | ||
| ); | ||
| await takeElementScreenshot(page, page.getByTestId('drawn-structures')); |
There was a problem hiding this comment.
page.getByTestId('drawn-structures') is not good solution
use locator on exact monomer (take it with getMonomerLocator) at the center of composition + padding option
| MacroFileType.HELM, | ||
| 'PEPTIDE1{Aaaa}$$$$V2.0', | ||
| ); | ||
| await takeElementScreenshot(page, page.getByTestId('monomer')); |
There was a problem hiding this comment.
take locator using getMonomerLocator function
| MacroFileType.HELM, | ||
| 'RNA1{Raaa(Aaaa)Paaa}$$$$V2.0', | ||
| ); | ||
| await takeElementScreenshot(page, page.getByTestId('drawn-structures')); |
There was a problem hiding this comment.
page.getByTestId('drawn-structures') is not good solution
use locator on exact monomer (take it with getMonomerLocator) at the center of composition + padding option
| await CommonLeftToolbar(page).areaSelectionTool(SelectionToolType.Lasso); | ||
| await getMonomerLocator(page, { monomerAlias: 'A' }).click(); | ||
| await CommonLeftToolbar(page).erase(); | ||
| await expect(page.getByTestId('Molecular-Mass-Value')).toHaveText( |
There was a problem hiding this comment.
Use getMolecularMassValue().getMolecularMassValue() instead of page.getByTestId('Molecular-Mass-Value')
|
|
||
| await page.getByText('Sugar').hover({ force: true }); | ||
| await page | ||
| .getByTestId('monomer-preview-micro') |
There was a problem hiding this comment.
Use
await MonomerPreviewTooltip(page).waitForBecomeVisible();
await takeElementScreenshot(page, MonomerPreviewTooltip(page).window);
| }); | ||
| await clickInTheMiddleOfTheScreen(page); | ||
|
|
||
| await page.getByText('Sugar').hover({ force: true }); |
There was a problem hiding this comment.
Use getAbbreviationLocator
| await clickInTheMiddleOfTheScreen(page); | ||
|
|
||
| await page.getByText('Phosphate').hover({ force: true }); | ||
| await page |
There was a problem hiding this comment.
Use
await MonomerPreviewTooltip(page).waitForBecomeVisible();
await takeElementScreenshot(page, MonomerPreviewTooltip(page).window);
| }); | ||
| await clickInTheMiddleOfTheScreen(page); | ||
|
|
||
| await page.getByText('Phosphate').hover({ force: true }); |
There was a problem hiding this comment.
Use getAbbreviationLocator
| await page | ||
| .getByTestId('monomer-preview-micro') | ||
| .waitFor({ state: 'visible' }); | ||
| await takeElementScreenshot(page, page.getByText('Phosphate'), { |
There was a problem hiding this comment.
Use getAbbreviationLocator
…tors -Removed duplicated test case 16 -Updated screenshots
How the feature works? / How did you fix the issue?
(Screenshots, videos, or GIFs, if applicable)
Check list
#1234 – issue name