diff --git a/ui/src/__tests__/bug-report-dialog.test.js b/ui/src/__tests__/bug-report-dialog.test.js new file mode 100644 index 0000000..1b305ed --- /dev/null +++ b/ui/src/__tests__/bug-report-dialog.test.js @@ -0,0 +1,121 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest' +import { mount } from '@vue/test-utils' +import { createPinia, setActivePinia } from 'pinia' +import { nextTick } from 'vue' +import { useAuthStore, useAppStore, useI18nStore } from '@ligoj/host' +import BugReportDialog from '../components/BugReportDialog.vue' +import enMessages from '../i18n/en.js' + +// Moved from the host (#121): the dialog now self-binds to app.bugDialogOpen +// instead of a modelValue prop, and its bugReport.* labels live in plugin-ui's +// i18n bundle (merged into the shared store here so `t()` resolves to English). +// Vuetify is externalized in the plugin build, so we stub v-dialog (render its +// slot inline) and v-icon rather than installing the real plugin. +const stubs = { + 'v-dialog': { template: '
{{ t('agreement.text') }}
+{{ t('bugReport.hint') }}
+{{ t('error.401-details') || 'Votre session a expiré. Reconnectez-vous pour continuer.' }}
+Ligoj
+{{ licenseText }}