mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
value-source-tests will now use unsetValue instead of undefined when resetting local value
This commit is contained in:
@ -68,7 +68,7 @@ allTests["FRAME"] = require("./ui/frame/frame-tests");
|
|||||||
allTests["VIEW"] = require("./ui/view/view-tests");
|
allTests["VIEW"] = require("./ui/view/view-tests");
|
||||||
allTests["STYLE"] = require("./ui/styling/style-tests");
|
allTests["STYLE"] = require("./ui/styling/style-tests");
|
||||||
allTests["VISUAL-STATE"] = require("./ui/styling/visual-state-tests");
|
allTests["VISUAL-STATE"] = require("./ui/styling/visual-state-tests");
|
||||||
// allTests["VALUE-SOURCE"] = require("./ui/styling/value-source-tests");
|
allTests["VALUE-SOURCE"] = require("./ui/styling/value-source-tests");
|
||||||
allTests["CSS-SELECTOR-PARSER"] = require("./ui/styling/css-selector-parser");
|
allTests["CSS-SELECTOR-PARSER"] = require("./ui/styling/css-selector-parser");
|
||||||
allTests["CSS-SELECTOR"] = require("./ui/styling/css-selector");
|
allTests["CSS-SELECTOR"] = require("./ui/styling/css-selector");
|
||||||
allTests["BUTTON"] = require("./ui/button/button-tests");
|
allTests["BUTTON"] = require("./ui/button/button-tests");
|
||||||
|
@ -3,6 +3,7 @@ import * as button from "ui/button";
|
|||||||
import * as stack from "ui/layouts/stack-layout";
|
import * as stack from "ui/layouts/stack-layout";
|
||||||
import * as helper from "../helper";
|
import * as helper from "../helper";
|
||||||
import * as TKUnit from "../../TKUnit";
|
import * as TKUnit from "../../TKUnit";
|
||||||
|
import { unsetValue } from "ui/core/view";
|
||||||
|
|
||||||
export var test_value_Inherited_stronger_than_Default = function () {
|
export var test_value_Inherited_stronger_than_Default = function () {
|
||||||
let page = helper.getCurrentPage();
|
let page = helper.getCurrentPage();
|
||||||
@ -39,6 +40,6 @@ export function test_value_Local_stronger_than_Css() {
|
|||||||
helper.assertViewColor(btn, "#FF0000");
|
helper.assertViewColor(btn, "#FF0000");
|
||||||
btn.style.color = new color.Color("#0000FF");
|
btn.style.color = new color.Color("#0000FF");
|
||||||
helper.assertViewColor(btn, "#0000FF");
|
helper.assertViewColor(btn, "#0000FF");
|
||||||
btn.style.color = undefined;
|
btn.style.color = unsetValue;
|
||||||
TKUnit.assertEqual(btn.style.color, undefined, "style.color should be undefined when set locally.");
|
TKUnit.assertEqual(btn.style.color, undefined, "style.color should be undefined when set locally.");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user