perf: ensure unnecessary config translations are not sent to the client (#10524)

This will reduce the size of the initial HTML
This commit is contained in:
Alessio Gravili
2025-01-15 13:22:32 -07:00
committed by GitHub
parent 813e70be1f
commit 3fb6ac3ca4
5 changed files with 31 additions and 24 deletions

View File

@@ -1278,6 +1278,18 @@ describe('lexicalMain', () => {
})
describe('localization', () => {
test('ensure lexical translations from other languages do not get sent to the client', async () => {
await navigateToLexicalFields()
// Now check if the html contains "Comience a escribir"
const htmlContent = await page.content()
// Check if the HTML contains "Comience a escribir"
expect(htmlContent).not.toContain('Comience a escribir')
expect(htmlContent).not.toContain('Beginne zu tippen oder')
expect(htmlContent).not.toContain('Cargando...')
expect(htmlContent).toContain('Start typing, or press')
})
test.skip('ensure simple localized lexical field works', async () => {
await navigateToLexicalFields(true, true)
})