@squiz/dx-page-contents-lib 1.76.1 → 1.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -963,6 +963,173 @@ describe('renderLayout', () => {
963
963
  </div>
964
964
  </div>`));
965
965
  });
966
+ describe('with language translation', () => {
967
+ const langConfig = {
968
+ ...config,
969
+ lang: {
970
+ code: 'fr',
971
+ fallbackToDefault: true,
972
+ },
973
+ };
974
+ it('should render translated fragment nodes', async () => {
975
+ const layout = new mocks_1.PageSingleColumLayoutBuilder()
976
+ .addNode({
977
+ nodeId: (0, crypto_1.randomUUID)(),
978
+ type: 'fragment',
979
+ children: [
980
+ {
981
+ type: 'text',
982
+ value: 'English text',
983
+ nodeId: (0, crypto_1.randomUUID)(),
984
+ },
985
+ ],
986
+ i18n: {
987
+ fr: {
988
+ children: [
989
+ {
990
+ type: 'text',
991
+ value: 'French text',
992
+ },
993
+ ],
994
+ },
995
+ },
996
+ })
997
+ .build();
998
+ const result = await (0, page_contents_lib_1.renderLayout)(layout, langConfig);
999
+ expect(normalizeHtml(result)).toBe(normalizeHtml('<div class="container">French text</div>'));
1000
+ });
1001
+ it('should render translated component nodes', async () => {
1002
+ const layout = new mocks_1.PageSingleColumLayoutBuilder()
1003
+ .addNode({
1004
+ nodeId: (0, crypto_1.randomUUID)(),
1005
+ type: 'component',
1006
+ componentId: 'test/component/1.0.0',
1007
+ componentSet: 'test-set',
1008
+ componentType: 'server',
1009
+ contentItem: { id: 'en-content' },
1010
+ i18n: {
1011
+ fr: { id: 'fr-content' },
1012
+ },
1013
+ })
1014
+ .build();
1015
+ const result = await (0, page_contents_lib_1.renderLayout)(layout, langConfig);
1016
+ expect(normalizeHtml(result)).toBe(normalizeHtml(`<div class="container"><esi:include src="${config.componentRootUrl}/r/test/component/1.0.0?_componentSet=test-set&_contentItemId=fr-content"/></div>`));
1017
+ });
1018
+ it('should render mixed translated and untranslated nodes', async () => {
1019
+ const layout = new mocks_1.PageSingleColumLayoutBuilder()
1020
+ .addNode({
1021
+ // Translated fragment
1022
+ nodeId: (0, crypto_1.randomUUID)(),
1023
+ type: 'fragment',
1024
+ children: [
1025
+ {
1026
+ type: 'text',
1027
+ value: 'English text',
1028
+ nodeId: (0, crypto_1.randomUUID)(),
1029
+ },
1030
+ ],
1031
+ i18n: {
1032
+ fr: {
1033
+ children: [
1034
+ {
1035
+ type: 'text',
1036
+ value: 'French text',
1037
+ },
1038
+ ],
1039
+ },
1040
+ },
1041
+ })
1042
+ .addNode({
1043
+ // Untranslated component
1044
+ nodeId: (0, crypto_1.randomUUID)(),
1045
+ type: 'component',
1046
+ componentId: 'test/component/1.0.0',
1047
+ componentSet: 'test-set',
1048
+ componentType: 'server',
1049
+ contentItem: { id: 'en-content' },
1050
+ })
1051
+ .build();
1052
+ const result = await (0, page_contents_lib_1.renderLayout)(layout, langConfig);
1053
+ expect(normalizeHtml(result)).toBe(normalizeHtml(`<div class="container">French text<esi:include src="${config.componentRootUrl}/r/test/component/1.0.0?_componentSet=test-set&_contentItemId=en-content"/></div>`));
1054
+ });
1055
+ it('should render developer layout with translated content', async () => {
1056
+ const developerLayoutNode = {
1057
+ type: 'layout',
1058
+ nodeId: (0, crypto_1.randomUUID)(),
1059
+ layout: {
1060
+ template: '<div class="top">{{top}}</div><div class="side">{{side}}</div>',
1061
+ name: 'article-layout',
1062
+ options: {},
1063
+ },
1064
+ content: {
1065
+ top: [
1066
+ {
1067
+ type: 'component',
1068
+ nodeId: (0, crypto_1.randomUUID)(),
1069
+ componentId: 'test/component/1.0.0',
1070
+ componentSet: 'test-set',
1071
+ componentType: 'server',
1072
+ contentItem: { id: 'en-top' },
1073
+ i18n: {
1074
+ fr: { id: 'fr-top' },
1075
+ },
1076
+ },
1077
+ ],
1078
+ side: [
1079
+ {
1080
+ type: 'component',
1081
+ nodeId: (0, crypto_1.randomUUID)(),
1082
+ componentId: 'test/component/1.0.0',
1083
+ componentSet: 'test-set',
1084
+ componentType: 'server',
1085
+ contentItem: { id: 'en-side' },
1086
+ i18n: {
1087
+ fr: { id: 'fr-side' },
1088
+ },
1089
+ },
1090
+ ],
1091
+ },
1092
+ };
1093
+ const layout = new mocks_1.PageSingleColumLayoutBuilder().addNode(developerLayoutNode).build();
1094
+ const result = await (0, page_contents_lib_1.renderLayout)(layout, langConfig);
1095
+ expect(normalizeHtml(result)).toBe(normalizeHtml(`<div class="container">
1096
+ <div class="top">
1097
+ <esi:include src="${config.componentRootUrl}/r/test/component/1.0.0?_componentSet=test-set&_contentItemId=fr-top"/>
1098
+ </div>
1099
+ <div class="side">
1100
+ <esi:include src="${config.componentRootUrl}/r/test/component/1.0.0?_componentSet=test-set&_contentItemId=fr-side"/>
1101
+ </div>
1102
+ </div>`));
1103
+ });
1104
+ it('should render layout with no translations when language config is missing', async () => {
1105
+ const layout = new mocks_1.PageSingleColumLayoutBuilder()
1106
+ .addNode({
1107
+ nodeId: (0, crypto_1.randomUUID)(),
1108
+ type: 'fragment',
1109
+ children: [
1110
+ {
1111
+ type: 'text',
1112
+ value: 'English text',
1113
+ nodeId: (0, crypto_1.randomUUID)(),
1114
+ },
1115
+ ],
1116
+ i18n: {
1117
+ fr: {
1118
+ children: [
1119
+ {
1120
+ type: 'text',
1121
+ value: 'French text',
1122
+ nodeId: (0, crypto_1.randomUUID)(),
1123
+ },
1124
+ ],
1125
+ },
1126
+ },
1127
+ })
1128
+ .build();
1129
+ const result = await (0, page_contents_lib_1.renderLayout)(layout, config); // Using config without lang
1130
+ expect(normalizeHtml(result)).toBe(normalizeHtml('<div class="container">English text</div>'));
1131
+ });
1132
+ });
966
1133
  });
967
1134
  describe('Helper functions', () => {
968
1135
  it('isDeveloperDefinedLayoutNode returns true for valid developer layouts', () => {
@@ -1004,4 +1171,541 @@ describe('Helper functions', () => {
1004
1171
  expect((0, page_contents_lib_1.isCustomLayout)(layout)).toEqual(false);
1005
1172
  });
1006
1173
  });
1174
+ describe('translateLanguageNodes', () => {
1175
+ const config = {
1176
+ componentRootUrl: 'https://mock.url/__dxp/service/components-render',
1177
+ lang: {
1178
+ code: 'fr',
1179
+ fallbackToDefault: true,
1180
+ },
1181
+ };
1182
+ it('should return early if no language config is provided', () => {
1183
+ const layout = {
1184
+ name: 'layout-raw',
1185
+ content: {
1186
+ main: [
1187
+ {
1188
+ nodeId: (0, crypto_1.randomUUID)(),
1189
+ type: 'fragment',
1190
+ children: [
1191
+ {
1192
+ type: 'text',
1193
+ value: 'English text',
1194
+ nodeId: '123',
1195
+ },
1196
+ ],
1197
+ i18n: {
1198
+ fr: {
1199
+ children: [
1200
+ {
1201
+ type: 'text',
1202
+ value: 'French text',
1203
+ },
1204
+ ],
1205
+ },
1206
+ },
1207
+ },
1208
+ ],
1209
+ },
1210
+ };
1211
+ const configWithoutLang = { ...config, lang: undefined };
1212
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, configWithoutLang);
1213
+ expect(layout.content.main[0].children[0].value).toBe('English text');
1214
+ });
1215
+ it('should translate fragment nodes when translation is available', () => {
1216
+ const layout = {
1217
+ name: 'layout-raw',
1218
+ content: {
1219
+ main: [
1220
+ {
1221
+ nodeId: (0, crypto_1.randomUUID)(),
1222
+ type: 'fragment',
1223
+ children: [
1224
+ {
1225
+ type: 'text',
1226
+ value: 'English text',
1227
+ nodeId: (0, crypto_1.randomUUID)(),
1228
+ },
1229
+ ],
1230
+ i18n: {
1231
+ fr: {
1232
+ children: [
1233
+ {
1234
+ type: 'text',
1235
+ value: 'French text',
1236
+ nodeId: (0, crypto_1.randomUUID)(),
1237
+ },
1238
+ ],
1239
+ },
1240
+ },
1241
+ },
1242
+ ],
1243
+ },
1244
+ };
1245
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1246
+ expect(layout.content.main[0].children[0].value).toBe('French text');
1247
+ });
1248
+ it('should translate component nodes when translation is available', () => {
1249
+ const layout = {
1250
+ name: 'layout-raw',
1251
+ content: {
1252
+ main: [
1253
+ {
1254
+ nodeId: (0, crypto_1.randomUUID)(),
1255
+ type: 'component',
1256
+ componentId: 'test/component/1.0.0',
1257
+ componentSet: 'test-set',
1258
+ componentType: 'edge',
1259
+ contentItem: { id: 'en-content' },
1260
+ i18n: {
1261
+ fr: { id: 'fr-content' },
1262
+ },
1263
+ },
1264
+ ],
1265
+ },
1266
+ };
1267
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1268
+ expect(layout.content.main[0].contentItem.id).toBe('fr-content');
1269
+ });
1270
+ it('should fallback to default content when translation is not available and fallback is enabled', () => {
1271
+ const layout = {
1272
+ name: 'layout-raw',
1273
+ content: {
1274
+ main: [
1275
+ {
1276
+ nodeId: (0, crypto_1.randomUUID)(),
1277
+ type: 'fragment',
1278
+ children: [
1279
+ {
1280
+ type: 'text',
1281
+ value: 'English text',
1282
+ nodeId: (0, crypto_1.randomUUID)(),
1283
+ },
1284
+ ],
1285
+ i18n: {
1286
+ es: {
1287
+ children: [
1288
+ {
1289
+ type: 'text',
1290
+ value: 'Spanish text',
1291
+ nodeId: (0, crypto_1.randomUUID)(),
1292
+ },
1293
+ ],
1294
+ },
1295
+ },
1296
+ },
1297
+ ],
1298
+ },
1299
+ };
1300
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1301
+ expect(layout.content.main[0].children[0].value).toBe('English text');
1302
+ });
1303
+ it('should skip translation for non-translatable node types', () => {
1304
+ const layout = {
1305
+ name: 'layout-raw',
1306
+ content: {
1307
+ main: [
1308
+ {
1309
+ nodeId: (0, crypto_1.randomUUID)(),
1310
+ type: 'variation',
1311
+ default: {
1312
+ node: {
1313
+ nodeId: (0, crypto_1.randomUUID)(),
1314
+ type: 'text',
1315
+ value: 'Default text',
1316
+ },
1317
+ },
1318
+ variants: [],
1319
+ },
1320
+ ],
1321
+ },
1322
+ };
1323
+ const originalLayout = { ...layout };
1324
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1325
+ expect(layout).toEqual(originalLayout);
1326
+ });
1327
+ it('should not include node when translation is missing and fallback is disabled', () => {
1328
+ const configWithoutFallback = {
1329
+ ...config,
1330
+ lang: {
1331
+ code: 'fr',
1332
+ fallbackToDefault: false,
1333
+ },
1334
+ };
1335
+ const layout = {
1336
+ name: 'layout-raw',
1337
+ content: {
1338
+ main: [
1339
+ {
1340
+ nodeId: (0, crypto_1.randomUUID)(),
1341
+ type: 'fragment',
1342
+ children: [
1343
+ {
1344
+ type: 'text',
1345
+ value: 'English text',
1346
+ nodeId: (0, crypto_1.randomUUID)(),
1347
+ },
1348
+ ],
1349
+ i18n: {
1350
+ es: {
1351
+ children: [
1352
+ {
1353
+ type: 'text',
1354
+ value: 'Spanish text',
1355
+ nodeId: (0, crypto_1.randomUUID)(),
1356
+ },
1357
+ ],
1358
+ },
1359
+ },
1360
+ },
1361
+ ],
1362
+ },
1363
+ };
1364
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, configWithoutFallback);
1365
+ expect(layout.content.main).toHaveLength(0);
1366
+ });
1367
+ it('should translate multiple nodes in a single layout with fallback to true', () => {
1368
+ const langConfig = {
1369
+ ...config,
1370
+ lang: {
1371
+ code: 'jp',
1372
+ fallbackToDefault: true,
1373
+ },
1374
+ };
1375
+ const layout = {
1376
+ name: 'layout-raw',
1377
+ content: {
1378
+ main: [
1379
+ {
1380
+ // has both "fr" and "jp" translations
1381
+ nodeId: (0, crypto_1.randomUUID)(),
1382
+ type: 'fragment',
1383
+ children: [
1384
+ {
1385
+ type: 'text',
1386
+ value: 'English text 1',
1387
+ nodeId: (0, crypto_1.randomUUID)(),
1388
+ },
1389
+ ],
1390
+ i18n: {
1391
+ fr: {
1392
+ children: [
1393
+ {
1394
+ type: 'text',
1395
+ value: 'French text 1',
1396
+ nodeId: (0, crypto_1.randomUUID)(),
1397
+ },
1398
+ ],
1399
+ },
1400
+ jp: {
1401
+ children: [
1402
+ {
1403
+ type: 'text',
1404
+ value: 'Japanese text 1',
1405
+ nodeId: (0, crypto_1.randomUUID)(),
1406
+ },
1407
+ ],
1408
+ },
1409
+ },
1410
+ },
1411
+ {
1412
+ // has "fr" translation but no "jp" translation
1413
+ nodeId: (0, crypto_1.randomUUID)(),
1414
+ type: 'fragment',
1415
+ children: [
1416
+ {
1417
+ type: 'text',
1418
+ value: 'English text 2',
1419
+ nodeId: (0, crypto_1.randomUUID)(),
1420
+ },
1421
+ ],
1422
+ i18n: {
1423
+ fr: {
1424
+ children: [
1425
+ {
1426
+ type: 'text',
1427
+ value: 'French text 2',
1428
+ nodeId: (0, crypto_1.randomUUID)(),
1429
+ },
1430
+ ],
1431
+ },
1432
+ },
1433
+ },
1434
+ {
1435
+ // has no translations
1436
+ nodeId: (0, crypto_1.randomUUID)(),
1437
+ type: 'fragment',
1438
+ children: [
1439
+ {
1440
+ type: 'text',
1441
+ value: 'English text 3',
1442
+ nodeId: (0, crypto_1.randomUUID)(),
1443
+ },
1444
+ ],
1445
+ },
1446
+ ],
1447
+ },
1448
+ };
1449
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, langConfig);
1450
+ expect(layout.content.main).toHaveLength(3);
1451
+ expect(layout.content.main[0].children[0].value).toBe('Japanese text 1');
1452
+ expect(layout.content.main[1].children[0].value).toBe('English text 2');
1453
+ expect(layout.content.main[2].children[0].value).toBe('English text 3');
1454
+ });
1455
+ it('should translate multiple nodes in a single layout with fallback to false', () => {
1456
+ const langConfig = {
1457
+ ...config,
1458
+ lang: {
1459
+ code: 'jp',
1460
+ fallbackToDefault: false,
1461
+ },
1462
+ };
1463
+ const layout = {
1464
+ name: 'layout-raw',
1465
+ content: {
1466
+ main: [
1467
+ {
1468
+ // has both "fr" and "jp" translations
1469
+ nodeId: (0, crypto_1.randomUUID)(),
1470
+ type: 'fragment',
1471
+ children: [
1472
+ {
1473
+ type: 'text',
1474
+ value: 'English text 1',
1475
+ nodeId: (0, crypto_1.randomUUID)(),
1476
+ },
1477
+ ],
1478
+ i18n: {
1479
+ fr: {
1480
+ children: [
1481
+ {
1482
+ type: 'text',
1483
+ value: 'French text 1',
1484
+ nodeId: (0, crypto_1.randomUUID)(),
1485
+ },
1486
+ ],
1487
+ },
1488
+ jp: {
1489
+ children: [
1490
+ {
1491
+ type: 'text',
1492
+ value: 'Japanese text 1',
1493
+ nodeId: (0, crypto_1.randomUUID)(),
1494
+ },
1495
+ ],
1496
+ },
1497
+ },
1498
+ },
1499
+ {
1500
+ // has "fr" translation but no "jp" translation
1501
+ nodeId: (0, crypto_1.randomUUID)(),
1502
+ type: 'fragment',
1503
+ children: [
1504
+ {
1505
+ type: 'text',
1506
+ value: 'English text 2',
1507
+ nodeId: (0, crypto_1.randomUUID)(),
1508
+ },
1509
+ ],
1510
+ i18n: {
1511
+ fr: {
1512
+ children: [
1513
+ {
1514
+ type: 'text',
1515
+ value: 'French text 2',
1516
+ nodeId: (0, crypto_1.randomUUID)(),
1517
+ },
1518
+ ],
1519
+ },
1520
+ },
1521
+ },
1522
+ {
1523
+ // has no translations
1524
+ nodeId: (0, crypto_1.randomUUID)(),
1525
+ type: 'fragment',
1526
+ children: [
1527
+ {
1528
+ type: 'text',
1529
+ value: 'English text 3',
1530
+ nodeId: (0, crypto_1.randomUUID)(),
1531
+ },
1532
+ ],
1533
+ },
1534
+ ],
1535
+ },
1536
+ };
1537
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, langConfig);
1538
+ // there will be 2nd and 3rd nodes in main array as they don't have translations for "jp" and fallback is false
1539
+ expect(layout.content.main).toHaveLength(1);
1540
+ expect(layout.content.main[0].children[0].value).toBe('Japanese text 1');
1541
+ });
1542
+ it('should translate content inside layout nodes', () => {
1543
+ const fragmentNode = {
1544
+ nodeId: (0, crypto_1.randomUUID)(),
1545
+ type: 'fragment',
1546
+ children: [
1547
+ {
1548
+ type: 'text',
1549
+ value: 'English text',
1550
+ nodeId: (0, crypto_1.randomUUID)(),
1551
+ },
1552
+ ],
1553
+ i18n: {
1554
+ fr: {
1555
+ children: [
1556
+ {
1557
+ type: 'text',
1558
+ value: 'French text',
1559
+ },
1560
+ ],
1561
+ },
1562
+ },
1563
+ };
1564
+ const layout = {
1565
+ name: 'layout-raw',
1566
+ content: {
1567
+ main: [
1568
+ {
1569
+ nodeId: (0, crypto_1.randomUUID)(),
1570
+ type: 'layout',
1571
+ layout: {
1572
+ template: '<div>{{content}}</div>',
1573
+ name: 'test-layout',
1574
+ options: {},
1575
+ },
1576
+ content: {
1577
+ content: [fragmentNode],
1578
+ },
1579
+ },
1580
+ ],
1581
+ },
1582
+ };
1583
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1584
+ // Verify the content inside the layout node is translated
1585
+ const layoutNode = layout.content.main[0];
1586
+ const translatedFragment = layoutNode.content.content[0];
1587
+ expect(translatedFragment.children[0].value).toBe('French text');
1588
+ });
1589
+ it('should translate multiple content sections in layout nodes', () => {
1590
+ const fragmentNode = {
1591
+ nodeId: (0, crypto_1.randomUUID)(),
1592
+ type: 'fragment',
1593
+ children: [
1594
+ {
1595
+ type: 'text',
1596
+ value: 'English Title',
1597
+ nodeId: (0, crypto_1.randomUUID)(),
1598
+ },
1599
+ ],
1600
+ i18n: {
1601
+ fr: {
1602
+ children: [
1603
+ {
1604
+ type: 'text',
1605
+ value: 'French Title',
1606
+ },
1607
+ ],
1608
+ },
1609
+ },
1610
+ };
1611
+ const componentNode = {
1612
+ nodeId: (0, crypto_1.randomUUID)(),
1613
+ type: 'component',
1614
+ componentId: 'test/component/1.0.0',
1615
+ componentSet: 'test-set',
1616
+ componentType: 'server',
1617
+ contentItem: { id: 'en-content' },
1618
+ i18n: {
1619
+ fr: { id: 'fr-content' },
1620
+ },
1621
+ };
1622
+ const layout = {
1623
+ name: 'layout-raw',
1624
+ content: {
1625
+ main: [
1626
+ {
1627
+ nodeId: (0, crypto_1.randomUUID)(),
1628
+ type: 'layout',
1629
+ layout: {
1630
+ template: '<div><h1>{{title}}</h1><div>{{content}}</div></div>',
1631
+ name: 'test-layout',
1632
+ options: {},
1633
+ },
1634
+ content: {
1635
+ title: [fragmentNode],
1636
+ content: [componentNode],
1637
+ },
1638
+ },
1639
+ ],
1640
+ },
1641
+ };
1642
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1643
+ // Verify both content sections inside the layout node are translated
1644
+ const layoutNode = layout.content.main[0];
1645
+ const translatedFragment = layoutNode.content.title[0];
1646
+ const translatedComponent = layoutNode.content.content[0];
1647
+ expect(translatedFragment.children[0].value).toBe('French Title');
1648
+ expect(translatedComponent.contentItem.id).toBe('fr-content');
1649
+ });
1650
+ it('should handle nested layout nodes with translations', () => {
1651
+ const fragmentNode = {
1652
+ nodeId: (0, crypto_1.randomUUID)(),
1653
+ type: 'fragment',
1654
+ children: [
1655
+ {
1656
+ type: 'text',
1657
+ value: 'English text',
1658
+ nodeId: (0, crypto_1.randomUUID)(),
1659
+ },
1660
+ ],
1661
+ i18n: {
1662
+ fr: {
1663
+ children: [
1664
+ {
1665
+ type: 'text',
1666
+ value: 'French text',
1667
+ },
1668
+ ],
1669
+ },
1670
+ },
1671
+ };
1672
+ const innerLayoutNode = {
1673
+ nodeId: (0, crypto_1.randomUUID)(),
1674
+ type: 'layout',
1675
+ layout: {
1676
+ template: '<div>{{inner}}</div>',
1677
+ name: 'inner-layout',
1678
+ options: {},
1679
+ },
1680
+ content: {
1681
+ inner: [fragmentNode],
1682
+ },
1683
+ };
1684
+ const layout = {
1685
+ name: 'layout-raw',
1686
+ content: {
1687
+ main: [
1688
+ {
1689
+ nodeId: (0, crypto_1.randomUUID)(),
1690
+ type: 'layout',
1691
+ layout: {
1692
+ template: '<div>{{outer}}</div>',
1693
+ name: 'outer-layout',
1694
+ options: {},
1695
+ },
1696
+ content: {
1697
+ outer: [innerLayoutNode],
1698
+ },
1699
+ },
1700
+ ],
1701
+ },
1702
+ };
1703
+ (0, page_contents_lib_1.translateLanguageNodes)(layout.content, config);
1704
+ // Verify content in nested layout node is translated
1705
+ const outerLayoutNode = layout.content.main[0];
1706
+ const translatedInnerLayout = outerLayoutNode.content.outer[0];
1707
+ const translatedFragment = translatedInnerLayout.content.inner[0];
1708
+ expect(translatedFragment.children[0].value).toBe('French text');
1709
+ });
1710
+ });
1007
1711
  //# sourceMappingURL=page-contents-lib.spec.js.map