feat(forms): add novalidate by default (#13092)
This commit is contained in:

committed by
Victor Berchet

parent
e9f307f948
commit
4c35be3e07
@ -71,6 +71,15 @@ export function main() {
|
||||
expect(input.nativeElement.value).toEqual('loginValue');
|
||||
});
|
||||
|
||||
it('should add novalidate by default to form', () => {
|
||||
const fixture = TestBed.createComponent(FormGroupComp);
|
||||
fixture.componentInstance.form = new FormGroup({'login': new FormControl('loginValue')});
|
||||
fixture.detectChanges();
|
||||
|
||||
const form = fixture.debugElement.query(By.css('form'));
|
||||
expect(form.nativeElement.getAttribute('novalidate')).toEqual('');
|
||||
});
|
||||
|
||||
it('work with formGroups (view -> model)', () => {
|
||||
const fixture = TestBed.createComponent(FormGroupComp);
|
||||
const form = new FormGroup({'login': new FormControl('oldValue')});
|
||||
|
Reference in New Issue
Block a user