test(14.2.1-06): land remaining named tests and phase gate
WR-02 proofs and T-14.2.1-19..23 must fail the phase closed if hydration or child locale validation is removed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -61,6 +61,35 @@ describe('ML field registry and nested save body', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('sends every enabled locale including empty pl', () => {
|
||||
const fields = [field('mltext'), field('mlmarkdown', 'body')]
|
||||
const payload = editablePayload(fields, {
|
||||
title: { en: 'Hello', pl: '' },
|
||||
body: { en: '# Hi', pl: '' },
|
||||
})
|
||||
expect(payload).toEqual({
|
||||
title: { en: 'Hello', pl: '' },
|
||||
body: { en: '# Hi', pl: '' },
|
||||
})
|
||||
})
|
||||
|
||||
it('exposes one locale selector per ML field listing enabled locales', () => {
|
||||
const title = mlMount(MLTextField, {
|
||||
field: field('mltext'),
|
||||
modelValue: { en: '', pl: '' },
|
||||
controlId: 'f-title',
|
||||
})
|
||||
const body = mlMount(MLMarkdownField, {
|
||||
field: field('mlmarkdown', 'body'),
|
||||
modelValue: { en: '', pl: '' },
|
||||
controlId: 'f-body',
|
||||
})
|
||||
expect(title.findAll('[data-ml-locale]')).toHaveLength(1)
|
||||
expect(body.findAll('[data-ml-locale]')).toHaveLength(1)
|
||||
expect(title.findAll('[data-ml-locale] option').map((node) => node.text())).toEqual(['en', 'pl'])
|
||||
expect(body.findAll('[data-ml-locale] option').map((node) => node.text())).toEqual(['en', 'pl'])
|
||||
})
|
||||
|
||||
it('edits the active locale and copies from another', async () => {
|
||||
const wrapper = mlMount(MLTextField, {
|
||||
field: field('mltext'),
|
||||
|
||||
Reference in New Issue
Block a user