Skip to content

Commit 77f4acf

Browse files
authored
Merge pull request #62 from dkamburov/rc4
Update to RC4
2 parents 5119e65 + ce91182 commit 77f4acf

File tree

33 files changed

+380
-349
lines changed

33 files changed

+380
-349
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
"url": "https://github.com/IgniteUI/igniteui-angular2.git"
88
},
99
"dependencies": {
10-
"@angular/common": "2.0.0-rc.3",
11-
"@angular/compiler": "2.0.0-rc.3",
12-
"@angular/core": "2.0.0-rc.3",
13-
"@angular/http": "2.0.0-rc.3",
14-
"@angular/platform-browser": "2.0.0-rc.3",
15-
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
10+
"@angular/common": "2.0.0-rc.4",
11+
"@angular/compiler": "2.0.0-rc.4",
12+
"@angular/core": "2.0.0-rc.4",
13+
"@angular/http": "2.0.0-rc.4",
14+
"@angular/platform-browser": "2.0.0-rc.4",
15+
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
1616
"@angular/router": "2.0.0-rc.2",
1717
"@angular/router-deprecated": "2.0.0-rc.2",
18-
"@angular/upgrade": "2.0.0-rc.3",
18+
"@angular/upgrade": "2.0.0-rc.4",
1919

2020
"systemjs": "0.19.27",
2121
"es6-shim": "^0.35.0",
2222
"reflect-metadata": "^0.1.3",
2323
"rxjs": "5.0.0-beta.6",
2424
"zone.js": "^0.6.12",
25-
25+
2626
"bootstrap": "^3.3.6"
2727
},
2828
"devDependencies": {

systemjs.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function(global) {
2-
var ngVer = '@2.0.0-rc.3';
2+
var ngVer = '@2.0.0-rc.4';
33
// map tells the System loader where to look for things
44
var map = {
55
'app': 'app', // 'dist',

tests/unit/igbulletgraph/bulletgraph.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11

22
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
3-
import { it, iit, describe, expect, inject, async, beforeEachProviders, fakeAsync, tick, } from '@angular/core/testing';
4-
import { TestComponentBuilder } from '@angular/compiler/testing';
5-
import {Component, ViewChild, TemplateRef} from '@angular/core';
3+
import { inject, beforeEachProviders, TestComponentBuilder } from '@angular/core/testing';
4+
import { Component, ViewChild, TemplateRef } from '@angular/core';
65
import * as Infragistics from '../../../src/igniteui.angular2';
76

87
export function main() {
@@ -14,7 +13,8 @@ export function main() {
1413
.createAsync(TestComponent)
1514
.then((fixture) => {
1615
fixture.detectChanges();
17-
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgBulletGraphComponent);
16+
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgBulletGraphComponent)
17+
.toBe(true);
1818
});
1919
}));
2020
});

tests/unit/igcombo/combo.spec.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
2-
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
3-
import { TestComponentBuilder } from '@angular/compiler/testing';
4-
import {Component, ViewChild, TemplateRef} from '@angular/core';
2+
import { inject, addProviders, TestComponentBuilder } from '@angular/core/testing';
3+
import { Component, ViewChild, TemplateRef } from '@angular/core';
54
import * as Infragistics from '../../../src/igniteui.angular2';
6-
import {Northwind} from "../../../samples/data/northwind";
5+
import { Northwind } from "../../../samples/data/northwind";
76

87
export function main() {
98
describe('Infragistics Angular2 Combo', () => {
9+
1010
it('should initialize correctly', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
1111
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
1212
return tcb.overrideTemplate(TestComponent, template)
1313
.createAsync(TestComponent)
1414
.then((fixture) => {
1515
fixture.detectChanges();
16-
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgComboComponent);
16+
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgComboComponent)
17+
.toBe(true);
1718
});
1819
}));
1920

@@ -48,25 +49,27 @@ export function main() {
4849
});
4950
}));
5051

51-
it('should reflect changes when a record in the data changes', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
52-
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
53-
return new Promise((resolve, reject) => {
54-
tcb.overrideTemplate(TestComponent, template)
52+
it('should reflect changes when a record in the data changes', (done) => {
53+
54+
inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
55+
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
56+
return tcb.overrideTemplate(TestComponent, template)
5557
.createAsync(TestComponent)
5658
.then((fixture) => {
5759
fixture.detectChanges();
5860
fixture.componentInstance.northwind[19].ProductName = "Test";
61+
5962
setTimeout(function () {
6063
fixture.detectChanges();
64+
6165
var elem = $("#combo1").igCombo("itemsFromIndex", 19)["element"];
6266
expect(elem.text()).toBe("Test");
6367
expect($("#combo1").igCombo("text")).toBe("Test");
64-
resolve();
68+
done();
6569
}, 10);
6670
});
67-
});
68-
}));
69-
71+
})(); /* manually invoke the injected functions */
72+
});
7073
});
7174
}
7275

tests/unit/igdatachart/chart.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
2-
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
3-
import { TestComponentBuilder } from '@angular/compiler/testing';
4-
import {Component, ViewChild, TemplateRef} from '@angular/core';
2+
import { inject, TestComponentBuilder } from '@angular/core/testing';
3+
import { Component, ViewChild, TemplateRef } from '@angular/core';
54
import * as Infragistics from '../../../src/igniteui.angular2';
65

76
export function main() {
@@ -12,7 +11,8 @@ export function main() {
1211
.createAsync(TestComponent)
1312
.then((fixture) => {
1413
fixture.detectChanges();
15-
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDataChartComponent);
14+
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDataChartComponent)
15+
.toBe(true);
1616
});
1717
}));
1818

@@ -22,7 +22,8 @@ export function main() {
2222
.createAsync(TestComponent)
2323
.then((fixture) => {
2424
fixture.detectChanges();
25-
expect(fixture.debugElement.componentInstance.viewChild2).toBeAnInstanceOf(Infragistics.IgZoombarComponent);
25+
expect(fixture.debugElement.componentInstance.viewChild2 instanceof Infragistics.IgZoombarComponent)
26+
.toBe(true);
2627
});
2728
}));
2829
});

tests/unit/igdialog/dialog.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
2-
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
3-
import { TestComponentBuilder } from '@angular/compiler/testing';
4-
import {Component, ViewChild, TemplateRef} from '@angular/core';
2+
import { inject, TestComponentBuilder } from '@angular/core/testing';
3+
import { Component, ViewChild, TemplateRef } from '@angular/core';
54
import * as Infragistics from '../../../src/igniteui.angular2';
65

76
export function main() {
@@ -12,7 +11,8 @@ export function main() {
1211
.createAsync(TestComponent)
1312
.then((fixture) => {
1413
fixture.detectChanges();
15-
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDialogComponent);
14+
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDialogComponent)
15+
.toBe(true);
1616
expect($(fixture.debugElement.nativeElement).find("#dialog").igDialog("content")[0].innerHTML)
1717
.toBe("<div>Test Content</div>");
1818
});

tests/unit/igdoughnutchart/doughnutchart.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
2-
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
3-
import { TestComponentBuilder } from '@angular/compiler/testing';
2+
import { inject, TestComponentBuilder } from '@angular/core/testing';
43
import {Component, ViewChild, TemplateRef} from '@angular/core';
54
import * as Infragistics from '../../../src/igniteui.angular2';
65

@@ -12,7 +11,7 @@ export function main() {
1211
.createAsync(TestComponent)
1312
.then((fixture) => {
1413
fixture.detectChanges();
15-
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDoughnutChartComponent);
14+
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDoughnutChartComponent).toBe(true);
1615
});
1716
}));
1817
});

0 commit comments

Comments
 (0)