Git Product home page Git Product logo

detox-getprops's People

Contributors

plaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sergtimosh

detox-getprops's Issues

does it work on IOS? (detox-getprops library might not be compatible with this version of Detox)

when I try to use it on ios, I am getting this error:

Could not parse exception message. detox-getprops library might not be compatible with this version of Detox.

    Message:
    Test Failed: Failed expectation: TOHAVETEXT(text == “_unfoundable_text”) WITH MATCHER(identifier: == “wantsNewsBtn”)
    TIP: To print view hierarchy on failed actions/matches, use loglevel verbose and above.

      at parseMessage (../node_modules/detox-getprops/index.js:48:9)
      at getProps (../node_modules/detox-getprops/index.js:12:12)

detox --version
17.4.3

as there is getAttributes on ios, is this intended to be used on Android only?

thanks, cheers, dan

Last property is ignored by parseMessage function

There is some issue in error message parsing function. "is-checked" isn't included in the returned object.

Actual result:
Error message output:

Error: Test Failed: '(with text: is "some_txt" and view has effective visibility=VISIBLE)' doesn't match the selected view. Expected: (with text: is "some_txt" and view has effective visibility=VISIBLE) Got: "ReactSwitch{id=6287, visibility=VISIBLE, width=128, height=74, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@a762706, tag=toggle-switch, root-is-layout-requested=false, has-input-connection=false, x=868.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=false}"

getProps object:
{ id: '6287', visibility: 'VISIBLE', width: '128', height: '74', 'has-focus': 'false', 'has-focusable': 'true', 'has-window-focus': 'true', 'is-clickable': 'true', 'is-enabled': 'true', 'is-focused': 'false', 'is-focusable': 'true', 'is-layout-requested': 'true', 'is-selected': 'false', 'layout-params': 'android.view.ViewGroup$LayoutParams@a762706', tag: 'toggle-switch', 'root-is-layout-requested': 'false', 'has-input-connection': 'false', x: '868.0', y: '0.0', text: '', 'input-type': '0', 'ime-target': 'false', 'has-links': 'false', device: 'android', type: 'ReactSwitch' }

Expected result: " is-checked" and it's value should be in the getProps object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.