Function
step
(root: HTMLElement, kind: string, what?: RegExp)
Source from the content-addressed store, hash-verified
| 118 | })) |
| 119 | |
| 120 | const step = (root: HTMLElement, kind: string, what?: RegExp) => { |
| 121 | const found = steps(root).find((step) => step.kind === kind && (what === undefined || what.test(step.what))) |
| 122 | assert.isDefined( |
| 123 | found, |
| 124 | "no chain step " + kind + " in " + |
| 125 | JSON.stringify(steps(root).map((step) => step.kind + ": " + step.what)) |
| 126 | ) |
| 127 | return found! |
| 128 | } |
| 129 | |
| 130 | const headline = (root: HTMLElement) => text(root.querySelector(".ehead .headline")) |
| 131 | const subtitle = (root: HTMLElement) => text(root.querySelector(".ehead .sub")) |
Tested by
no test coverage detected