mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Inital by-type split
Split type.class from CssTypeSelector to CssCompositeSelector, probably support type#id.class selectors Apply review comments, refactor css-selectors internally Applied refactoring, all tests pass, button does not notify changes Add tests for the css selectors parser. Added tests for css-selectors Added basic implementation of mayMatch and changeMap for css match state Implemented TKUnit.assertDeepEqual to check key and key/values in Map and Set Watch for property and pseudoClass changes Add one child group test Add typings for animations Added mechanism to enable/disable listeners for pseudo classes Count listeners instead of checking handlers, reverse subscription and unsubscription
This commit is contained in:
@ -42,21 +42,3 @@ export function test_value_Local_stronger_than_Css() {
|
||||
btn.style.color = undefined;
|
||||
TKUnit.assertEqual(btn.style.color, undefined, "style.color should be undefined when set locally.");
|
||||
}
|
||||
|
||||
export var test_value_VisualState_stronger_than_Local = function () {
|
||||
let testPage = helper.getCurrentPage();
|
||||
|
||||
let testStack = new stack.StackLayout();
|
||||
testPage.content = testStack;
|
||||
|
||||
let btn = new button.Button();
|
||||
btn.style.color = new color.Color("#FF0000");
|
||||
testStack.addChild(btn);
|
||||
testPage.css = "button:pressed { color: #0000FF; }";
|
||||
|
||||
helper.assertViewColor(btn, "#FF0000");
|
||||
btn._goToVisualState("pressed");
|
||||
helper.assertViewColor(btn, "#0000FF");
|
||||
btn._goToVisualState("normal");
|
||||
helper.assertViewColor(btn, "#FF0000");
|
||||
}
|
Reference in New Issue
Block a user