Replies: 2 comments 3 replies
-
You can write regular assertions with expect.extend. If you use expect.extend({
toBeFoo(received, expected) {
console.log(received) // value of expect.element(here)
console.log(expected) // value of .toBeFoo(here)
return {
pass: true,
message: () => ``
}
}
}) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot @sheremet-va! And sorry for missing that part of the documentation. From this, and from your PR, I understand that there is actually no way to receive the locator when using Maybe there should be an |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way (or plan) to write custom assertions for locators in browser mode.
The documentation shows how to write custom locators, and I would find it super-useful to have somthing similar for assertions.
Beta Was this translation helpful? Give feedback.
All reactions