Skip to content

Commit 86ec7c1

Browse files
Removed '.locator("#stepsList li:last-of-type")' tooltip from the panel
1 parent 26fd475 commit 86ec7c1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/test.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ const test = pwTest.extend<{
6767

6868
await testControl.page.pause();
6969

70-
const lastStep = await testControl.page
71-
.locator("#stepsList li:last-of-type")
72-
.textContent();
73-
7470
// If last step failed, throw error
75-
if (lastStep!.includes("❌")) {
76-
throw new TestFailedError(lastStep as string);
71+
const hasFailed = await testControl.page.evaluate(() => {
72+
if ((window as any).testUtils.hasFailed) {
73+
delete (window as any).testUtils.hasFailed;
74+
return true;
75+
}
76+
return false;
77+
});
78+
if (hasFailed) {
79+
throw new TestFailedError(stepName as string);
7780
}
7881
},
7982
{ box: true }

src/ui/components/TestControls.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default function TestControls() {
3434
className="btn-danger"
3535
onClick={() => {
3636
dispatch({ type: 'FAIL_STEP', payload: failureReason || 'No failure reason provided' });
37+
(window as any).testUtils.hasFailed = true;
3738
(window as any).playwright?.resume();
3839
setFailureReason('');
3940
trackButtonClick('fail_step');

0 commit comments

Comments
 (0)