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:
Jakub Zych
2026-10-06 16:28:29 +02:00
parent 4e37d877f1
commit ef03016314
4 changed files with 86 additions and 10 deletions

View File

@@ -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'),