Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be4b7f7

Browse filesBrowse files
committed
test: changeCssFile method
1 parent 59caaaa commit be4b7f7
Copy full SHA for be4b7f7

File tree

1 file changed

+13
-0
lines changed
Filter options

1 file changed

+13
-0
lines changed

‎tests/app/ui/styling/style-tests.ts

Copy file name to clipboardExpand all lines: tests/app/ui/styling/style-tests.ts
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,19 @@ export function test_CSS_isAppliedOnPage_From_addCssFile() {
674674
});
675675
}
676676

677+
export function test_CSS_isAppliedOnPage_From_changeCssFile() {
678+
const testButton = new buttonModule.Button();
679+
testButton.text = "Test";
680+
681+
helper.buildUIAndRunTest(testButton, function (views: Array<viewModule.View>) {
682+
const page: pageModule.Page = <pageModule.Page>views[1];
683+
page.css = "button { color: blue; }";
684+
page.changeCssFile("~/ui/styling/test.css");
685+
helper.assertViewBackgroundColor(page, "#FF0000");
686+
TKUnit.assert(testButton.style.color === undefined, "Color should not have a value");
687+
});
688+
}
689+
677690
const invalidCSS = ".invalid { " +
678691
"color: invalidValue; " +
679692
"background-color: invalidValue; " +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.