#394 Add support for viewmatcher #516
Conversation
...c/androidTest/java/io/appium/espressoserver/lib/model/ViewMatcherJson.kt
Outdated
Show resolved
Hide resolved
.../src/androidTest/java/io/appium/espressoserver/lib/helpers/ViewFinder.kt
Outdated
Show resolved
Hide resolved
.../src/androidTest/java/io/appium/espressoserver/lib/helpers/ViewFinder.kt
Outdated
Show resolved
Hide resolved
| args: 'Picture getExternalFilesDir', | ||
| class: 'androidx.test.espresso.matcher.ViewMatchers' | ||
| })).should.eventually.exist; | ||
| await driver.back(); |
mykola-mokhnach
Dec 6, 2019
Contributor
please do not make the test dependent on each other. failure of the first test will make all the following to fail
please do not make the test dependent on each other. failure of the first test will make all the following to fail
|
cc @dpgraham about viewmatcher |
|
The last questions are these dependent tests. I particularly don't like the fact, that we perform What do you think @dpgraham ? |
I am glad you asked it. I actually tried to simulate the scenario where you fail the 1st test case and all the cases immediately after them actually fails. Then, i just followed the way it's done in other test cases. I would be more than happy to change it and totally isolate them.
Let me know which one do you guys think is the best way to go? |
Not all of these tests require additional setup, so I would rather extract these, that work in the same view to a separate sub-suite and reinit the app for all such sub-suites to avoid calling |
What i understand from this is let's divide our test cases into two different files.
Is my understanding correct? |
not necessarily. We can still keep the stuff in the same file. The structure might be as following: describe('independent tests') { ... } describe('dependent tests') { ... } |
I really dont understand the need of creating a new driver instance every time. I actually tried to write some pseudo code for both logic
Conclusion i came upon, `describe.only('find elements', function () { let driver; |
|
resetApp call won't save time, since internally it does exactly the same thing as driver.quit/driver.init. What we could try is to use deep linking in order to switch between views (e.g. start the corresponding intent for each view). As far as I remember in the Catalog app each entry is represented by a separate activity. |
I don't know much about deep linking and I think the demo app we are using doesn't support it. |
yes it does |
|
|
||
| before(async function () { | ||
| driver = await initSession(APIDEMO_CAPS); | ||
| driver.startActivity({ |
mykola-mokhnach
Dec 18, 2019
Contributor
this method should be awaited
this method should be awaited
o-x-y-g-e-n
Dec 18, 2019
Author
Contributor
Forgot that. So Sorry.
Forgot that. So Sorry.
|
Good job. Thanks |
d2f8010
into
appium:master


Added support for viewmatcher which almost works similar to datamatcher.