Skip to content

Commit

Permalink
#3168 - fix comments to mr
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Mazurina committed Aug 31, 2023
1 parent 7dbbcc1 commit 064e51d
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,38 +559,41 @@ test.describe('', () => {
await takeEditorScreenshot(page);
});

test('Open and Save files - V3000 mol file contains different Bond properties', async ({
page,
}) => {
/**
* Test case: EPMLSOPKET-1853
* Description: Structre is correctly generated from Molstring and vise versa molstring is correctly generated from structure.
* A file with V3000 format is resaved in V2000 format
*/
test.fixme(
'Open and Save files - V3000 mol file contains different Bond properties',
async ({ page }) => {
/**
* Test case: EPMLSOPKET-1853
* Description: Structre is correctly generated from Molstring and vise versa molstring is correctly generated from structure.
* A file with V3000 format is resaved in V2000 format
*
* Now we can`t open the file - `Convert error! Cannot deserialize input JSON.`
*/

await openFileAndAddToCanvas(
'Molfiles-V3000/marvin-bond-properties-V3000(1).mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V3000/marvin-bond-properties-V3000(1).mol',
page,
);

const expectedFile = await getMolfile(page, 'v2000');
await saveToFile(
'Molfiles-V2000/marvin-bond-properties-V3000-expected.mol',
expectedFile,
);
const expectedFile = await getMolfile(page, 'v2000');
await saveToFile(
'Molfiles-V2000/marvin-bond-properties-V3000-expected.mol',
expectedFile,
);

const METADATA_STRING_INDEX = [1];
const { fileExpected: molFileExpected, file: molFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Molfiles-V2000/marvin-bond-properties-V3000-expected.mol',
fileFormat: 'v2000',
metaDataIndexes: METADATA_STRING_INDEX,
});
const METADATA_STRING_INDEX = [1];
const { fileExpected: molFileExpected, file: molFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Molfiles-V2000/marvin-bond-properties-V3000-expected.mol',
fileFormat: 'v2000',
metaDataIndexes: METADATA_STRING_INDEX,
});

expect(molFile).toEqual(molFileExpected);
});
expect(molFile).toEqual(molFileExpected);
},
);

test('Open and Save file - Open/Save Alias and Pseudoatoms 1/2 - open', async ({
page,
Expand Down Expand Up @@ -811,48 +814,24 @@ test.describe('', () => {
expect(molFile).toEqual(molFileExpected);
});

test('Open and Save file - Open/Save files for ferrocen-like structures 1/2 - open', async ({
page,
}) => {
/**
* Test case: EPMLSOPKET-1893(1)
* Description: Structures are rendered correctly
*/

await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical01.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical02.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical03.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical04.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical05.mol',
for (let i = 1; i < 9; i++) {
test(`'Open and Save file - Open/Save files for ferrocen-like structures 1/2 - open ferrocene_radical0${i}.mol`, async ({
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical06.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical07.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical08.mol',
page,
);
await takeEditorScreenshot(page);
});
}) => {
/**
* Test case: EPMLSOPKET-1893(1)
* Description: Structures are rendered correctly
*/

await openFileAndAddToCanvas(
`Molfiles-V2000/ferrocene_radical0${i}.mol`,
page,
);
await takeEditorScreenshot(page);
await page.keyboard.press('Control+a');
await page.keyboard.press('Delete');
});
}

test('Open and Save file - Open/Save files for ferrocen-like structures 2/2 - save', async ({
page,
Expand All @@ -862,38 +841,12 @@ test.describe('', () => {
* Description: Structures are rendered correctly.
* */

await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical01.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical02.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical03.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical04.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical05.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical06.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical07.mol',
page,
);
await openFileAndAddToCanvas(
'Molfiles-V2000/ferrocene_radical08.mol',
page,
);
for (let i = 1; i < 9; i++) {
await openFileAndAddToCanvas(
`Molfiles-V2000/ferrocene_radical0${i}.mol`,
page,
);
}

const expectedFile = await getMolfile(page, 'v2000');
await saveToFile(
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
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.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Ketcher 8252315342D 1 1.00000 0.00000 0
Ketcher 83123 9 32D 1 1.00000 0.00000 0

179250 0 0 1 0 0 0 0 0999 V2000
11.7482 -1.1855 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0
Expand Down

0 comments on commit 064e51d

Please sign in to comment.