-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4acb0a
commit 18e6b4a
Showing
6 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...ts/tests/Macromolecule-editor/Sequence-Mode/sequence-mode-selection-for-view-mode.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,51 @@ | ||
import { test } from '@playwright/test'; | ||
import { | ||
takeEditorScreenshot, | ||
waitForPageInit, | ||
openFileAndAddToCanvas, | ||
selectSequenceLayoutModeTool, | ||
zoomWithMouseWheel, | ||
scrollDown, | ||
selectRectangleArea, | ||
} from '@utils'; | ||
import { turnOnMacromoleculesEditor } from '@utils/macromolecules'; | ||
|
||
test.describe('Sequence Mode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await waitForPageInit(page); | ||
await turnOnMacromoleculesEditor(page); | ||
const ZOOM_OUT_VALUE = 400; | ||
const SCROLL_DOWN_VALUE = 250; | ||
|
||
await openFileAndAddToCanvas('KET/monomers-chains.ket', page); | ||
await selectSequenceLayoutModeTool(page); | ||
await zoomWithMouseWheel(page, ZOOM_OUT_VALUE); | ||
await scrollDown(page, SCROLL_DOWN_VALUE); | ||
}); | ||
|
||
test('Select letters with rectangular selection tool', async ({ page }) => { | ||
// Coordinates for rectangle selection | ||
const startX = 100; | ||
const startY = 100; | ||
const endX = 500; | ||
const endY = 500; | ||
|
||
await selectRectangleArea(page, startX, startY, endX, endY); | ||
await takeEditorScreenshot(page); | ||
}); | ||
|
||
test('Select letters with Shift+Lclick', async ({ page }) => { | ||
await page.keyboard.down('Shift'); | ||
await page.getByText('G').first().click(); | ||
await page.getByText('T').first().click(); | ||
await page.keyboard.up('Shift'); | ||
await takeEditorScreenshot(page); | ||
}); | ||
|
||
test('Select entire chain with Ctrl+Lclick', async ({ page }) => { | ||
await page.keyboard.down('Control'); | ||
await page.getByText('G').first().click(); | ||
await page.keyboard.up('Control'); | ||
await takeEditorScreenshot(page); | ||
}); | ||
}); |
Binary file added
BIN
+27 KB
...apshots/Sequence-Mode-Select-entire-chain-with-Ctrl-Lclick-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
+26.7 KB
...s-snapshots/Sequence-Mode-Select-letters-with-Shift-Lclick-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
+31.8 KB
...quence-Mode-Select-letters-with-rectangular-selection-tool-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.
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
2 changes: 1 addition & 1 deletion
2
packages/ketcher-core/src/application/render/renderers/sequence/BaseSequenceRenderer.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