Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/epam/ketcher into 3170-au…
Browse files Browse the repository at this point in the history
…totests-reduce-the-number-of-tests-with-fixme
  • Loading branch information
Nitvex committed Sep 4, 2023
2 parents 89238a6 + 75c90f7 commit f3e01a9
Show file tree
Hide file tree
Showing 101 changed files with 243 additions and 201 deletions.
2 changes: 1 addition & 1 deletion ketcher-autotests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const config: PlaywrightTestConfig = {
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: Boolean(process.env.CI),
forbidOnly: Boolean(process.env.CI_ENVIRONMENT),
/* Retry on CI only */
retries: isCI ? MAX_NUMBER_OF_RETRIES : 0,
/* Opt out of parallel tests on CI. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ test('Save file - Save *.ket file', async ({ page }) => {
);

const expectedFile = await getKet(page);
await saveToFile('Ket/ket-2934-to-compare-expected.ket', expectedFile);
await saveToFile('KET/ket-2934-to-compare-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName: 'tests/test-data/Ket/ket-2934-to-compare-expected.ket',
expectedFileName: 'tests/test-data/KET/ket-2934-to-compare-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test.describe('SMILES files', () => {
Description: Structure is correctly opens from saved files. Keep only first reaction arrow
and keep all structures (all intermediate structures should be products and the arrow is replaced by a plus)
*/
await openFileAndAddToCanvas('Ket/two-arrows-and-plus.ket', page);
await openFileAndAddToCanvas('KET/two-arrows-and-plus.ket', page);
await getAndCompareSmiles(
page,
'tests/test-data/smiles-two-arrows-and-plus-expected.json',
Expand All @@ -299,7 +299,7 @@ test.describe('SMILES files', () => {
Description: Structure is not distorted. Reagent NH3 located above reaction arrow.
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-nh3.ket',
'KET/benzene-arrow-benzene-reagent-nh3.ket',
page,
);
await getAndCompareSmiles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => {
Test case: EPMLSOPKET-1886
Description: The structure isn`t changed.
*/
await openFileAndAddToCanvas('Ket/chain.ket', page);
await openFileAndAddToCanvas('KET/chain.ket', page);
await selectTopPanelButton(TopPanelButton.Calculate, page);
});

Expand Down Expand Up @@ -355,15 +355,15 @@ test.describe('Indigo Tools - Calculate CIP Tool', () => {
await openFileAndAddToCanvas('structure-with-stereo-bonds.mol', page);
const expectedFile = await getKet(page);
await saveToFile(
'Ket/structure-with-stereo-bonds-expected.ket',
'KET/structure-with-stereo-bonds-expected.ket',
expectedFile,
);
await selectTopPanelButton(TopPanelButton.Calculate, page);
const { file: ketFile, fileExpected: ketFileExpected } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/structure-with-stereo-bonds-expected.ket',
'tests/test-data/KET/structure-with-stereo-bonds-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test.describe('Calculated Values Tools', () => {
Description: The 'Calculated Values' modal window is opened,
the 'Chemical Formula' field contains 'C7H16' value.
*/
await openFileAndAddToCanvas('Ket/calculated-values-chain.ket', page);
await openFileAndAddToCanvas('KET/calculated-values-chain.ket', page);
await selectTopPanelButton(TopPanelButton.Calculated, page);
});

Expand Down Expand Up @@ -615,7 +615,7 @@ test.describe('Calculated Values Tools', () => {
*/
const xDelta = 500;
const yDelta = 800;
await openFileAndAddToCanvas('Ket/reaction-arrow.ket', page);
await openFileAndAddToCanvas('KET/reaction-arrow.ket', page);
const { x, y } = await getCoordinatesOfTheMiddleOfTheScreen(page);
await dragMouseTo(x - xDelta, y + yDelta, page);
await selectTopPanelButton(TopPanelButton.Calculated, page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ test.describe('Indigo Tools - Clean Tools', () => {
The Clean Up action is applied correctly and simultaneously
to the whole structure with stereolabels.
*/
await openFileAndAddToCanvas('Ket/stereolabels.ket', page);
await openFileAndAddToCanvas('KET/stereolabels.ket', page);

await selectTopPanelButton(TopPanelButton.Clean, page);
await delay(DELAY_IN_SECONDS.SEVEN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
- the selected stereocenters have different stereo marks.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectLeftPanelButton(LeftPanelButton.Stereochemistry, page);
Expand Down Expand Up @@ -254,15 +254,15 @@ test.describe('Enhanced Stereochemistry Tool', () => {
All enhanced stereochemistry features are present after opening.
It's possible to edit the stereo marks assignment after opening the saved file.
*/
await openFileAndAddToCanvas('Ket/stereo-and-structure.ket', page);
await openFileAndAddToCanvas('KET/stereo-and-structure.ket', page);
const expectedFile = await getKet(page);
await saveToFile('Ket/stereo-and-structure-expected.ket', expectedFile);
await saveToFile('KET/stereo-and-structure-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/stereo-and-structure-expected.ket',
'tests/test-data/KET/stereo-and-structure-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand All @@ -281,15 +281,15 @@ test.describe('Enhanced Stereochemistry Tool', () => {
All enhanced stereochemistry features are present after opening.
It's possible to edit the stereo marks assignment after opening the saved file.
*/
await openFileAndAddToCanvas('Ket/stereo-or-structure.ket', page);
await openFileAndAddToCanvas('KET/stereo-or-structure.ket', page);
const expectedFile = await getKet(page);
await saveToFile('Ket/stereo-or-structure-expected.ket', expectedFile);
await saveToFile('KET/stereo-or-structure-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/stereo-or-structure-expected.ket',
'tests/test-data/KET/stereo-or-structure-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand All @@ -308,15 +308,15 @@ test.describe('Enhanced Stereochemistry Tool', () => {
All enhanced stereochemistry features are present after opening.
It's possible to edit the stereo marks assignment after opening the saved file.
*/
await openFileAndAddToCanvas('Ket/stereo-mixed-structure.ket', page);
await openFileAndAddToCanvas('KET/stereo-mixed-structure.ket', page);
const expectedFile = await getKet(page);
await saveToFile('Ket/stereo-mixed-structure-expected.ket', expectedFile);
await saveToFile('KET/stereo-mixed-structure-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/stereo-mixed-structure-expected.ket',
'tests/test-data/KET/stereo-mixed-structure-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand All @@ -339,13 +339,13 @@ test.describe('Enhanced Stereochemistry Tool', () => {
*/
await openFileAndAddToCanvas('mixed-and-stereomarks.ket', page);
const expectedFile = await getKet(page);
await saveToFile('Ket/mixed-and-stereomarks-expected.ket', expectedFile);
await saveToFile('KET/mixed-and-stereomarks-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/mixed-and-stereomarks-expected.ket',
'tests/test-data/KET/mixed-and-stereomarks-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand All @@ -366,15 +366,15 @@ test.describe('Enhanced Stereochemistry Tool', () => {
All enhanced stereochemistry features are present after opening.
It's possible to edit the stereo marks assignment after opening the saved file.
*/
await openFileAndAddToCanvas('Ket/mixed-or-stereomarks.ket', page);
await openFileAndAddToCanvas('KET/mixed-or-stereomarks.ket', page);
const expectedFile = await getKet(page);
await saveToFile('Ket/mixed-or-stereomarks-expected.ket', expectedFile);
await saveToFile('KET/mixed-or-stereomarks-expected.ket', expectedFile);

const { fileExpected: ketFileExpected, file: ketFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Ket/mixed-or-stereomarks-expected.ket',
'tests/test-data/KET/mixed-or-stereomarks-expected.ket',
});

expect(ketFile).toEqual(ketFileExpected);
Expand All @@ -392,7 +392,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: The '&1' and 'or1' and 'abs' stereo marks appear next to the selected stereocenter.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectLabelDisplayAtStereogenicCenters(page, 'Classic');
Expand All @@ -404,7 +404,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: The '&1' and 'or1' and 'abs' stereo marks appear next to the selected stereocenter.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectLabelDisplayAtStereogenicCenters(page, 'On');
Expand All @@ -416,7 +416,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: Only stereo flag displays near the structure.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectLabelDisplayAtStereogenicCenters(page, 'Off');
Expand All @@ -428,7 +428,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: When 'Off' is selected - Stereobonds and stereo labels are displayed in black.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectColorOfStereogenicCenters(page, 'Off');
Expand All @@ -440,7 +440,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: When 'Labels and Bonds' is selected - Stereobonds and stereo labels are displayed in color.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectColorOfStereogenicCenters(page, 'Labels and Bonds');
Expand All @@ -453,7 +453,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
and stereo labels are displayed in black.
*/
await openFileAndAddToCanvas(
'Ket/different-marks-stereostructure.ket',
'KET/different-marks-stereostructure.ket',
page,
);
await selectColorOfStereogenicCenters(page, 'Bonds Only');
Expand Down Expand Up @@ -559,7 +559,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
'Add to OR [ ] Group' setting becomes available when at least
one OR group has been created on the canvas.
*/
await openFileAndAddToCanvas('Ket/mixed-and-or-structure.ket', page);
await openFileAndAddToCanvas('KET/mixed-and-or-structure.ket', page);
await selectLeftPanelButton(LeftPanelButton.Stereochemistry, page);
});

Expand All @@ -569,7 +569,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: Labels (&) are colored and color intensity is decreasing with the number.
*/
await openFileAndAddToCanvas(
'Ket/mixed-with-eight-stereocenters.ket',
'KET/mixed-with-eight-stereocenters.ket',
page,
);
await takeEditorScreenshot(page);
Expand All @@ -592,7 +592,7 @@ test.describe('Enhanced Stereochemistry Tool', () => {
Description: Stereo flag - Mixed2
*/
await editMixedFlagText(page, 'Mixed2');
await openFileAndAddToCanvas('Ket/mixed-and-stereomarks.ket', page);
await openFileAndAddToCanvas('KET/mixed-and-stereomarks.ket', page);
});

test('No overlapping of Stereo flag and structure', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion ketcher-autotests/tests/Indigo-Tools/Layout/layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe('Indigo Tools - Layout', () => {
page,
}) => {
// Related Github issue: https://github.com/epam/ketcher/issues/3025
const structureWithStereoFlags = 'Ket/structure-with-stereo-flags.ket';
const structureWithStereoFlags = 'KET/structure-with-stereo-flags.ket';
await openFileWithShift(structureWithStereoFlags, page);
await selectTopPanelButton(TopPanelButton.Layout, page);
await selectTopPanelButton(TopPanelButton.Layout, page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ test.describe('Plus and Arrows tools ', () => {

test('open file', async ({ page }) => {
await openFileAndAddToCanvas(
'Ket/default-reaction-arrow-tool-saving.ket',
'KET/default-reaction-arrow-tool-saving.ket',
page,
);
});
Expand All @@ -467,7 +467,7 @@ test.describe('Plus and Arrows tools ', () => {

test('open file', async ({ page }) => {
await openFileAndAddToCanvas(
'Ket/non-default-reaction-arrow-tool-saving.ket',
'KET/non-default-reaction-arrow-tool-saving.ket',
page,
);
});
Expand Down Expand Up @@ -563,7 +563,10 @@ test.describe('Plus and Arrows tools ', () => {
await openFileAndAddToCanvas(`resizing-reaction-arrow-saving.rxn`, page);
await takeEditorScreenshot(page);
await selectTopPanelButton(TopPanelButton.Clear, page);
await openFileAndAddToCanvas(`resizing-reaction-arrow-saving.ket`, page);
await openFileAndAddToCanvas(
`KET/resizing-reaction-arrow-saving.ket`,
page,
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test.describe('Reagents CDXML format', () => {
Description: System detect molecule NH3 above arrow as reagent and write reagent in 'CDXML' format in "Preview" tab
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-nh3.ket',
'KET/benzene-arrow-benzene-reagent-nh3.ket',
page,
);

Expand All @@ -78,7 +78,7 @@ test.describe('Reagents CDXML format', () => {
Description: System detect molecule HCl below arrow as reagent and write reagent in 'CDXML' format in "Preview" tab
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-hcl.ket',
'KET/benzene-arrow-benzene-reagent-hcl.ket',
page,
);
await delay(DELAY_IN_SECONDS.THREE);
Expand All @@ -103,7 +103,7 @@ test.describe('Reagents CDXML format', () => {
Description: System detect text NH3 as reagent and write reagent in 'CDXML' format in "Preview" tab
*/
await openFileAndAddToCanvas(
'Ket/reagent-nh3-text-above-arrow.ket',
'KET/reagent-nh3-text-above-arrow.ket',
page,
);
await delay(DELAY_IN_SECONDS.THREE);
Expand All @@ -128,7 +128,7 @@ test.describe('Reagents CDXML format', () => {
Description: System detect text HCl below arrow as reagent and write reagent in 'CDXML' format in "Preview" tab
*/
await openFileAndAddToCanvas(
'Ket/reagent-hcl-text-below-arrow.ket',
'KET/reagent-hcl-text-below-arrow.ket',
page,
);
await delay(DELAY_IN_SECONDS.THREE);
Expand All @@ -150,7 +150,7 @@ test.describe('Reagents CDXML format', () => {
Description: File saved in format (e.g. "ketcher.cdxml")
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-nh3.ket',
'KET/benzene-arrow-benzene-reagent-nh3.ket',
page,
);
await delay(DELAY_IN_SECONDS.THREE);
Expand Down Expand Up @@ -183,7 +183,7 @@ test.describe('Reagents CDXML format', () => {
Description: File opens with the reagent NH3 on top of the arrow
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-nh3.ket',
'KET/benzene-arrow-benzene-reagent-nh3.ket',
page,
);
});
Expand All @@ -194,7 +194,7 @@ test.describe('Reagents CDXML format', () => {
Description: File opens with the reagent HCl below the arrow
*/
await openFileAndAddToCanvas(
'Ket/benzene-arrow-benzene-reagent-hcl.ket',
'KET/benzene-arrow-benzene-reagent-hcl.ket',
page,
);
});
Expand Down
Loading

0 comments on commit f3e01a9

Please sign in to comment.