Skip to content

Commit

Permalink
- 1 tests
Browse files Browse the repository at this point in the history
- 2 refrence screenshots
  • Loading branch information
MartaWilliams committed Aug 25, 2023
1 parent 2a6616d commit 8f42755
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 8f42755

Please sign in to comment.