Skip to content

Commit

Permalink
Update selector in test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 29, 2022
1 parent ee30259 commit 7f6ab08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/web/crate_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ mod tests {

let platform_links: Vec<(String, String)> = kuchiki::parse_html()
.one(response.text()?)
.select(r#"a[aria-label="Platform"] + ul li a"#)
.select(r#"summary[aria-label="Platform"] + ul li a"#)
.expect("invalid selector")
.map(|el| {
let attributes = el.attributes.borrow();
Expand Down
2 changes: 1 addition & 1 deletion src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ mod test {
let text = web.get("/foo/0.2.0/foo").send()?.text()?;
let platform = kuchiki::parse_html()
.one(text)
.select(r#"ul > li > a[aria-label="Platform"]"#)
.select(r#"form.landing-search-form-nav details > summary[aria-label="Platform"]"#)
.unwrap()
.count();
assert_eq!(platform, 1);
Expand Down
6 changes: 3 additions & 3 deletions src/web/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ mod test {
let dom = kuchiki::parse_html().one(data);

if let Some(elem) = dom
.select("form > ul > li > a.warn")
.select("form.landing-search-form-nav > a.warn.pure-menu-item")
.expect("invalid selector")
.next()
{
Expand Down Expand Up @@ -1257,7 +1257,7 @@ mod test {
let data = web.get(path).send()?.text()?;
Ok(kuchiki::parse_html()
.one(data)
.select("form > ul > li > .warn")
.select("form.landing-search-form-nav > .warn.pure-menu-item")
.expect("invalid selector")
.any(|el| el.text_contents().contains("yanked")))
}
Expand Down Expand Up @@ -1502,7 +1502,7 @@ mod test {
let data = web.get(path).send()?.text()?;
let dom = kuchiki::parse_html().one(data);
Ok(dom
.select(r#"a[aria-label="Platform"] + ul li a"#)
.select(r#"summary[aria-label="Platform"] + ul li a"#)
.expect("invalid selector")
.map(|el| {
let attributes = el.attributes.borrow();
Expand Down

0 comments on commit 7f6ab08

Please sign in to comment.