add SiblingsFiltered() and tests

This commit is contained in:
Martin Angers
2012-09-04 11:20:20 -04:00
parent b26e37d262
commit ff0cbc32c4
3 changed files with 25 additions and 1 deletions

View File

@@ -122,3 +122,13 @@ func TestSiblings2(t *testing.T) {
sel := Doc().Root.Find(".pvk-gutter").Siblings()
AssertLength(t, sel.Nodes, 9)
}
func TestSiblings3(t *testing.T) {
sel := Doc().Root.Find("body>.container-fluid").Siblings()
AssertLength(t, sel.Nodes, 0)
}
func TestSiblingsFiltered(t *testing.T) {
sel := Doc().Root.Find(".pvk-gutter").SiblingsFiltered(".pvk-content")
AssertLength(t, sel.Nodes, 3)
}