mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 21:25:20 +03:00
Backspace and delete delete nodes (#10075)
This commit is contained in:
parent
adfe2dbab4
commit
b45e9e9c54
@ -67,3 +67,23 @@ test('Selecting nodes by area drag', async ({ page }) => {
|
||||
await expect(node1).toBeSelected()
|
||||
await expect(node2).toBeSelected()
|
||||
})
|
||||
|
||||
test('Deleting selected node with backspace key', async ({ page }) => {
|
||||
await actions.goToGraph(page)
|
||||
|
||||
const nodesCount = await locate.graphNode(page).count()
|
||||
const deletedNode = locate.graphNodeByBinding(page, 'final')
|
||||
await deletedNode.click()
|
||||
await page.keyboard.press('Backspace')
|
||||
await expect(locate.graphNode(page)).toHaveCount(nodesCount - 1)
|
||||
})
|
||||
|
||||
test('Deleting selected node with delete key', async ({ page }) => {
|
||||
await actions.goToGraph(page)
|
||||
|
||||
const nodesCount = await locate.graphNode(page).count()
|
||||
const deletedNode = locate.graphNodeByBinding(page, 'final')
|
||||
await deletedNode.click()
|
||||
await page.keyboard.press('Delete')
|
||||
await expect(locate.graphNode(page)).toHaveCount(nodesCount - 1)
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export const componentBrowserBindings = defineKeybinds('component-browser', {
|
||||
export const graphBindings = defineKeybinds('graph-editor', {
|
||||
openComponentBrowser: ['Enter'],
|
||||
toggleVisualization: ['Space'],
|
||||
deleteSelected: ['OsDelete'],
|
||||
deleteSelected: ['Delete', 'Backspace'],
|
||||
zoomToSelected: ['Mod+Shift+A'],
|
||||
selectAll: ['Mod+A'],
|
||||
deselectAll: ['Escape'],
|
||||
|
Loading…
Reference in New Issue
Block a user