Skip to content

Commit

Permalink
Revert "chore: remove fake error from expect calls (#28112)" (#29271)
Browse files Browse the repository at this point in the history
This reverts commit 2c3955a.

Relates microsoft/playwright-python#2258
  • Loading branch information
mxschmitt authored Jan 31, 2024
1 parent 15a2025 commit 622153d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ export class FrameDispatcher extends Dispatcher<Frame, channels.FrameChannel, Br
const result = await this._frame.expect(metadata, params.selector, { ...params, expectedValue });
if (result.received !== undefined)
result.received = serializeResult(result.received);
if (result.matches === params.isNot)
metadata.error = { error: { name: 'Expect', message: 'Expect failed' } };
return result;
}
}

0 comments on commit 622153d

Please sign in to comment.