mirror of
https://github.com/heyman/heynote.git
synced 2025-06-27 21:12:00 +02:00
Add test for deleting a cstom key binding
This commit is contained in:
parent
1155b55533
commit
e7a4de23e7
@ -29,3 +29,30 @@ test("add custom key binding", async ({page}) => {
|
|||||||
await page.locator("body").press("Control+Shift+H")
|
await page.locator("body").press("Control+Shift+H")
|
||||||
await expect(page.locator("css=.language-selector .items > li.selected")).toBeVisible()
|
await expect(page.locator("css=.language-selector .items > li.selected")).toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test("delete custom key binding", async ({page}) => {
|
||||||
|
await page.locator("css=.status-block.settings").click()
|
||||||
|
await page.locator("css=.overlay .settings .dialog .sidebar li.tab-keyboard-bindings").click()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings")).toBeVisible()
|
||||||
|
await page.locator("css=.settings .tab-content.tab-keyboard-bindings .add-keybinding").click()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings .add-key-binding-dialog")).toBeVisible()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings .add-key-binding-dialog input.keys")).toBeFocused()
|
||||||
|
await page.locator("body").press("Control+Shift+H")
|
||||||
|
await page.locator("body").press("Enter")
|
||||||
|
await page.locator("body").pressSequentially("language")
|
||||||
|
await page.locator(".p-autocomplete-list li.p-autocomplete-option.p-focus").click()
|
||||||
|
await page.locator("css=.settings .tab-content.tab-keyboard-bindings .add-key-binding-dialog .save").click()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings table tr.keybind-user")).toHaveCount(1)
|
||||||
|
await page.locator("css=.overlay .settings .dialog .bottom-bar .close").click()
|
||||||
|
await page.locator("body").press("Control+Shift+H")
|
||||||
|
await expect(page.locator("css=.language-selector .items > li.selected")).toBeVisible()
|
||||||
|
|
||||||
|
await page.locator("css=.status-block.settings").click()
|
||||||
|
await page.locator("css=.overlay .settings .dialog .sidebar li.tab-keyboard-bindings").click()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings")).toBeVisible()
|
||||||
|
await page.locator("css=.settings .tab-content.tab-keyboard-bindings table tr.keybind-user .delete").click()
|
||||||
|
await expect(page.locator("css=.settings .tab-content.tab-keyboard-bindings table tr.keybind-user")).toHaveCount(0)
|
||||||
|
await page.locator("css=.overlay .settings .dialog .bottom-bar .close").click()
|
||||||
|
await page.locator("body").press("Control+Shift+H")
|
||||||
|
await expect(page.locator("css=.language-selector .items > li.selected")).toHaveCount(0)
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user