fix(ui): fallback localization data was appearing in document (#11743)

This commit is contained in:
Jarrod Flesch
2025-03-17 16:09:01 -04:00
committed by GitHub
parent 8a51fe1a17
commit ebfb0eb014
4 changed files with 54 additions and 28 deletions

View File

@@ -556,6 +556,30 @@ describe('Localization', () => {
await cdpSession.detach()
})
test('should not show fallback data after saving data', async () => {
await page.goto(url.create)
await changeLocale(page, defaultLocale)
await page.locator('#field-title').fill(title)
await saveDocAndAssert(page)
await changeLocale(page, spanishLocale)
// POST data
await page.locator('#field-description').fill('non-localized description')
await saveDocAndAssert(page)
// POST updated data
await page.locator('#field-description').fill('non-localized description 2')
await saveDocAndAssert(page)
// The title should not have posted with a value
await expect
.poll(() => page.locator('#field-title').inputValue(), {
timeout: POLL_TOPASS_TIMEOUT,
})
.not.toBe(title)
})
})
test('should use label in search filter when string or object', async () => {