mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
DatePicker tests fix.
This commit is contained in:
5
application/application.d.ts
vendored
5
application/application.d.ts
vendored
@ -518,6 +518,11 @@ declare module "application" {
|
||||
* String value used when hooking to activityBackPressed event.
|
||||
*/
|
||||
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.
|
||||
|
@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user