Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Espresso Test failing in TopicPracticeFragmentTest #3413

Closed
rt4914 opened this issue Jul 5, 2021 · 6 comments · Fixed by #3743
Closed

Espresso Test failing in TopicPracticeFragmentTest #3413

rt4914 opened this issue Jul 5, 2021 · 6 comments · Fixed by #3743
Assignees
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@rt4914
Copy link
Contributor

rt4914 commented Jul 5, 2021

testTopicPracticeFragment_loadFragment_selectSubtopics_clickStartButton_skillListTransferSuccessfully is failing

Screenshot 2021-07-06 at 1 08 25 AM

@rt4914 rt4914 added Type: Improvement Priority: Essential This work item must be completed for its milestone. labels Jul 5, 2021
@rt4914 rt4914 added this to the Backlog milestone Jul 5, 2021
@rt4914 rt4914 added this to Needs Triage in CLAM Team (deprecated -- please use new board) via automation Jul 11, 2021
@rt4914 rt4914 moved this from Needs Triage to Beta in CLAM Team (deprecated -- please use new board) Jul 11, 2021
@rt4914 rt4914 moved this from Beta (Features & Tasks) to Beta (Bugs & Fixes) in CLAM Team (deprecated -- please use new board) Jul 12, 2021
@rt4914 rt4914 moved this from Beta (Bugs & Fixes) to Beta (Features & Tasks) in CLAM Team (deprecated -- please use new board) Jul 12, 2021
@rt4914 rt4914 moved this from Beta (Miscellaneous) to Test Fixes in CLAM Team (deprecated -- please use new board) Jul 12, 2021
@rt4914 rt4914 moved this from Test Fixes to Backlog (things to organize into workstreams) in CLAM Team (deprecated -- please use new board) Aug 4, 2021
@yash10019coder yash10019coder self-assigned this Aug 13, 2021
@yash10019coder
Copy link
Contributor

@rt4914 when I try to run the above test nothing happens it neither shows test passed nor shows test failed please help
Screenshot from 2021-08-13 15-30-11

@rt4914
Copy link
Contributor Author

rt4914 commented Aug 16, 2021

@yash10019coder Can you share an screenshot showing if other tests are passing for you?

@yash10019coder
Copy link
Contributor

@rt4914 that issue is fixed now the tests are running now

@yash10019coder
Copy link
Contributor

yash10019coder commented Aug 17, 2021

@Test fun abc(){
    launchTopicActivityIntent(internalProfileId, FRACTIONS_TOPIC_ID)
    clickPracticeTab()
    onView(atPositionOnView(
      recyclerViewId =R.id.topic_practice_skill_list,
      position=1,
      targetViewId=R.id.subtopic_check_box
    )).perform(click())
    scrollToPosition(5)
    onView(atPositionOnView(
      recyclerViewId =R.id.topic_practice_skill_list,
      position=5,
      targetViewId=R.id.topic_practice_start_button
    )).perform(click())
}

@rt4914 I have added this code and all the clicks are happening in the test it reaches to the Next Activity and then the error comes
I have also referred to https://stackoverflow.com/questions/29786413/performexception-error-performing-single-click but it didn't helped much as no soft keyboard is opening
Still getting the same error as mentioned above in the issue
please help

@rt4914
Copy link
Contributor Author

rt4914 commented Aug 23, 2021

@anandwana001 @BenHenning Can you please look into this?

@anandwana001
Copy link
Contributor

The actual error here is:

Caused by: androidx.test.espresso.IdlingResourceTimeoutException: Wait for [TestCoroutineDispatcherIdlingResource] to become idle timed out
at androidx.test.espresso.IdlingPolicy.handleTimeout(IdlingPolicy.java:61)

If you see in the emulator when running the test, it did all the steps, the QuestionPlayerActivity is also opening, but for idling resource, before the execution comes to intended and check the activity, the time out thing occurs and it throws THROW_IDLE_TIMEOUT.

CLAM Team (deprecated -- please use new board) automation moved this from Backlog (things to organize into workstreams) to Closed Sep 8, 2021
rt4914 pushed a commit that referenced this issue Sep 8, 2021
…3743)

* Fixed test not passing in this testTopicPracticeFragment_loadFragment_selectSubtopics_clickStartButton_skillListTransferSuccessfully by unregistering the idling resouce in it

* removed a unused import as ktlint was failing

* Added .use after launcing the activity and added all code inside it

* formatted the file

* removed unused import

* Fixed Idling resources issue
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

Successfully merging a pull request may close this issue.

4 participants