Skip to content

Commit

Permalink
- update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhirnoff committed Jan 17, 2025
1 parent 5ecebc2 commit c7d179c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 34 deletions.
61 changes: 30 additions & 31 deletions ketcher-autotests/tests/API/api-set-get-molecule.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-magic-numbers */
import { expect, Page, test } from '@playwright/test';
import {
AtomButton,
Expand Down Expand Up @@ -810,33 +811,32 @@ test.describe('Tests for API setMolecule/getMolecule', () => {
await takeEditorScreenshot(page);
});

test(
'1. Verify absence "Enhanced Stereochemistry" flag and stereocenters when load structure by API',
async ({ page }) => {
/*
test('1. Verify absence "Enhanced Stereochemistry" flag and stereocenters when load structure by API', async ({
page,
}) => {
/*
Test case: https://github.com/epam/ketcher/issues/6161
Description: Absence "Enhanced Stereochemistry" flag and stereocenters
Case:
1. Apply "Ignore the chiral flag" setting
2. Load structure from API
3. Take a screenshot
*/
const MolV2000File = await readFileContents(
'tests/test-data/Molfiles-V2000/non-proprietary-structure.mol',
);
await applyIgnoreChiralFlag(page);
await waitForSpinnerFinishedWork(
page,
async () => await setMolecule(page, MolV2000File),
);
await takeEditorScreenshot(page);
},
);
const MolV2000File = await readFileContents(
'tests/test-data/Molfiles-V2000/non-proprietary-structure.mol',
);
await applyIgnoreChiralFlag(page);
await waitForSpinnerFinishedWork(
page,
async () => await setMolecule(page, MolV2000File),
);
await takeEditorScreenshot(page);
});

test(
'2. Verify absence "Enhanced Stereochemistry" flag and stereocenters when load structure by API',
async ({ page }) => {
/*
test('2. Verify absence "Enhanced Stereochemistry" flag and stereocenters when load structure by API', async ({
page,
}) => {
/*
Test case: https://github.com/epam/ketcher/issues/6161
Description: Absence "Enhanced Stereochemistry" flag and stereocenters
Case:
Expand All @@ -845,16 +845,15 @@ test.describe('Tests for API setMolecule/getMolecule', () => {
3. Apply "Ignore the chiral flag" setting
4. Take a screenshot
*/
const MolV2000File = await readFileContents(
'tests/test-data/Molfiles-V2000/non-proprietary-structure.mol',
);
await waitForSpinnerFinishedWork(
page,
async () => await setMolecule(page, MolV2000File),
);
await takeEditorScreenshot(page);
await applyIgnoreChiralFlag(page);
await takeEditorScreenshot(page);
},
);
const MolV2000File = await readFileContents(
'tests/test-data/Molfiles-V2000/non-proprietary-structure.mol',
);
await waitForSpinnerFinishedWork(
page,
async () => await setMolecule(page, MolV2000File),
);
await takeEditorScreenshot(page);
await applyIgnoreChiralFlag(page);
await takeEditorScreenshot(page);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
clickOnCanvas,
selectAromatizeTool,
selectDearomatizeTool,
removeExplicitHydrogens,
selectAddRemoveExplicitHydrogens,
} from '@utils';

test.describe('Hot keys', () => {
Expand Down Expand Up @@ -446,9 +446,9 @@ test.describe('Hot keys', () => {
await copyStructureByCtrlMove(page, 'C', 0);
await page.mouse.click(100, 100);
await takeEditorScreenshot(page);
await removeExplicitHydrogens(page);
await selectAddRemoveExplicitHydrogens(page);
await takeEditorScreenshot(page);
await removeExplicitHydrogens(page);
await selectAddRemoveExplicitHydrogens(page);
await takeEditorScreenshot(page);
});

Expand Down

0 comments on commit c7d179c

Please sign in to comment.