build: add bazel test rules for remainder of packages (#21053)

PR Close #21053
This commit is contained in:
Misko Hevery
2017-12-17 15:10:54 -08:00
committed by Igor Minar
parent cc1058f6e1
commit 3d50fd7cac
88 changed files with 912 additions and 322 deletions

View File

@ -164,6 +164,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
describe('in reactive forms', () => {
it(`should support primitive values`, () => {
if (isNode) return;
const fixture = initTest(FormControlNameSelect);
fixture.detectChanges();
@ -183,6 +184,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it(`should support objects`, () => {
if (isNode) return;
const fixture = initTest(FormControlSelectNgValue);
fixture.detectChanges();
@ -201,6 +203,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should compare options using provided compareWith function', () => {
if (isNode) return;
const fixture = initTest(FormControlSelectWithCompareFn);
fixture.detectChanges();
@ -211,6 +214,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should support re-assigning the options array with compareWith', () => {
if (isNode) return;
const fixture = initTest(FormControlSelectWithCompareFn);
fixture.detectChanges();
@ -239,6 +243,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
describe('in template-driven forms', () => {
it('with option values that are objects', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectForm);
const comp = fixture.componentInstance;
comp.cities = [{'name': 'SF'}, {'name': 'NYC'}, {'name': 'Buffalo'}];
@ -263,6 +268,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
}));
it('when new options are added', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectForm);
const comp = fixture.componentInstance;
comp.cities = [{'name': 'SF'}, {'name': 'NYC'}];
@ -300,6 +306,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
}));
it('when option values have same content, but different identities', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectForm);
const comp = fixture.componentInstance;
comp.cities = [{'name': 'SF'}, {'name': 'NYC'}, {'name': 'NYC'}];
@ -347,6 +354,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should compare options using provided compareWith function', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectWithCustomCompareFnForm);
const comp = fixture.componentInstance;
comp.selectedCity = {id: 1, name: 'SF'};
@ -361,6 +369,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
}));
it('should support re-assigning the options array with compareWith', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectWithCustomCompareFnForm);
fixture.componentInstance.selectedCity = {id: 1, name: 'SF'};
fixture.componentInstance.cities = [{id: 1, name: 'SF'}, {id: 2, name: 'NY'}];
@ -400,6 +409,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
describe('in reactive forms', () => {
it('should support primitive values', () => {
if (isNode) return;
const fixture = initTest(FormControlSelectMultiple);
fixture.detectChanges();
@ -410,6 +420,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should support objects', () => {
if (isNode) return;
const fixture = initTest(FormControlSelectMultipleNgValue);
fixture.detectChanges();
@ -427,6 +438,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should compare options using provided compareWith function', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(FormControlSelectMultipleWithCompareFn);
fixture.detectChanges();
tick();
@ -478,6 +490,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
it('should reflect state of model after option selected and new options subsequently added',
fakeAsync(() => {
if (isNode) return;
setSelectedCities([]);
selectOptionViaUI('1: Object');
@ -491,6 +504,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
it('should reflect state of model after option selected and then other options removed',
fakeAsync(() => {
if (isNode) return;
setSelectedCities([]);
selectOptionViaUI('1: Object');
@ -512,6 +526,7 @@ import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util'
});
it('should compare options using provided compareWith function', fakeAsync(() => {
if (isNode) return;
const fixture = initTest(NgModelSelectMultipleWithCustomCompareFnForm);
const comp = fixture.componentInstance;
comp.cities = [{id: 1, name: 'SF'}, {id: 2, name: 'LA'}];