Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recorded test (.js) fails when it runs with detox #18

Open
kneza23 opened this issue Aug 27, 2021 · 0 comments
Open

Recorded test (.js) fails when it runs with detox #18

kneza23 opened this issue Aug 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@kneza23
Copy link

kneza23 commented Aug 27, 2021

Describe the Bug
Recorded test fails on text input interaction when typing.

To Reproduce
Put this code in detox test.js
await element(by.type("RCTUITextField")).atIndex(0).tap();
await element(by.text("t")).atIndex(0).replaceText("t");
await element(by.text("t0")).atIndex(0).replaceText("t0");
......

Expected Behavior
Recorded test should fill out text inputs with recorded text

Actual Behavior
Recorded test breaks on the lines pasted above

Environment

  • macOS: 11.4
  • Xcode: 12.5
  • iOS Simulator Runtime: ios 12
  • Detox Recorder Version: 1.0.151

Logs

e2e/firstTest.e2e.js (10.094 s)
  Example
    ✕ My Recorded Test (2693 ms)

  ● Example › My Recorded Test

    Test Failed: No elements found for “MATCHER(text == “t”) AT INDEX(0)”
    TIP: To print view hierarchy on failed actions/matches, use log-level verbose or higher.

       7 |     await element(by.type("RCTUITextField")).atIndex(0).tap();
       8 |     await element(by.type("RCTUITextField")).atIndex(0).tap();
    >  9 |     await element(by.text("t")).atIndex(0).replaceText("t");
         |                                            ^
      10 |     await element(by.text("to")).atIndex(0).replaceText("to");
      11 |     await element(by.text("tom")).atIndex(0).replaceText("tom");
      12 |     await element(by.type("RCTUITextField")).atIndex(1).tap();

      at Object.replaceText (firstTest.e2e.js:9:44)

detox[52018] ERROR: [cli.js] Command failed: jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
@kneza23 kneza23 added the bug Something isn't working label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant