Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input
- id="radio-{{geo.id}}"
- name="radio-geos"
- type="radio"
- [value]="geo.value"
- [(ngModel)]="selectedGeo">
- it('should select the US Home Region', (done) => {
- // Arrange
- const component = TestBed.createComponent(regionComponent);
- // Act
- component.detectChanges();
- const usGeoRadioButton = component.debugElement.query(By.css('#radio-0'));
- usGeoRadioButton.triggerEventHandler('click', null);
- component.detectChanges();
- const selectedGeo = component.componentInstance.selectedGeo;
- // Assert
- component.whenStable().then(() => {
- expect(selectedGeo).toBe('US');
- done();
- });
- });
Add Comment
Please, Sign In to add comment