Skip to content

Commit

Permalink
Autotests: #5558 - Add ambiguous monomers to the library and allow th…
Browse files Browse the repository at this point in the history
…eir addition to the canvas - Case 16(1-5)
  • Loading branch information
AlexeyGirin committed Sep 30, 2024
1 parent c33bd07 commit 6dc2b37
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,176 @@ test.describe('Import-Saving .seq Files', () => {
await zoomWithMouseWheel(page, 400);
},
);

test(
'Saving ambiguous peptides (with mapping) in FASTA format',
{ tag: ['@IncorrectResultBecauseOfBug'] },
async ({ page }) => {
/*
Test task: https://github.com/epam/ketcher/issues/5558
Description: 16.1 Verify saving ambiguous peptides (with mapping) in FASTA format (macro mode)
Case: 1. Load ambiguous peptides (that have mapping to library) from KET
2. Take screenshot to make sure monomers on the canvas
3. Open Save dialog and choose FASTA option
4. Take screenshot to make sure export is correct
*/
await openFileAndAddToCanvasAsNewProjectMacro(
'KET/Ambiguous-monomers/Peptides (that have mapping to library).ket',
page,
);

await zoomWithMouseWheel(page, -600);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Save, page);
await chooseFileFormat(page, 'FASTA');
await takeEditorScreenshot(page);

test.fixme(
true,
`That test fails because of https://github.com/epam/Indigo/issues/2435 issue.`,
);

await pressButton(page, 'Cancel');
await zoomWithMouseWheel(page, 600);
},
);

test(
'Saving ambiguous peptides (without mapping) in FASTA format',
{ tag: ['@IncorrectResultBecauseOfBug'] },
async ({ page }) => {
/*
Test task: https://github.com/epam/ketcher/issues/5558
Description: 16.2 Verify saving ambiguous peptides (without mapping) in FASTA format (macro mode)
Case: 1. Load ambiguous peptides (that have mapping to library) from KET
2. Take screenshot to make sure monomers on the canvas
3. Open Save dialog and choose FASTA option
(Error should occure)
4. Take screenshot to make sure export is correct
*/
await openFileAndAddToCanvasAsNewProjectMacro(
'KET/Ambiguous-monomers/Peptides (that have no mapping to library).ket',
page,
);

await zoomWithMouseWheel(page, -200);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Save, page);
await chooseFileFormat(page, 'FASTA');
await takeEditorScreenshot(page);

await closeErrorMessage(page);

await pressButton(page, 'Cancel');
await zoomWithMouseWheel(page, 200);
test.fixme(
true,
`That test fails because of https://github.com/epam/Indigo/issues/2435, https://github.com/epam/Indigo/issues/2436 issue.`,
);
},
);

test(
'Saving ambiguous DNA bases (with mapping) in FASTA format',
{ tag: ['@IncorrectResultBecauseOfBug'] },
async ({ page }) => {
/*
Test task: https://github.com/epam/ketcher/issues/5558
Description: 16.3 Verify saving ambiguous DNA bases (with mapping) in FASTA format (macro mode)
Case: 1. Load ambiguous bases (that have mapping to library) from KET
2. Take screenshot to make sure monomers on the canvas
3. Open Save dialog and choose FASTA option
4. Take screenshot to make sure export is correct
*/
await openFileAndAddToCanvasAsNewProjectMacro(
'KET/Ambiguous-monomers/Ambiguous DNA Bases (alternatives and mixed).ket',
page,
);

await zoomWithMouseWheel(page, -100);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Save, page);
await chooseFileFormat(page, 'Sequence');
await takeEditorScreenshot(page);

test.fixme(
true,
`That test fails because of https://github.com/epam/Indigo/issues/2435 issue.`,
);

await pressButton(page, 'Cancel');
await zoomWithMouseWheel(page, 100);
},
);

test(
'Saving ambiguous RNA bases (with mapping) in FASTA format',
{ tag: ['@IncorrectResultBecauseOfBug'] },
async ({ page }) => {
/*
Test task: https://github.com/epam/ketcher/issues/5558
Description: 16.4 Verify saving ambiguous RNA bases (with mapping) in FASTA format (macro mode)
Case: 1. Load ambiguous bases (that have mapping to library) from KET
2. Take screenshot to make sure monomers on the canvas
3. Open Save dialog and choose Sequence option
4. Take screenshot to make sure export is correct
*/
await openFileAndAddToCanvasAsNewProjectMacro(
'KET/Ambiguous-monomers/Ambiguous RNA Bases (alternatives and mixed).ket',
page,
);

await zoomWithMouseWheel(page, -100);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Save, page);
await chooseFileFormat(page, 'FASTA');
await takeEditorScreenshot(page);

test.fixme(
true,
`That test fails because of https://github.com/epam/Indigo/issues/2435 issue.`,
);

await pressButton(page, 'Cancel');
await zoomWithMouseWheel(page, 100);
},
);

test(
'Saving ambiguous (common) bases (with mapping) in FASTA format',
{ tag: ['@IncorrectResultBecauseOfBug'] },
async ({ page }) => {
/*
Test task: https://github.com/epam/ketcher/issues/5558
Description: 16.5 Verify saving ambiguous (common) bases (with mapping) in FASTA format (macro mode)
Case: 1. Load ambiguous bases (that have mapping to library) from KET
2. Take screenshot to make sure monomers on the canvas
3. Open Save dialog and choose FASTA option
4. Take screenshot to make sure export is correct
*/
await openFileAndAddToCanvasAsNewProjectMacro(
'KET/Ambiguous-monomers/Ambiguous (common) Bases (alternatives and mixed).ket',
page,
);

await zoomWithMouseWheel(page, -400);
await takeEditorScreenshot(page);

await selectTopPanelButton(TopPanelButton.Save, page);
await chooseFileFormat(page, 'Sequence');
await takeEditorScreenshot(page);

test.fixme(
true,
`That test fails because of https://github.com/epam/Indigo/issues/2435 issue.`,
);

await pressButton(page, 'Cancel');
await zoomWithMouseWheel(page, 400);
},
);
});
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.
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.

0 comments on commit 6dc2b37

Please sign in to comment.