public void Test_select_on_root_node_descending_nodes_by_tag() { var styleSheet = CssParser.Parse(test1); var nodes = dom.QuerySelectorAllWithSelf("body label"); Assert.AreEqual(3, nodes.Count()); }
public void Test_select_on_sub_node_descending_node_with_tag_and_class() { var styleSheet = CssParser.Parse(test1); var nodes = div.QuerySelectorAllWithSelf("div label.required"); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label3, nodes.First()); }
public void Select_on_root_node_descending_nodes_by_tag() { var styleSheet = CssParser.Parse(test1); SetCurrentStyleSheet(dom, styleSheet); var nodes = dom.QuerySelectorAllWithSelf(styleSheet, new Selector("body label")); Assert.AreEqual(3, nodes.Count()); }
public void Select_on_root_node_with_repeating_general_parents2() { var styleSheet = CssParser.Parse(test1); SetCurrentStyleSheet(dom, styleSheet); var nodes = div.QuerySelectorAllWithSelf(styleSheet, new Selector("div div label.required"), SelectorType.LogicalTree); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label3, nodes.First()); }
public void Select_ascending_node_with_nth_child() { var nodes = label2.QuerySelectorAllWithSelf("label:nth-of-type(2)"); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label2, nodes.First()); }
public void Select_ascending_node_with_tag_and_class4() { var nodes = label3.QuerySelectorAllWithSelf("body label.required"); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label3, nodes.First()); }
public void Select_ascending_node_with_tag_and_class4() { var nodes = label3.QuerySelectorAllWithSelf(defaultStyleSheet, new Selector("body label.required"), SelectorType.LogicalTree); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label3, nodes.First()); }
public void Select_ascending_node_with_nth_child() { var selector = new Selector("label:nth-of-type(2)"); var nodes = label2.QuerySelectorAllWithSelf(defaultStyleSheet, selector, SelectorType.LogicalTree); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label2, nodes.First()); }
public void TestSelectAscendingNodeWithNth_child() { var styleSheet = CssParser.Parse(test1); var nodes = label2.QuerySelectorAllWithSelf("label:nth-of-type(2)"); Assert.AreEqual(1, nodes.Count()); Assert.AreEqual(label2, nodes.First()); }