test(16.2-06): admin SPA coverage of plugin field types and View site

- fieldTypes: one load per script URL, failed and refused scripts
  reported, global styles enabled on every screen, empty list on failure
- registry, formState, FormField and ListView: plugin renderers, locale
  maps, notices as literal text, unknown column types as text
- AppShell: the View site link's href, target, rel and en/pl label
This commit is contained in:
2026-10-10 16:03:07 +02:00
parent 3404a4b3ad
commit 9f5e807af6
6 changed files with 322 additions and 0 deletions

View File

@@ -143,6 +143,21 @@ describe('list view', () => {
})
})
describe('plugin field type columns (Phase 16.2)', () => {
it('renders the row value of a column type it does not know as plain text', async () => {
const schema = schemaWith((data) => {
const code = data.columns.find((column) => column.key === 'code')!
;(code as { type?: string }).type = 'blogeditor'
})
const rows = clone(listFixture)
;(rows.data[0] as Record<string, unknown>).code = '<b>Grzyby</b> rosną'
const { wrapper } = await mountApp('/acme/demo/widgets', routes({ [`GET ${BASE}/schema/list`]: schema, [`GET ${BASE}`]: { body: rows } }))
const cell = wrapper.findAll('tbody tr')[0]!.findAll('td').find((td) => td.text().includes('Grzyby'))
expect(cell?.text()).toBe('<b>Grzyby</b> rosną')
expect(cell?.find('b').exists()).toBe(false)
})
})
describe('list view extension points (Phase 10.1, D-03, D-11, D-12, D-14)', () => {
const STATS = `${BASE}/partials/stats`
const RECOUNT = `${BASE}/toolbar/recount`