feat: editor language menu, title field, header actions, publish dialogs, read-only rendering and draft recovery

This commit is contained in:
Florian Sylvain committed 2026-11-02 17:13:14 +01:00
1 parent a671b81f80
commit 339e646eb8
85 files changed
+6369 -624

No files matched your search

+8 -6
View File
@@ -1,5 +1,5 @@
import { vi } from 'vitest'
import { defineComponent, h } from 'vue'
import { defineComponent, h, type Component } from 'vue'
import { flushPromises, mount, type VueWrapper } from '@vue/test-utils'
import { createPinia, setActivePinia } from 'pinia'
import { RouterView } from 'vue-router'
@@ -46,6 +46,8 @@ interface MountOptions {
role?: string
routes: Record<string, Route>
width?: number
userId?: number
root?: Component
}
export async function mountRoute(url: string, options: MountOptions) {
@@ -57,7 +59,7 @@ export async function mountRoute(url: string, options: MountOptions) {
session.session = {
verified: true,
username: 'marta',
id: 1,
id: options.userId ?? 1,
email: 'marta@renew.example',
displayName: 'Marta Alves',
access: accessFor(options.role ?? 'owner'),
@@ -85,10 +87,10 @@ export async function mountRoute(url: string, options: MountOptions) {
requestPaged: vi.fn(),
} as unknown as ReturnType<typeof useApi>)
await router.push(url)
kit.wrapper = mount(
defineComponent({ render: () => h(UApp, null, { default: () => h(RouterView) }) }),
{ attachTo: document.body, global: { plugins: [router, uiPlugin] } },
)
const root =
options.root ??
defineComponent({ render: () => h(UApp, null, { default: () => h(RouterView) }) })
kit.wrapper = mount(root, { attachTo: document.body, global: { plugins: [router, uiPlugin] } })
await settle()
}