test(examples): assert escaped text exactly
Make v0 and kanban DOM-aware escaped-text checks exact instead of substring-based while preserving the no-rendered-tag assertions. req: html_safety/002 req: test/005
This commit is contained in:
@@ -355,7 +355,8 @@ mod tests {
|
||||
.select(&selector("article.card[data-key=\"1\"]"))
|
||||
.next()
|
||||
.expect("card renders");
|
||||
assert!(card.text().collect::<String>().contains("<b>Compile checked</b>"));
|
||||
let title = card.select(&selector("strong")).next().expect("card title renders");
|
||||
assert_eq!(title.text().collect::<String>(), "<b>Compile checked</b>");
|
||||
assert!(card.select(&selector("b")).next().is_none());
|
||||
assert_eq!(card.select(&selector("button[disabled]")).count(), 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user