Skip to content

Commit

Permalink
Merge pull request #62 from dkamburov/rc4
Browse files Browse the repository at this point in the history
Update to RC4
  • Loading branch information
mpavlinov authored Jul 27, 2016
2 parents 5119e65 + ce91182 commit 77f4acf
Show file tree
Hide file tree
Showing 33 changed files with 380 additions and 349 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
"url": "https://github.com/IgniteUI/igniteui-angular2.git"
},
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "2.0.0-rc.2",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.3",
"@angular/upgrade": "2.0.0-rc.4",

"systemjs": "0.19.27",
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",

"bootstrap": "^3.3.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion systemjs.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(global) {
var ngVer = '@2.0.0-rc.3';
var ngVer = '@2.0.0-rc.4';
// map tells the System loader where to look for things
var map = {
'app': 'app', // 'dist',
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/igbulletgraph/bulletgraph.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

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

export function main() {
Expand All @@ -14,7 +13,8 @@ export function main() {
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgBulletGraphComponent);
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgBulletGraphComponent)
.toBe(true);
});
}));
});
Expand Down
29 changes: 16 additions & 13 deletions tests/unit/igcombo/combo.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import {Component, ViewChild, TemplateRef} from '@angular/core';
import { inject, addProviders, TestComponentBuilder } from '@angular/core/testing';
import { Component, ViewChild, TemplateRef } from '@angular/core';
import * as Infragistics from '../../../src/igniteui.angular2';
import {Northwind} from "../../../samples/data/northwind";
import { Northwind } from "../../../samples/data/northwind";

export function main() {
describe('Infragistics Angular2 Combo', () => {

it('should initialize correctly', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
return tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgComboComponent);
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgComboComponent)
.toBe(true);
});
}));

Expand Down Expand Up @@ -48,25 +49,27 @@ export function main() {
});
}));

it('should reflect changes when a record in the data changes', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
return new Promise((resolve, reject) => {
tcb.overrideTemplate(TestComponent, template)
it('should reflect changes when a record in the data changes', (done) => {

inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
var template = '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [changeDetectionInterval]="cdi" [(ngModel)]="combo.value1"></ig-combo></div>';
return tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
fixture.componentInstance.northwind[19].ProductName = "Test";

setTimeout(function () {
fixture.detectChanges();

var elem = $("#combo1").igCombo("itemsFromIndex", 19)["element"];
expect(elem.text()).toBe("Test");
expect($("#combo1").igCombo("text")).toBe("Test");
resolve();
done();
}, 10);
});
});
}));

})(); /* manually invoke the injected functions */
});
});
}

Expand Down
11 changes: 6 additions & 5 deletions tests/unit/igdatachart/chart.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import {Component, ViewChild, TemplateRef} from '@angular/core';
import { inject, TestComponentBuilder } from '@angular/core/testing';
import { Component, ViewChild, TemplateRef } from '@angular/core';
import * as Infragistics from '../../../src/igniteui.angular2';

export function main() {
Expand All @@ -12,7 +11,8 @@ export function main() {
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDataChartComponent);
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDataChartComponent)
.toBe(true);
});
}));

Expand All @@ -22,7 +22,8 @@ export function main() {
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild2).toBeAnInstanceOf(Infragistics.IgZoombarComponent);
expect(fixture.debugElement.componentInstance.viewChild2 instanceof Infragistics.IgZoombarComponent)
.toBe(true);
});
}));
});
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/igdialog/dialog.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import {Component, ViewChild, TemplateRef} from '@angular/core';
import { inject, TestComponentBuilder } from '@angular/core/testing';
import { Component, ViewChild, TemplateRef } from '@angular/core';
import * as Infragistics from '../../../src/igniteui.angular2';

export function main() {
Expand All @@ -12,7 +11,8 @@ export function main() {
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDialogComponent);
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDialogComponent)
.toBe(true);
expect($(fixture.debugElement.nativeElement).find("#dialog").igDialog("content")[0].innerHTML)
.toBe("<div>Test Content</div>");
});
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/igdoughnutchart/doughnutchart.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// modeled after https://github.com/angular/angular/blob/cee2318110eeea115e5f6fc5bfc814cbaa7d90d8/modules/angular2/test/common/directives/ng_for_spec.ts
import { it, iit, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import { inject, TestComponentBuilder } from '@angular/core/testing';
import {Component, ViewChild, TemplateRef} from '@angular/core';
import * as Infragistics from '../../../src/igniteui.angular2';

Expand All @@ -12,7 +11,7 @@ export function main() {
.createAsync(TestComponent)
.then((fixture) => {
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.viewChild).toBeAnInstanceOf(Infragistics.IgDoughnutChartComponent);
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgDoughnutChartComponent).toBe(true);
});
}));
});
Expand Down
Loading

0 comments on commit 77f4acf

Please sign in to comment.