test(quick-261016-0fm): theme switch, language switcher and footer offset

- theme: light and dark ignore prefers-color-scheme, choices and guard
- i18n: ?locale= only with a preference, availableLocales from meta
- usePreferences: cache validation, cycle order and PUT bodies, revert
  with a danger toast, profile apply, setLocale save, cache and reload
- rail theme button, user menu language group, --shell-offset and the
  form save bar offset; fixture strings and resetState theme reset
This commit is contained in:
Jakub Zych
2026-10-16 11:48:39 +02:00
parent 119f1f8d54
commit f0ab26b93f
9 changed files with 416 additions and 7 deletions

View File

@@ -49,6 +49,15 @@ afterEach(() => {
enableAutoUnmount(afterEach)
describe('form view', () => {
it('starts the save bar at the sidebar edge so the rail stays uncovered', async () => {
const { wrapper } = await mountApp('/acme/demo/widgets/1', routes())
const footer = wrapper.get('footer')
expect(footer.classes()).toContain('left-[var(--shell-offset,0px)]')
expect(footer.classes()).toContain('right-0')
expect(footer.classes()).not.toContain('inset-x-0')
expect(footer.element.closest<HTMLElement>('[style*="--shell-offset"]')).not.toBeNull()
})
it('is the component of the record and create routes', async () => {
const { wrapper } = await mountApp('/acme/demo/widgets/1', routes())
expect(wrapper.findComponent(FormView).exists()).toBe(true)