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

@ -519,6 +519,11 @@ declare module "application" {
*/
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.
* For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#registerReceiver%28android.content.BroadcastReceiver,%20android.content.IntentFilter%29'

View File

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