Skip to content

Commit

Permalink
#3170 – removed fixme for functiona-groups and salts and solvents tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitvex committed Sep 1, 2023
1 parent 01fe93c commit ac5bf1c
Show file tree
Hide file tree
Showing 22 changed files with 126 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
BondTool,
selectNestedTool,
waitForIndigoToLoad,
waitForSpinnerFinishedWork,
} from '@utils';
import { getAtomByIndex } from '@utils/canvas/atoms';
import { getBondByIndex } from '@utils/canvas/bonds';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
FILE_TEST_DATA,
saveToFile,
waitForLoad,
waitForIndigoToLoad,
} from '@utils';
import { getRxn } from '@utils/formats';

Expand Down Expand Up @@ -182,28 +183,27 @@ test.describe('Reagents RXN format', () => {
test.describe('Reagents RXN format', () => {
test.beforeEach(async ({ page }) => {
await page.goto('');
await waitForIndigoToLoad(page);
});

test.afterEach(async ({ page }) => {
await takeEditorScreenshot(page);
});

test.fixme('Open from file in "RXN V2000" format', async ({ page }) => {
test('Open from file in "RXN V2000" format', async ({ page }) => {
/*
Test case: EPMLSOPKET-4679
Description: Reagent 'NH3' above the reaction arrow
*/
// will fix when fixed Indigo bug #1205
await openFileAndAddToCanvas('mdl-rxnfile-v2000-expected.rxn', page);
await clickInTheMiddleOfTheScreen(page);
});

test.fixme('Open from file in "RXN V3000" format', async ({ page }) => {
test('Open from file in "RXN V3000" format', async ({ page }) => {
/*
Test case: EPMLSOPKET-4680
Description: Reagent 'NH3' above the reaction arrow
*/
// will fix when fixed Indigo bug #1205
await openFileAndAddToCanvas('mdl-rxnfile-v3000-expected.rxn', page);
await clickInTheMiddleOfTheScreen(page);
});
Expand All @@ -220,12 +220,11 @@ test.describe('Reagents RXN format', () => {
await clickInTheMiddleOfTheScreen(page);
});

test.fixme('Paste from clipboard in "RXN V3000" format', async ({ page }) => {
test('Paste from clipboard in "RXN V3000" format', async ({ page }) => {
/*
Test case: EPMLSOPKET-4678
Description: Reagent 'Cl' displays below reaction arrow
*/
// will fix when fixed Indigo bug #1205
await pasteFromClipboard(
page,
FILE_TEST_DATA.benzeneArrowBenzeneReagentHclV3000,
Expand Down
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test.describe('Drag and drop Atom on canvas', () => {
await dragMouseTo(x, y, page);
});

test.fixme('The Nitrogen atom replaces the formic acid', async ({ page }) => {
test('The Nitrogen atom replaces the formic acid', async ({ page }) => {
/*
Test case: EPMLSOPKET-11833
Description: when drag & drop an atom on a Salts and Solvents it should replace it
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import {
openFileAndAddToCanvas,
delay,
DELAY_IN_SECONDS,
waitForIndigoToLoad,
} from '@utils';

test.describe('Open UTF-8 and save as SVG and PNG', () => {
test.beforeEach(async ({ page }) => {
await page.goto('');
await waitForIndigoToLoad(page);
});

test.fixme('Open UTF-8 file and save as SVG', async ({ page }) => {
test('Open UTF-8 file and save as SVG', async ({ page }) => {
/*
Test case: EPMLSOPKET-5252
Description: A file with UTF-8 encoding opens and, when saved in a SVG preview, contains all characters
Expand All @@ -27,7 +29,7 @@ test.describe('Open UTF-8 and save as SVG and PNG', () => {
await takeEditorScreenshot(page);
});

test.fixme('Open UTF-8 file and save as PNG', async ({ page }) => {
test('Open UTF-8 file and save as PNG', async ({ page }) => {
/*
Test case: EPMLSOPKET-5252
Description: A file with UTF-8 encoding opens and, when saved in a PNG preview, contains all characters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,38 +327,37 @@ test.describe('Templates - Functional Group Tools2', () => {
await pressButton(page, 'Horizontal Flip (Alt+H)');
});

test.fixme(
'Erase of contracted and expanded Functional Group',
async ({ page }) => {
/*
test('Erase of contracted and expanded Functional Group', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-2901
Description: Contracted Functional Group is removed after click with Erase tool;
Expanded Functional Group is removed if were selected by Rectangle selection;
EDIT ABBREVIATION window appears if click by Erase tool on expanded FG without selection.
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await page.getByRole('tab', { name: 'Functional Groups' }).click();
await selectFunctionalGroups(FunctionalGroups.Boc, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await page.getByRole('tab', { name: 'Functional Groups' }).click();
await selectFunctionalGroups(FunctionalGroups.Boc, page);
await clickInTheMiddleOfTheScreen(page);

await selectLeftPanelButton(LeftPanelButton.Erase, page);
await page.getByText('Boc').first().click();
await selectLeftPanelButton(LeftPanelButton.Erase, page);
await page.getByText('Boc').first().click();

await resetCurrentTool(page);
await takeEditorScreenshot(page);
await resetCurrentTool(page);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Undo, page);
await page.getByText('Boc').first().click();
await selectLeftPanelButton(LeftPanelButton.Erase, page);
await selectTopPanelButton(TopPanelButton.Undo, page);
await page.getByText('Boc').first().click();
await selectLeftPanelButton(LeftPanelButton.Erase, page);

await resetCurrentTool(page);
await takeEditorScreenshot(page);
await resetCurrentTool(page);
await takeEditorScreenshot(page);

await openFileAndAddToCanvas('functional-group-expanded.mol', page);
await page.keyboard.press('Control+a');
await page.getByTestId('delete').click();
},
);
await openFileAndAddToCanvas('functional-group-expanded.mol', page);
await page.keyboard.press('Control+a');
await page.getByTestId('delete').click();
});

test('Add Template to the Functional group', async ({ page }) => {
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
pressTab,
FILE_TEST_DATA,
STRUCTURE_LIBRARY_BUTTON_NAME,
waitForIndigoToLoad,
} from '@utils';
import { getAtomByIndex } from '@utils/canvas/atoms';
import { TestIdSelectors } from '@utils/selectors/testIdSelectors';
Expand Down Expand Up @@ -76,6 +77,7 @@ async function changeStatusOfAbbreviation(
test.describe('Functional Groups', () => {
test.beforeEach(async ({ page }) => {
await page.goto('');
await waitForIndigoToLoad(page);
});

test.afterEach(async ({ page }) => {
Expand Down Expand Up @@ -244,19 +246,18 @@ test.describe('Functional Groups', () => {
await clickInTheMiddleOfTheScreen(page);
});

test.fixme(
'Highlight Functional Group with Selection tool',
async ({ page }) => {
/*
test('Highlight Functional Group with Selection tool', async ({ page }) => {
/*
Test case: EPMLSOPKET-2899
Description: Expanded functional group are highlight with Selection tool.
*/
const x = 570;
const y = 320;
await openFileAndAddToCanvas('functional-group-expanded.mol', page);
await page.mouse.move(x, y);
},
);
const x = 600;
const y = 400;
const smallShift = 10;
await openFileAndAddToCanvas('functional-group-expanded.mol', page);
await page.mouse.move(x, y);
await page.mouse.move(x + smallShift, y);
});

test('Add Bond to expanded Functional Group', async ({ page }) => {
/*
Expand Down Expand Up @@ -412,22 +413,21 @@ test.describe('Functional Groups', () => {
await page.getByText('Expand Abbreviation').click();
});

test.fixme(
'Ordinary elements should not show explicit valences (PO4H2)',
async ({ page }) => {
/*
test('Ordinary elements should not show explicit valences (PO4H2)', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-8915
Description: Ordinary elements should not show explicit valences for 'P'.
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Functional Groups');
await selectFunctionalGroups(FunctionalGroups.PO4H2, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Functional Groups');
await selectFunctionalGroups(FunctionalGroups.PO4H2, page);
await clickInTheMiddleOfTheScreen(page);

await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();
},
);
await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();
});

test('Selection highlight is displayed correctly for functional groups with longer names', async ({
page,
Expand Down Expand Up @@ -461,22 +461,21 @@ test.describe('Functional Groups', () => {
await clickInTheMiddleOfTheScreen(page);
});

test.fixme(
'Selection highlight appears immediately after hover over text',
async ({ page }) => {
/*
test('Selection highlight appears immediately after hover over text', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-8920
Description: Selection highlight appears immediately after hover over text.
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);

await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
await page.getByText('me').first().hover();
},
);
await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
await page.getByText('me').first().hover();
});

test('Add Atom by hotkey to expanded Functional Group', async ({ page }) => {
/*
Expand All @@ -489,27 +488,26 @@ test.describe('Functional Groups', () => {
await page.keyboard.press('n');
});

test.fixme(
'Add Atom by hotkey to expanded Salts and Solvents',
async ({ page }) => {
/*
test('Add Atom by hotkey to expanded Salts and Solvents', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-8928
Description: When Adding 'Atom' by hotkey to expanded Salts and Solvents system display 'Edit Abbreviation' pop-up window.
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);

await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();
await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();

await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
point = await getAtomByIndex(page, { label: 'S' }, 0);
await page.mouse.move(point.x, point.y);
await page.keyboard.press('n');
},
);
await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
point = await getAtomByIndex(page, { label: 'S' }, 0);
await page.mouse.move(point.x, point.y);
await page.keyboard.press('n');
});

test('Add Functional Group abbreviation to FG connected to terminal atoms of structure', async ({
page,
Expand Down Expand Up @@ -553,24 +551,23 @@ test.describe('Functional Groups', () => {
await resetCurrentTool(page);
});

test.fixme(
'Hotkey (Del) can delete Salts and Solvents abbreviation',
async ({ page }) => {
/*
test('Hotkey (Del) can delete Salts and Solvents abbreviation', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-11844
Description: Hotkey (Del) delete Salts and Solvents abbreviation.
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Salts and Solvents');
await selectSaltsAndSolvents(SaltsAndSolvents.MethaneSulphonicAcid, page);
await clickInTheMiddleOfTheScreen(page);

await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
await moveMouseToTheMiddleOfTheScreen(page);
await page.keyboard.press('Delete');
await resetCurrentTool(page);
},
);
await selectLeftPanelButton(LeftPanelButton.RectangleSelection, page);
await moveMouseToTheMiddleOfTheScreen(page);
await page.keyboard.press('Delete');
await resetCurrentTool(page);
});

test.skip('Hotkey for Atom can replace Functional Groups abbreviation', async ({
page,
Expand Down Expand Up @@ -639,25 +636,24 @@ test.describe('Functional Groups', () => {
await page.getByText('Contract Abbreviation').click();
});

test.fixme(
'Check that expanded Functional Groups not overlap each other',
async ({ page }) => {
/*
test('Check that expanded Functional Groups not overlap each other', async ({
page,
}) => {
/*
Test case: EPMLSOPKET-12977
Description: Expanded Functional Groups not overlap each other
*/
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Functional Groups');
await selectFunctionalGroups(FunctionalGroups.Cbz, page);
await clickInTheMiddleOfTheScreen(page);
await pressButton(page, STRUCTURE_LIBRARY_BUTTON_NAME);
await pressTab(page, 'Functional Groups');
await selectFunctionalGroups(FunctionalGroups.Cbz, page);
await clickInTheMiddleOfTheScreen(page);

await drawFGAndDrag(FunctionalGroups.Boc, 50, page);
await drawFGAndDrag(FunctionalGroups.Boc, 50, page);

await page.keyboard.press('Control+a');
await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();
},
);
await page.keyboard.press('Control+a');
await clickInTheMiddleOfTheScreen(page, 'right');
await page.getByText('Expand Abbreviation').click();
});

test.skip('After expand a Functional Group hotkeys not stop working', async ({
page,
Expand Down
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.
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.
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.
Loading

0 comments on commit ac5bf1c

Please sign in to comment.