DatePicker tests fix.

This commit is contained in:
Nedyalko Nikolov
2016-03-30 15:19:31 +03:00
parent ec38f9f9b2
commit 5297fac2d1
2 changed files with 9 additions and 4 deletions

View File

@ -518,6 +518,11 @@ declare module "application" {
* String value used when hooking to activityBackPressed event. * String value used when hooking to activityBackPressed event.
*/ */
public static activityBackPressedEvent: string; public static activityBackPressedEvent: string;
/**
* String value used when hooking to requestPermissions event.
*/
public static activityRequestPermissionsEvent: string;
/** /**
* Register a BroadcastReceiver to be run in the main activity thread. The receiver will be called with any broadcast Intent that matches filter, in the main application thread. * Register a BroadcastReceiver to be run in the main activity thread. The receiver will be called with any broadcast Intent that matches filter, in the main application thread.

View File

@ -127,10 +127,10 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
} }
public test_DateIsSetCorrectlyWhenDayIsSet() { public test_DateIsSetCorrectlyWhenDayIsSet() {
let today = new Date(); let today = new Date(2016, 3, 15);
this.testView.year = today.getFullYear(); this.testView.year = today.getFullYear();
this.testView.month = today.getMonth(); this.testView.month = today.getMonth();
let expectedValue = today.getDate() === 19 ? 18 : 19; let expectedValue = today.getDate();
this.testView.day = expectedValue; this.testView.day = expectedValue;
let expectedDate = new Date(today.getFullYear(), today.getMonth() - 1, expectedValue); let expectedDate = new Date(today.getFullYear(), today.getMonth() - 1, expectedValue);
@ -140,11 +140,11 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
} }
public test_DateIsSetCorrectlyWhenMonthIsSet() { public test_DateIsSetCorrectlyWhenMonthIsSet() {
let today = new Date(); let today = new Date(2016, 3, 15);
this.testView.year = today.getFullYear(); this.testView.year = today.getFullYear();
this.testView.day = today.getDate(); this.testView.day = today.getDate();
let expectedValue = today.getMonth() === 5 ? 4 : 5; let expectedValue = today.getMonth();
this.testView.month = expectedValue; this.testView.month = expectedValue;
let expectedDate = new Date(today.getFullYear(), expectedValue - 1, today.getDate()); let expectedDate = new Date(today.getFullYear(), expectedValue - 1, today.getDate());