value-source-tests will now use unsetValue instead of undefined when resetting local value

This commit is contained in:
Panayot Cankov
2017-01-17 16:56:56 +02:00
parent 2450b92b85
commit 01edf37d33
2 changed files with 3 additions and 2 deletions

View File

@ -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");

View File

@ -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.");
} }