Skip to content

Commit e0006b3

Browse files
committed
Update html tests to account for recent changes
1 parent 874da17 commit e0006b3

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

features/step_definitions/html_steps.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Then(
8181

8282
const dd = await findByText(
8383
dom.window.document.documentElement,
84-
/\d+% passed/,
84+
/\d+% \(\d+ \/ \d+\) passed/,
8585
{ selector: "span" },
8686
);
8787

@@ -139,23 +139,8 @@ Then(
139139
}
140140
}
141141

142-
const stepsContainers = await findAllByLabelText(
143-
dom.window.document.documentElement,
144-
"Steps",
145-
);
146-
147-
const matchingSteps = stepsContainers.reduce(
148-
(matchingSteps: Element[], stepsContainer: HTMLElement) => {
149-
return [
150-
...matchingSteps,
151-
...Array.from(
152-
stepsContainer.querySelectorAll(
153-
`[data-status="${status.toUpperCase()}"]`,
154-
),
155-
),
156-
];
157-
},
158-
[],
142+
const matchingSteps = dom.window.document.querySelectorAll(
143+
`li[data-status="${status.toUpperCase()}"]`,
159144
);
160145

161146
assert.equal(matchingSteps.length, n);

0 commit comments

Comments
 (0)