Skip to content

Commit

Permalink
- updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rrodionov91 committed Oct 14, 2024
1 parent 000b2f0 commit 10926fc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,34 +109,31 @@ test.describe('CML files', () => {
expect(cmlFile).toEqual(cmlFileExpected);
});

test.fail(
'Open and Save file - CML - CML for R-group and other features',
async ({ page }) => {
/**
* Test case: EPMLSOPKET-1948
* Description: Saved cml file with structure is compering with paste R-group from a mol file
* It needs to be investigated why the test is failing.
* We have bug https://github.com/epam/Indigo/issues/2497
*/

await openFileAddToCanvasTakeScreenshot(
page,
'Molfiles-V2000/cml-1948-R-group.mol',
);
// check that structure opened from file is displayed correctly
test('Open and Save file - CML - CML for R-group and other features', async ({
page,
}) => {
/**
* Test case: EPMLSOPKET-1948
* Description: Saved cml file with structure is compering with paste R-group from a mol file
*/

const expectedFile = await getCml(page);
await saveToFile('CML/cml-1948-r-group-expected.cml', expectedFile);
const { file: cmlFile, fileExpected: cmlFileExpected } =
await receiveFileComparisonData({
page,
expectedFileName: 'tests/test-data/CML/cml-1948-r-group-expected.cml',
});
// comparing cml file with golden cml file
await openFileAddToCanvasTakeScreenshot(
page,
'Molfiles-V2000/cml-1948-R-group.mol',
);
// check that structure opened from file is displayed correctly

expect(cmlFile).toEqual(cmlFileExpected);
},
);
const expectedFile = await getCml(page);
await saveToFile('CML/cml-1948-r-group-expected.cml', expectedFile);
const { file: cmlFile, fileExpected: cmlFileExpected } =
await receiveFileComparisonData({
page,
expectedFileName: 'tests/test-data/CML/cml-1948-r-group-expected.cml',
});
// comparing cml file with golden cml file

expect(cmlFile).toEqual(cmlFileExpected);
});

test('Validate that unsplit nucleotides connected with peptides could be saved to CML file and loaded back', async ({
page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,35 +178,33 @@ test.describe('Save files', () => {
},
);

test.fail(
'Automatic selection of MDL Molfile v3000 encoding is work if the number of atoms (or bonds) exceeds 999',
async ({ page }) => {
/**
* IMPORTANT: Test fails because we have bug https://github.com/epam/Indigo/issues/2494
* Test case: EPMLSOPKET-5260
* Description: Structure is saved according to automated selected format MDL Molfile v3000
*/

await openFileAndAddToCanvas(
'Molfiles-V3000/structure-where-atoms-exceeds999.mol',
test('Automatic selection of MDL Molfile v3000 encoding is work if the number of atoms (or bonds) exceeds 999', async ({
page,
}) => {
/**
* Test case: EPMLSOPKET-5260
* Description: Structure is saved according to automated selected format MDL Molfile v3000
*/

await openFileAndAddToCanvas(
'Molfiles-V3000/structure-where-atoms-exceeds999.mol',
page,
);
const expectedFile = await getMolfile(page);
await saveToFile(
'Molfiles-V3000/structure-where-atoms-exceeds999-expected.mol',
expectedFile,
);
const METADATA_STRING_INDEX = [1];
const { fileExpected: molFileExpected, file: molFile } =
await receiveFileComparisonData({
page,
);
const expectedFile = await getMolfile(page);
await saveToFile(
'Molfiles-V3000/structure-where-atoms-exceeds999-expected.mol',
expectedFile,
);
const METADATA_STRING_INDEX = [1];
const { fileExpected: molFileExpected, file: molFile } =
await receiveFileComparisonData({
page,
expectedFileName:
'tests/test-data/Molfiles-V3000/structure-where-atoms-exceeds999-expected.mol',
metaDataIndexes: METADATA_STRING_INDEX,
});
expect(molFile).toEqual(molFileExpected);
},
);
expectedFileName:
'tests/test-data/Molfiles-V3000/structure-where-atoms-exceeds999-expected.mol',
metaDataIndexes: METADATA_STRING_INDEX,
});
expect(molFile).toEqual(molFileExpected);
});

test('The file formats in the Save Structure window match the mockup', async ({
page,
Expand Down

0 comments on commit 10926fc

Please sign in to comment.