plaa / detox-getprops Goto Github PK
View Code? Open in Web Editor NEWAllows fetching an element text contents using Detox
License: ISC License
Allows fetching an element text contents using Detox
License: ISC License
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.