Skip to content

Commit

Permalink
Merge pull request #3192 from MartaWilliams/3189-autotests-templates-…
Browse files Browse the repository at this point in the history
…salts-and-solvents

Autotest: #3189 Templates - Salts and Solvents
  • Loading branch information
rrodionov91 authored Sep 12, 2023
2 parents cbd61f2 + 8f42755 commit 57eef2a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { test } from '@playwright/test';
import {
selectAtomInToolbar,
AtomButton,
pressButton,
selectSaltsAndSolvents,
SaltsAndSolvents,
clickInTheMiddleOfTheScreen,
takeEditorScreenshot,
STRUCTURE_LIBRARY_BUTTON_NAME,
} from '@utils';

test.describe('Open Ketcher', () => {
test.beforeEach(async ({ page }) => {
await page.goto('');
});

test('Verify if the new Salt or Solvent is replacing old one', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-12972 - 'Check that new Salt or Solvent is replacing the previously added one'
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await page.getByRole('tab', { name: 'Salts and Solvents' }).click();
await selectSaltsAndSolvents(SaltsAndSolvents.AceticAnhydride, page);
await clickInTheMiddleOfTheScreen(page);
await takeEditorScreenshot(page);

await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await page.getByRole('tab', { name: 'Salts and Solvents' }).click();
await selectSaltsAndSolvents(SaltsAndSolvents.AceticAcid, page);
await clickInTheMiddleOfTheScreen(page);
await takeEditorScreenshot(page);
});

test('Verify if Methan Sulphonic Acid replace the Nitrogen atom', async ({
page,
}) => {
await selectAtomInToolbar(AtomButton.Nitrogen, page);
await clickInTheMiddleOfTheScreen(page);

await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await page.getByRole('tab', { name: 'Salts and Solvents' }).click();
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);
});
});
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 57eef2a

Please sign in to comment.