test(ivy): enable i18n test for nested templates (#27984)
The bug that was causing this test to fail has been resolved (see FW-903). The test now runs correctly. PR Close #27984
This commit is contained in:
parent
c2f19515d6
commit
4b5b1f6d16
|
@ -99,22 +99,21 @@ onlyInIvy('Ivy i18n logic').describe('i18n', function() {
|
|||
expect(element.title).toBe('Bonjour John');
|
||||
});
|
||||
|
||||
fixmeIvy('FW-903: i18n attributes in nested templates throws at runtime')
|
||||
.it('should correctly bind to context in nested template', () => {
|
||||
const title = 'Item {{ id }}';
|
||||
const template = `
|
||||
<div *ngFor='let id of items'>
|
||||
<div i18n-title='m|d' title='${title}'></div>
|
||||
</div>
|
||||
`;
|
||||
const fixture = getFixtureWithOverrides({template});
|
||||
it('should correctly bind to context in nested template', () => {
|
||||
const title = 'Item {{ id }}';
|
||||
const template = `
|
||||
<div *ngFor='let id of items'>
|
||||
<div i18n-title='m|d' title='${title}'></div>
|
||||
</div>
|
||||
`;
|
||||
const fixture = getFixtureWithOverrides({template});
|
||||
|
||||
const element = fixture.nativeElement;
|
||||
for (let i = 0; i < element.children.length; i++) {
|
||||
const child = element.children[i];
|
||||
expect((child as any).innerHTML).toBe(`<div title="Article ${i + 1}"></div>`);
|
||||
}
|
||||
});
|
||||
const element = fixture.nativeElement;
|
||||
for (let i = 0; i < element.children.length; i++) {
|
||||
const child = element.children[i];
|
||||
expect((child as any).innerHTML).toBe(`<div title="Article ${i + 1}"></div>`);
|
||||
}
|
||||
});
|
||||
|
||||
fixmeIvy('FW-904: i18n attributes placed on i18n root node don\'t work')
|
||||
.it('should work correctly when placed on i18n root node', () => {
|
||||
|
@ -476,4 +475,4 @@ onlyInIvy('Ivy i18n logic').describe('i18n', function() {
|
|||
expect(element.innerHTML).toBe('vingt');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue