Closed WiseIndian closed 9 years ago
I'll set up your code locally on my machine and try the test and potential solutions.
Thank you very much Radu for trying to help :)
I tried refactoring into something simpler to avoid using textFields [Espresso ActivityInstrumentationTestCase2](https://github.com/sweng-epfl-2014/sweng-team-project-radin/blob/issue%2377/ProjectRadinAndroidApp/tests/src/ch/epfl/sweng/radin/test/databases/DatabaseRadinGroupTableActivityEspressoTest.java] to test DatabaseRadinGroupTableActivity that has this layout but now I'm getting a new error: stackTrace I really don't know what to do Also interesting information I did put a Log.d in the setUp method of my ActivityInstrumentationTestCase2 implementation class but I can only see the one before getActivity() the one after stays invisible in my LogCat console, and in the Junit console I get the same error(same stack strace) for every tests in DatabaseRadinGroupTableActivityEspressoTest even if I comment the one using actual UI elements of the activity..
I solved my problem!! tests now work, my solution was quite radical since I recreated new classes with same code inside
Hello @sweng-epfl-2014/sweng-team-project-radin @philemonf , @radubanabic , I need help for testing DatabaseRadinGroupTableActivity (that is scrollable as defined in its layout ) with Espresso framework using DatabaseRadinGroupTableActivityEspressoTest
My problem is that in DatabaseRadinGroupTableActivityEspressoTest I invoke scrollTo() on each view I want to perform an action onto before performing it(actions like typing text, or clicking on submit button) but even though I'm doing that I'm getting a nasty error basically saying he can't perform the click on the Button all that when I erase that line: "assertTrue(withEffectiveVisibility(Visibility.VISIBLE).matches(withId(R.id.submitRadinGroupToDB)));"
When keeping the assert true(testing whether the button is visible or not), instead I get an AssertionFailedError.
So it seems I can't scroll to my button and perform a click on it :/ So I'm thinking of avoiding the problem by simply not using textEdit to test my DB but it's a bit like avoiding the problem.. and I'd like to understand what is happening Thank you all :)