Show keybinding on topbar dropdown menus (#1127)

* Show keybinding on topbar dropdown menus, resolve #1092

* Add text-muted to tailwind config

* Add Playwright test

* Preserve Primevue classes in menu item template

* Extend MenuItem

* Revert adding undo/redo to core keybindings

* Change test selector

* refactor

* Extract as component

* refactor

* nit

* fix extension API

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
bymyself
2024-10-06 09:08:16 -07:00
committed by GitHub
parent 1b3cc4de1a
commit 3c70c1e463
7 changed files with 159 additions and 80 deletions

View File

@@ -499,6 +499,16 @@ test.describe('Menu', () => {
})
expect(isTextCutoff).toBe(false)
})
test('Displays keybinding next to item', async ({ comfyPage }) => {
const workflowMenuItem =
await comfyPage.menu.topbar.getMenuItem('Workflow')
await workflowMenuItem.click()
const exportTag = comfyPage.page.locator('.keybinding-tag', {
hasText: 'Ctrl + s'
})
expect(await exportTag.count()).toBe(1)
})
})
// Only test 'Top' to reduce test time.