[
https://issues.apache.org/jira/browse/CB-10399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15198066#comment-15198066
]
ASF GitHub Bot commented on CB-10399:
-------------------------------------
Github user sgrebnov commented on the pull request:
https://github.com/apache/cordova-plugin-contacts/pull/101#issuecomment-197526519
@dblotsky We don't have manual tests - we have buttons demonstrating api
calls (for both api classes - with and without user interaction), there are no
validation logic there.
There are two options how we can proceed IMO (i'm fine with both of them):
1. Made them as real tests (as you mentioned above so you can run them w/o
appium). I actually support idea to be able to run tests manually if needed.
Where do you think should be validation logic in this case (appium side or
client app side)? Should we create separate button for each option/combination
for Camera tests for example, or use switches/etc. Also manual api code writes
results to divs/dom elements so we will have to bring extra complexity to tests
to find/parse results from dom elements before validation.
2. Don't use those buttons at all (same reason why unit tests don't rely on
calling buttons) - calling single cordova function from appium and getting
callback result is simple. This may lead to more clean/readable code and tests
definitions and simplify tests maintenance.
Agree regarding `fn.toString()`, but there is a special function for this -
you can execute function in browser context from appium.
http://webdriver.io/api/protocol/execute.html
> Implement Appium tests for Contacts plugin
> ------------------------------------------
>
> Key: CB-10399
> URL: https://issues.apache.org/jira/browse/CB-10399
> Project: Apache Cordova
> Issue Type: Task
> Components: Medic, Plugin Contacts
> Reporter: Alexander Sorokin
> Assignee: Alexander Sorokin
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]