Description
Describe your idea
Support for regular expression on toHaveText method.
The matcher by.text(text) supports regex matching
|
text(text: string | RegExp): NativeMatcher; |
Is possible make a change to the current API, from:
|
toHaveText(text: string): R; |
To:
toHaveText (text: string | RegExp): R;
In my test suite I used detox in combination with jest for achive this behaviour, but i think it can be useful on method toHaveText since text may include dynamic content (e.g. date, id).
Thanks in advance
Description
Describe your idea
Support for regular expression on toHaveText method.
The matcher by.text(text) supports regex matching
Detox/detox/detox.d.ts
Line 1179 in 8f4caad
Is possible make a change to the current API, from:
Detox/detox/detox.d.ts
Line 1520 in 8f4caad
To:
toHaveText (text: string | RegExp): R;In my test suite I used detox in combination with jest for achive this behaviour, but i think it can be useful on method toHaveText since text may include dynamic content (e.g. date, id).
Thanks in advance