fix(ivy): shadow all DOM properties in DebugElement.properties (#33781)

Fixes #33695

PR Close #33781
This commit is contained in:
Miško Hevery
2019-11-12 17:12:36 -08:00
committed by Alex Rickabaugh
parent 6d06d9d3c6
commit 5be23a309e
5 changed files with 151 additions and 72 deletions

View File

@ -164,7 +164,8 @@ describe('TestBed', () => {
fixture.detectChanges();
const divElement = fixture.debugElement.query(By.css('div'));
expect(divElement.properties).toEqual({id: 'one', title: 'some title'});
expect(divElement.properties.id).toEqual('one');
expect(divElement.properties.title).toEqual('some title');
});
it('should give the ability to access interpolated properties on a node', () => {
@ -172,8 +173,8 @@ describe('TestBed', () => {
fixture.detectChanges();
const paragraphEl = fixture.debugElement.query(By.css('p'));
expect(paragraphEl.properties)
.toEqual({title: '( some label - some title )', id: '[ some label ] [ some title ]'});
expect(paragraphEl.properties.title).toEqual('( some label - some title )');
expect(paragraphEl.properties.id).toEqual('[ some label ] [ some title ]');
});
it('should give access to the node injector', () => {