Minor documentation cleanup from last commit
This commit is contained in:
parent
07208b1cc3
commit
380c95b6c0
5
query.go
5
query.go
|
@ -209,9 +209,10 @@ func Attributes(sel interface{}, attributes *map[string]string, opts ...QueryOpt
|
|||
}, opts...)
|
||||
}
|
||||
|
||||
// AttributesAll retrieves the element attributes for every nodes matching the
|
||||
// AttributesAll retrieves the element attributes for all nodes matching the
|
||||
// selector.
|
||||
// selector should be ByQueryAll
|
||||
//
|
||||
// Note: this should be used with the ByQueryAll selector option.
|
||||
func AttributesAll(sel interface{}, attributes *[]map[string]string, opts ...QueryOption) Action {
|
||||
if attributes == nil {
|
||||
panic("attributes cannot be nil")
|
||||
|
|
|
@ -448,14 +448,14 @@ func TestSetAttributes(t *testing.T) {
|
|||
exp map[string]string
|
||||
}{
|
||||
{`//*[@id="icon-brankas"]`, BySearch,
|
||||
map[string]string{"data-url": "brankas"},
|
||||
map[string]string{"data-url": "brankas"},
|
||||
map[string]string{
|
||||
"alt": "Brankas - Easy Money Management",
|
||||
"id": "icon-brankas",
|
||||
"src": "images/brankas.png",
|
||||
"data-url": "brankas"}},
|
||||
{"body > img:first-child", ByQuery,
|
||||
map[string]string{"data-url": "brankas"},
|
||||
map[string]string{"data-url": "brankas"},
|
||||
map[string]string{
|
||||
"alt": "Brankas - Easy Money Management",
|
||||
"id": "icon-brankas",
|
||||
|
@ -463,7 +463,7 @@ func TestSetAttributes(t *testing.T) {
|
|||
"data-url": "brankas",
|
||||
}},
|
||||
{"body > img:nth-child(2)", ByQueryAll,
|
||||
map[string]string{"width": "100", "height": "200"},
|
||||
map[string]string{"width": "100", "height": "200"},
|
||||
map[string]string{
|
||||
"alt": `How people build software`,
|
||||
"id": "icon-github",
|
||||
|
@ -472,7 +472,7 @@ func TestSetAttributes(t *testing.T) {
|
|||
"height": "200",
|
||||
}},
|
||||
{"#icon-github", ByID,
|
||||
map[string]string{"width": "100", "height": "200"},
|
||||
map[string]string{"width": "100", "height": "200"},
|
||||
map[string]string{
|
||||
"alt": "How people build software",
|
||||
"id": "icon-github",
|
||||
|
|
Loading…
Reference in New Issue
Block a user