You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/methods.md
+211-1Lines changed: 211 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,12 @@ Grabs a screenshot from the simulator and stores it under `latest` screenshots(i
10
10
11
11
#### Example
12
12
13
-
```js{5}
13
+
```jstitle="__tests__/App.owl.tsx"
14
14
import { takeScreenshot } from'react-native-owl';
15
15
16
16
describe('App.tsx', () => {
17
17
it('takes a screenshot of the first screen', async () => {
18
+
// highlight-next-line
18
19
constscreen=awaittakeScreenshot('homescreen');
19
20
20
21
expect(screen).toMatchBaseline();
@@ -25,3 +26,212 @@ describe('App.tsx', () => {
25
26
The first time this test is run, or when run with the `--update` flag, the screenshot will be stored at `./owl/baseline/ios/homescreen.png` (or `/android/` is testing on Android).
26
27
27
28
On subsequent test runs, the screenshot will be stored at `./owl/current/ios/homescreen.png`.
29
+
30
+
### toExist(testID: string)
31
+
32
+
Waits for an element to exist where its `testID` prop matches the methods `testID` argument.
33
+
34
+
If there is no matching element, it will retry for 10 seconds before throwing an Error.
Copy file name to clipboardExpand all lines: docs/introduction/work-in-progress.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,4 @@ title: Work In Progress
7
7
8
8
### Future functionality
9
9
10
-
- We plan to integrate [Detox](https://wix.github.io/Detox/) into the library, and add methods to our [API](/docs/api/methods) to allow tests to interact with the app. For example, this could allow the particular button to be tapped, or screen to be scrolled, before taking and comparing a screenshot as part of a test.
11
-
12
10
- We will automate the launching to the relevant simulator, if not already running, when running tests.
0 commit comments