mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'master' into merge-release-master-5.2.1
This commit is contained in:
@@ -674,6 +674,23 @@ export function test_CSS_isAppliedOnPage_From_addCssFile() {
|
||||
});
|
||||
}
|
||||
|
||||
export function test_CSS_isAppliedOnPage_From_changeCssFile() {
|
||||
const testButton = new buttonModule.Button();
|
||||
testButton.text = "Test";
|
||||
|
||||
const testCss = "button { color: blue; }";
|
||||
|
||||
const testFunc = function (views: Array<viewModule.View>) {
|
||||
helper.assertViewColor(testButton, "#0000FF");
|
||||
const page: pageModule.Page = <pageModule.Page>views[1];
|
||||
page.changeCssFile("~/ui/styling/test.css");
|
||||
helper.assertViewBackgroundColor(page, "#FF0000");
|
||||
TKUnit.assert(testButton.style.color === undefined, "Color should not have a value");
|
||||
}
|
||||
|
||||
helper.buildUIAndRunTest(testButton, testFunc, { pageCss: testCss });
|
||||
}
|
||||
|
||||
const invalidCSS = ".invalid { " +
|
||||
"color: invalidValue; " +
|
||||
"background-color: invalidValue; " +
|
||||
|
||||
Reference in New Issue
Block a user