refactor(core): remove testing-only DOM manipulation utils from DomAdapters (#32291)

PR Close #32291
This commit is contained in:
Kara Erickson
2019-08-23 13:28:33 -07:00
committed by Miško Hevery
parent ede5786d1e
commit 30dabdf8fc
14 changed files with 53 additions and 106 deletions

View File

@ -1006,8 +1006,8 @@ function declareTests(config?: {useJit: boolean}) {
getDOM().dispatchEvent(fixture.debugElement.children[1].nativeElement, dispatchedEvent2);
expect(getDOM().isPrevented(dispatchedEvent)).toBe(true);
expect(getDOM().isPrevented(dispatchedEvent2)).toBe(false);
expect(getDOM().getChecked(fixture.debugElement.children[0].nativeElement)).toBeFalsy();
expect(getDOM().getChecked(fixture.debugElement.children[1].nativeElement)).toBeTruthy();
expect(fixture.debugElement.children[0].nativeElement.checked).toBeFalsy();
expect(fixture.debugElement.children[1].nativeElement.checked).toBeTruthy();
});
}
@ -2689,15 +2689,14 @@ class ComponentWithoutView {
@Directive({selector: '[no-duplicate]'})
class DuplicateDir {
constructor(elRef: ElementRef) {
getDOM().setText(elRef.nativeElement, getDOM().getText(elRef.nativeElement) + 'noduplicate');
getDOM().setText(elRef.nativeElement, elRef.nativeElement.textContent + 'noduplicate');
}
}
@Directive({selector: '[no-duplicate]'})
class OtherDuplicateDir {
constructor(elRef: ElementRef) {
getDOM().setText(
elRef.nativeElement, getDOM().getText(elRef.nativeElement) + 'othernoduplicate');
getDOM().setText(elRef.nativeElement, elRef.nativeElement.textContent + 'othernoduplicate');
}
}