mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
various tests fixed
This commit is contained in:
@ -17,7 +17,7 @@ export function getNativeColor(button: buttonModule.Button): colorModule.Color {
|
||||
}
|
||||
|
||||
export function getNativeBackgroundColor(button: buttonModule.Button): colorModule.Color {
|
||||
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>button.android.getBackground()).getColor());
|
||||
return new colorModule.Color((<any>button.android.getBackground()).backgroundColor);
|
||||
}
|
||||
|
||||
export function getNativeTextAlignment(button: buttonModule.Button): string {
|
||||
|
@ -223,7 +223,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
normalColor = actualColors.getDefaultColor()
|
||||
TKUnit.assert(normalColor, "Expected: " + expColor + ", Actual: " + normalColor);
|
||||
|
||||
actualBackgroundColor = (<android.graphics.drawable.ColorDrawable>testLabel.android.getBackground()).getColor();
|
||||
actualBackgroundColor = (<any>testLabel.android.getBackground()).backgroundColor;
|
||||
expBackgroundColor = android.graphics.Color.parseColor(backgroundColor);
|
||||
TKUnit.assertEqual(actualBackgroundColor, expBackgroundColor);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ export function getNativeColor(textField: textFieldModule.TextField): colorModul
|
||||
}
|
||||
|
||||
export function getNativeBackgroundColor(textField: textFieldModule.TextField): colorModule.Color {
|
||||
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>textField.android.getBackground()).getColor());
|
||||
return new colorModule.Color((<any>textField.android.getBackground()).backgroundColor);
|
||||
}
|
||||
|
||||
export function getNativeTextAlignment(textField: textFieldModule.TextField): string {
|
||||
|
@ -30,7 +30,7 @@ export function getNativeColor(textView: textViewModule.TextView): colorModule.C
|
||||
}
|
||||
|
||||
export function getNativeBackgroundColor(textView: textViewModule.TextView): colorModule.Color {
|
||||
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>textView.android.getBackground()).getColor());
|
||||
return new colorModule.Color((<any>textView.android.getBackground()).backgroundColor);
|
||||
}
|
||||
|
||||
export function getNativeTextAlignment(textView: textViewModule.TextView): string {
|
||||
|
Reference in New Issue
Block a user