Re-enable keybinding jest test (#2090)

This commit is contained in:
Chenlei Hu
2024-12-29 14:55:18 -05:00
committed by GitHub
parent 773059da93
commit 95a4623c37
6 changed files with 65 additions and 68 deletions

View File

@@ -135,12 +135,14 @@ import { useToast } from 'primevue/usetoast'
import { FilterMatchMode } from '@primevue/core/api'
import { useI18n } from 'vue-i18n'
import { normalizeI18nKey } from '@/utils/formatUtil'
import { useKeybindingService } from '@/services/keybindingService'
const filters = ref({
global: { value: '', matchMode: FilterMatchMode.CONTAINS }
})
const keybindingStore = useKeybindingStore()
const keybindingService = useKeybindingService()
const commandStore = useCommandStore()
const { t } = useI18n()
@@ -204,7 +206,7 @@ watchEffect(() => {
function removeKeybinding(commandData: ICommandData) {
if (commandData.keybinding) {
keybindingStore.unsetKeybinding(commandData.keybinding)
keybindingStore.persistUserKeybindings()
keybindingService.persistUserKeybindings()
}
}
@@ -228,7 +230,7 @@ function saveKeybinding() {
})
)
if (updated) {
keybindingStore.persistUserKeybindings()
keybindingService.persistUserKeybindings()
}
}
cancelEdit()
@@ -237,7 +239,7 @@ function saveKeybinding() {
const toast = useToast()
async function resetKeybindings() {
keybindingStore.resetKeybindings()
await keybindingStore.persistUserKeybindings()
await keybindingService.persistUserKeybindings()
toast.add({
severity: 'info',
summary: 'Info',