-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* added tests&scrshots * minor upd * updated mask&scrshot * minor upd * deleted comment
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
ketcher-autotests/tests/File-Management/Open-And-Save-Files/open-save-files.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { | ||
TopPanelButton, | ||
selectTopPanelButton, | ||
takeEditorScreenshot, | ||
waitForPageInit, | ||
} from '@utils'; | ||
|
||
test.describe('Open Ketcher', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await waitForPageInit(page); | ||
}); | ||
|
||
test('Open button tooltip', async ({ page }) => { | ||
// Test case: EPMLSOPKET-1833 | ||
const button = page.getByTestId('open-file-button'); | ||
await expect(button).toHaveAttribute('title', 'Open... (Ctrl+O)'); | ||
}); | ||
|
||
test('Open button UI', async ({ page }) => { | ||
// Test case: EPMLSOPKET-1834 | ||
await selectTopPanelButton(TopPanelButton.Open, page); | ||
await takeEditorScreenshot(page); | ||
}); | ||
|
||
test('Save button tooltip', async ({ page }) => { | ||
// Test case: EPMLSOPKET-1842 | ||
const button = page.getByTestId('save-file-button'); | ||
await expect(button).toHaveAttribute('title', 'Save as... (Ctrl+S)'); | ||
}); | ||
|
||
test('Save button UI', async ({ page }) => { | ||
// Test case: EPMLSOPKET-1843 | ||
await selectTopPanelButton(TopPanelButton.Save, page); | ||
await takeEditorScreenshot(page, { | ||
masks: [page.getByTestId('mol-preview-area-text')], | ||
}); | ||
}); | ||
|
||
const fileFormats = [ | ||
'Ket Format-option', | ||
'MDL Molfile V2000-option', | ||
'MDL Molfile V3000-option', | ||
'SDF V2000-option', | ||
'SDF V3000-option', | ||
'Daylight SMARTS-option', | ||
'Extended SMILES-option', | ||
'CML-option', | ||
'InChI-option', | ||
'InChI AuxInfo-option', | ||
'InChIKey-option', | ||
'SVG Document-option', | ||
'PNG Image-option', | ||
'CDXML-option', | ||
'Base64 CDX-option', | ||
'CDX-option', | ||
]; | ||
for (const fileFormat of fileFormats) { | ||
test(`dropdown options check_${fileFormat}`, async ({ page }) => { | ||
await selectTopPanelButton(TopPanelButton.Save, page); | ||
await page.getByRole('button', { name: 'MDL Molfile V2000' }).click(); | ||
const option = page.getByTestId(fileFormat); | ||
await expect(option).toBeVisible(); | ||
}); | ||
} | ||
}); |
Binary file added
BIN
+35.5 KB
...n-save-files.spec.ts-snapshots/Open-Ketcher-Open-button-UI-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.6 KB
...n-save-files.spec.ts-snapshots/Open-Ketcher-Save-button-UI-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.