mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
add blank habit test
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
package org.isoron.uhabits.acceptance;
|
package org.isoron.uhabits.acceptance;
|
||||||
|
|
||||||
import androidx.test.filters.*;
|
import androidx.test.filters.*;
|
||||||
import androidx.test.runner.*;
|
|
||||||
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
@@ -81,7 +80,16 @@ public class HabitsTest extends BaseUserInterfaceTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldEditHabit() throws Exception
|
public void shouldEditHabit() throws Exception {
|
||||||
|
shouldEditHabit("this is a test description");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldEditHabitBlankDescription() throws Exception {
|
||||||
|
shouldEditHabit("");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void shouldEditHabit(String description) throws Exception
|
||||||
{
|
{
|
||||||
launchApp();
|
launchApp();
|
||||||
|
|
||||||
@@ -92,7 +100,7 @@ public class HabitsTest extends BaseUserInterfaceTest
|
|||||||
verifyShowsScreen(EDIT_HABIT);
|
verifyShowsScreen(EDIT_HABIT);
|
||||||
typeName("Take a walk");
|
typeName("Take a walk");
|
||||||
typeQuestion("Did you take a walk today?");
|
typeQuestion("Did you take a walk today?");
|
||||||
typeDescription("this is a test description");
|
typeDescription(description);
|
||||||
clickSave();
|
clickSave();
|
||||||
|
|
||||||
verifyShowsScreen(LIST_HABITS);
|
verifyShowsScreen(LIST_HABITS);
|
||||||
|
|||||||
Reference in New Issue
Block a user