这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@hannesa2
Copy link
Contributor

It's a follow up from #474 @stephengroat

Additional :

  • rebased to master
  • squashed all commits
  • Android X
  • CI Espresso test

@hannesa2 hannesa2 changed the title Locally working example Espresso tests May 17, 2020
@hannesa2 hannesa2 force-pushed the espresso branch 4 times, most recently from 7b0573f to 9f35bdd Compare May 17, 2020 12:10
@hannesa2
Copy link
Contributor Author

@stephengroat
With Run it works on my machine

image

but with ./gradlew cAT on my machine, like in CI, it doesn't work

@Test
public void changeText_sameActivity() {
// wait during 15 seconds for a view
onView(isRoot()).perform(waitId(R.id.terminal_view, TimeUnit.SECONDS.toMillis(15)));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try a much longer wait time, the view might be taking a long time to populate on CI

Suggested change
onView(isRoot()).perform(waitId(R.id.terminal_view, TimeUnit.SECONDS.toMillis(15)));
onView(isRoot()).perform(waitId(R.id.terminal_view, TimeUnit.SECONDS.toMillis(300)));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it, but as is looks like Espresso has a build-in-function to not wait too long

Error performing 'wait for a specific view with id <2131034142> during 300000 millis.' on view 'is a root view.'.

Independent of this, when a view doesn't appear within 15/30 seconds, something other is wrong.
Why it works with Run in IDE, and not with command line ?

@hannesa2 hannesa2 closed this Apr 20, 2021
@hannesa2 hannesa2 deleted the espresso branch April 20, 2021 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants