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');
|
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', () => {
|
||||||
.it('should correctly bind to context in nested template', () => {
|
const title = 'Item {{ id }}';
|
||||||
const title = 'Item {{ id }}';
|
const template = `
|
||||||
const template = `
|
<div *ngFor='let id of items'>
|
||||||
<div *ngFor='let id of items'>
|
<div i18n-title='m|d' title='${title}'></div>
|
||||||
<div i18n-title='m|d' title='${title}'></div>
|
</div>
|
||||||
</div>
|
`;
|
||||||
`;
|
const fixture = getFixtureWithOverrides({template});
|
||||||
const fixture = getFixtureWithOverrides({template});
|
|
||||||
|
|
||||||
const element = fixture.nativeElement;
|
const element = fixture.nativeElement;
|
||||||
for (let i = 0; i < element.children.length; i++) {
|
for (let i = 0; i < element.children.length; i++) {
|
||||||
const child = element.children[i];
|
const child = element.children[i];
|
||||||
expect((child as any).innerHTML).toBe(`<div title="Article ${i + 1}"></div>`);
|
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')
|
fixmeIvy('FW-904: i18n attributes placed on i18n root node don\'t work')
|
||||||
.it('should work correctly when placed on i18n root node', () => {
|
.it('should work correctly when placed on i18n root node', () => {
|
||||||
|
|
Loading…
Reference in New Issue