Conversation
|
Can one of the admins verify this patch? Also need an authorization to run tests. |
|
|
||
| //Some background tasks are slow (for example ColorRule), force a wait | ||
| Thread.sleep(WAIT); | ||
| Thread.sleep(3000); |
There was a problem hiding this comment.
Why did you replace the constant with a number? It is a better style to have constant values.
| //Move to Survey | ||
| onView(withId(R.id.menu_edit_row)).perform(click()); | ||
|
|
||
| //changed the instanceId from "906c2b4f-b9d2-4aa1-bbb0-e754d66325ff" to null because the test was crashing with an junit.framework.AssertionFailedError: Wanted to match 1 intents. Actually matched 0 intents |
There was a problem hiding this comment.
This is not testing the same thing so there is an error somewhere. What is happening to the intent? When you perform a click on the edit row it should launch an intent.
|
|
||
| intended(ODKMatchers | ||
| .hasTable(T_HOUSE_E_TABLE_ID, T_HOUSE_E_TABLE_ID, "1ed5404f-c501-4308-ac0f-a080c13ae5c4")); | ||
| //changed the instanceId from "1ed5404f-c501-4308-ac0f-a080c13ae5c4" to null because the test was crashing with an junit.framework.AssertionFailedError: Wanted to match 1 intents. Actually matched 0 intents |
There was a problem hiding this comment.
Again this is a problem, the test is no longer doing the same thing.
| .constructFormType(activity, APP_NAME, T_HOUSE_E_TABLE_ID) | ||
| .setFormId(currFormId[0]); | ||
| } catch (ServicesAvailabilityException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
Why is there no fail here? Tests will automatically fail if there is an exception. By you adding a catch exception the test will no longer fail, so you need to call fail.
There was a problem hiding this comment.
Note, now I am not sure this catch is needed at all so if it is, address the above comment. However, first see if it's needed.
|
|
||
| @Test | ||
| public void display_badFormId() throws ServicesAvailabilityException { | ||
| public void display_badFormId() { |
There was a problem hiding this comment.
After reviewing this more carefully I am not sure we need the catch statement at all.
Therefore, you can do the assert with the activity -> { (assert here) }
And eliminate the need for a weird final array.
This PR updates the Tests in Tables to use the most recent Android Testing Framework