mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-01 18:26:10 +08:00
feat(TextField): decimal keyboardType (#10789)
This commit is contained in:
@ -339,6 +339,32 @@ export var testSetKeyboardTypeNumberAndSecure = function () {
|
||||
});
|
||||
};
|
||||
|
||||
export var testSetSecureAndKeyboardTypeDecimal = function () {
|
||||
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
|
||||
var textField = <TextField>views[0];
|
||||
|
||||
textField.secure = true;
|
||||
textField.keyboardType = 'decimal';
|
||||
|
||||
var expectedValue = true;
|
||||
var actualValue = getNativeSecure(textField);
|
||||
TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue);
|
||||
});
|
||||
};
|
||||
|
||||
export var testSetKeyboardTypeDecimalAndSecure = function () {
|
||||
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
|
||||
var textField = <TextField>views[0];
|
||||
|
||||
textField.keyboardType = 'decimal';
|
||||
textField.secure = true;
|
||||
|
||||
var expectedValue = true;
|
||||
var actualValue = getNativeSecure(textField);
|
||||
TKUnit.assert(actualValue === expectedValue, 'Actual: ' + actualValue + '; Expected: ' + expectedValue);
|
||||
});
|
||||
};
|
||||
|
||||
export var testBindSecureDirectlyToModel = function () {
|
||||
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<View>) {
|
||||
var textField = <TextField>views[0];
|
||||
|
||||
Reference in New Issue
Block a user