This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Docs and types * Update matcher and tests
- Loading branch information
Showing
5 changed files
with
102 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 12 additions & 16 deletions
28
src/matchers/toHaveFocus/__snapshots__/index.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`toHaveFocus negative: target element don't have focus 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mtoHaveFocus[2m([22m[32mexpected[39m[2m)[22m | ||
exports[`toHaveFocus element negative 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mtoHaveFocus[2m()[22m | ||
Expected: element to have focus" | ||
Expected: [32mtrue[39m | ||
Received: [31mfalse[39m" | ||
`; | ||
|
||
exports[`toHaveFocus negative: target element not found 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mtoHaveFocus[2m([22m[32mexpected[39m[2m)[22m | ||
exports[`toHaveFocus selector negative 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mtoHaveFocus[2m()[22m | ||
Expected: element to have focus | ||
Received: element was not found" | ||
Expected: [32mtrue[39m | ||
Received: [31mfalse[39m" | ||
`; | ||
|
||
exports[`toHaveFocus timeout should throw an error after the timeout exceeds 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mtoHaveFocus[2m([22m[32mexpected[39m[2m)[22m | ||
exports[`toHaveFocus timeout should throw an error after the timeout exceeds 1`] = `"Error: Timeout exceed for element '#foobar'"`; | ||
|
||
Expected: element to have focus | ||
Received: element was not found" | ||
`; | ||
|
||
exports[`toHaveFocus with 'not' usage negative: target element has focus 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mnot[2m.[22mtoHaveFocus[2m([22m[32mexpected[39m[2m)[22m | ||
exports[`toHaveFocus with 'not' usage negative 1`] = ` | ||
"[2mexpect([22m[31mreceived[39m[2m).[22mnot[2m.[22mtoHaveFocus[2m()[22m | ||
Expected: element to not have focus" | ||
Expected: not [32mtrue[39m" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters