diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts deleted file mode 100644 index a3741a2fb5..0000000000 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { test } from '@playwright/test'; -import { - doubleClickOnAtom, - drawBenzeneRing, - pressButton, - takeEditorScreenshot, - waitForAtomPropsModal, - waitForPageInit, -} from '@utils'; -import { - checkSmartsValue, - setAromaticity, - setChirality, - setCustomQuery, -} from './utils'; - -test.describe('Query features', () => { - test.beforeEach(async ({ page }) => { - await waitForPageInit(page); - await drawBenzeneRing(page); - await page.keyboard.press('Escape'); - await doubleClickOnAtom(page, 'C', 0); - await waitForAtomPropsModal(page); - await page.getByTestId('Query specific-section').click(); - }); - - test('Setting aromaticity', async ({ page }) => { - await setAromaticity(page, 'aromatic'); - await pressButton(page, 'Apply'); - await takeEditorScreenshot(page); - await checkSmartsValue(page, '[c]1-[#6]=[#6]-[#6]=[#6]-[#6]=1'); - }); - - test('Setting chirality', async ({ page }) => { - await setChirality(page, 'clockwise'); - await pressButton(page, 'Apply'); - await takeEditorScreenshot(page); - await checkSmartsValue(page, '[#6;@@]1-[#6]=[#6]-[#6]=[#6]-[#6]=1'); - }); -}); - -test.describe('Custom query', () => { - test.beforeEach(async ({ page }) => { - await waitForPageInit(page); - await drawBenzeneRing(page); - await page.keyboard.press('Escape'); - await doubleClickOnAtom(page, 'C', 0); - await waitForAtomPropsModal(page); - }); - - test('Setting custom query', async ({ page }) => { - await setCustomQuery(page, '@@'); - await pressButton(page, 'Apply'); - await takeEditorScreenshot(page); - await checkSmartsValue(page, '[@@]1-[#6]=[#6]-[#6]=[#6]-[#6]=1'); - }); -}); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Custom-query-Setting-custom-query-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Custom-query-Setting-custom-query-1-chromium-linux.png deleted file mode 100644 index 8e3bf8c469..0000000000 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Custom-query-Setting-custom-query-1-chromium-linux.png and /dev/null differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-aromaticity-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-aromaticity-1-chromium-linux.png deleted file mode 100644 index a3a7e3c464..0000000000 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-aromaticity-1-chromium-linux.png and /dev/null differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-chirality-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-chirality-1-chromium-linux.png deleted file mode 100644 index 6f0f84f519..0000000000 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/query-features.spec.ts-snapshots/Query-features-Setting-chirality-1-chromium-linux.png and /dev/null differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/utils.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/utils.ts deleted file mode 100644 index f32f6872fd..0000000000 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Query-Features/utils.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Page, expect } from '@playwright/test'; -import { TopPanelButton, selectTopPanelButton } from '@utils'; -import { clickOnFileFormatDropdown } from '@utils/formats'; - -type queryNumberValues = - | '0' - | '1' - | '2' - | '3' - | '4' - | '5' - | '6' - | '7' - | '8' - | '9'; - -type aromaticity = 'aromatic' | 'aliphatic' | ''; -type chirality = 'clockwise' | 'anticlockwise' | ''; - -export async function setAromaticity(page: Page, aromaticity: aromaticity) { - await page.getByTestId('aromaticity-input-span').click(); - await page.getByRole('option', { name: aromaticity }).click(); -} - -export async function setCustomQuery(page: Page, customQuery: string) { - await page.getByTestId('custom-query-checkbox').check(); - await page.getByTestId('custom-query-value').fill(customQuery); -} - -export async function setImplicitHCount( - page: Page, - implicitHCount: queryNumberValues, -) { - await page.getByTestId('implicitHCount-input').click(); - await page.getByRole('option', { name: implicitHCount }).click(); -} - -export async function setChirality(page: Page, chirality: chirality) { - await page.getByTestId('chirality-input-span').click(); - await page.getByRole('option', { name: chirality, exact: true }).click(); -} - -export async function checkSmartsValue(page: Page, value: string) { - await selectTopPanelButton(TopPanelButton.Save, page); - await clickOnFileFormatDropdown(page); - await page.getByRole('option', { name: 'Daylight SMARTS' }).click(); - const smartsInput = page.getByTestId('smarts-preview-area-text'); - await expect(smartsInput).toHaveValue(value); -} diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Custom-query-attributes/custom-query.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Custom-query-attributes/custom-query.spec.ts index 0198463268..c2b4540bdd 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Custom-query-attributes/custom-query.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Custom-query-attributes/custom-query.spec.ts @@ -11,8 +11,6 @@ import { } from '@utils'; import { checkSmartsValue, setCustomQuery } from '../utils'; -const defaultFileFormat = 'MDL Molfile V2000'; - async function drawStructure(page: Page) { await selectBond(BondTypeName.Single, page); await clickInTheMiddleOfTheScreen(page); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Query-specific-attributes/query-specific-attributes.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Query-specific-attributes/query-specific-attributes.spec.ts index e3f1c6d59e..7eb71e4da2 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Query-specific-attributes/query-specific-attributes.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/SMARTS-attributes/Query-specific-attributes/query-specific-attributes.spec.ts @@ -24,8 +24,6 @@ import { setUnsaturated, } from '../utils'; -const defaultFileFormat = 'MDL Molfile V2000'; - async function drawStructure(page: Page) { await selectBond(BondTypeName.Single, page); await clickInTheMiddleOfTheScreen(page);