Skip to content

Commit 47c6a10

Browse files
Martin PavlovMartin Pavlov
authored andcommitted
Fixing failing tests due to the change of the date format
Fixing failing tests due to the change of the date format in 17.1
1 parent a882ce7 commit 47c6a10

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/unit/iggrid/grid.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,13 @@ export function main() {
518518
expect(fixture.debugElement.componentInstance.viewChild instanceof Infragistics.IgGridComponent)
519519
.toBe(true);
520520
fixture.componentInstance.data1 = [
521-
{ "Id": "4", "Date": "\/Date(1235088000000)\/" },
522-
{ "Id": "5", "Date": "\/Date(1250809200000)\/" },
523-
{ "Id": "6", "Date": "\/Date(1335394800000)\/" }
521+
{ "Id": "4", "Date": "2017-06-06" },
522+
{ "Id": "5", "Date": "2017-06-07" },
523+
{ "Id": "6", "Date": "2017-06-08" }
524524
];
525525
setTimeout(() => {
526526
fixture.detectChanges();
527-
$(fixture.debugElement.nativeElement).find("#grid1").igGridFiltering("filter", ([{ fieldName: "Date", expr: "\/Date(704678400000)\/", cond: "notOn" }]));
527+
$(fixture.debugElement.nativeElement).find("#grid1").igGridFiltering("filter", ([{ fieldName: "Date", expr: "2017-06-09", cond: "notOn" }]));
528528
expect($(fixture.debugElement.nativeElement).find("#grid1_container .ui-iggrid-results").text())
529529
.toBe("3 matching records");
530530
done();
@@ -560,14 +560,14 @@ class TestComponent {
560560
this.idHeaderText = "Product Id";
561561
this.pi = 1;
562562
this.data = [
563-
{ "Id": 1, "Name": "John Smith", "Age": 45, "HireDate": "\/Date(704678400000)\/" },
564-
{ "Id": 2, "Name": "Mary Johnson", "Age": 32, "HireDate": "\/Date(794678400000)\/" },
565-
{ "Id": 3, "Name": "Bob Ferguson", "Age": 27, "HireDate": "\/Date(834678400000)\/" }
563+
{ "Id": 1, "Name": "John Smith", "Age": 45, "HireDate": "2002-05-09" },
564+
{ "Id": 2, "Name": "Mary Johnson", "Age": 32, "HireDate": "2004-01-18" },
565+
{ "Id": 3, "Name": "Bob Ferguson", "Age": 27, "HireDate": "2003-03-03" }
566566
];
567567
this.data1 = [
568-
{ "Id": "1", "Date": "\/Date(1250809200000)\/" },
569-
{ "Id": "2", "Date": "\/Date(1335394800000)\/" },
570-
{ "Id": "3", "Date": "\/Date(1235088000000)\/" }
568+
{ "Id": "1", "Date": "2013-08-07" },
569+
{ "Id": "2", "Date": "2013-08-08" },
570+
{ "Id": "3", "Date": "2013-08-09" }
571571
];
572572
this.opts = {
573573
primaryKey: "Id",

0 commit comments

Comments
 (0)