Skip to content

#9125 - Autotests for Ketcher 3.12.0 bugs#9651

Merged
AlexeyGirin merged 2 commits intomasterfrom
bugs-3-12-0-part2
Apr 7, 2026
Merged

#9125 - Autotests for Ketcher 3.12.0 bugs#9651
AlexeyGirin merged 2 commits intomasterfrom
bugs-3-12-0-part2

Conversation

@SergeiBakirov
Copy link
Copy Markdown
Collaborator

@SergeiBakirov SergeiBakirov commented Apr 2, 2026

  • added 19 tests for bugs 3.12.0
  • added 4 test data files
  • added expected screenshots

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

- 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();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take locator using getMonomerLocator function

MacroFileType.HELM,
'RNA1{Raaa(Aaaa)Paaa}$$$$V2.0',
);
await takeElementScreenshot(page, page.getByTestId('drawn-structures'));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getMolecularMassValue().getMolecularMassValue() instead of page.getByTestId('Molecular-Mass-Value')


await page.getByText('Sugar').hover({ force: true });
await page
.getByTestId('monomer-preview-micro')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use
await MonomerPreviewTooltip(page).waitForBecomeVisible();
await takeElementScreenshot(page, MonomerPreviewTooltip(page).window);

});
await clickInTheMiddleOfTheScreen(page);

await page.getByText('Sugar').hover({ force: true });
Copy link
Copy Markdown
Collaborator

@AlexeyGirin AlexeyGirin Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getAbbreviationLocator

await clickInTheMiddleOfTheScreen(page);

await page.getByText('Phosphate').hover({ force: true });
await page
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use
await MonomerPreviewTooltip(page).waitForBecomeVisible();
await takeElementScreenshot(page, MonomerPreviewTooltip(page).window);

});
await clickInTheMiddleOfTheScreen(page);

await page.getByText('Phosphate').hover({ force: true });
Copy link
Copy Markdown
Collaborator

@AlexeyGirin AlexeyGirin Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getAbbreviationLocator

await page
.getByTestId('monomer-preview-micro')
.waitFor({ state: 'visible' });
await takeElementScreenshot(page, page.getByText('Phosphate'), {
Copy link
Copy Markdown
Collaborator

@AlexeyGirin AlexeyGirin Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getAbbreviationLocator

…tors

-Removed duplicated test case 16
-Updated screenshots
@AlexeyGirin AlexeyGirin linked an issue Apr 7, 2026 that may be closed by this pull request
20 tasks
Copy link
Copy Markdown
Collaborator

@AlexeyGirin AlexeyGirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@AlexeyGirin AlexeyGirin merged commit 6daae33 into master Apr 7, 2026
14 of 15 checks passed
@AlexeyGirin AlexeyGirin deleted the bugs-3-12-0-part2 branch April 7, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autotests: Autotests for Ketcher 3.12.0 bugs - part 2

2 participants