mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
added create habit test for description
This commit is contained in:
@@ -38,7 +38,16 @@ import static org.isoron.uhabits.acceptance.steps.ListHabitsSteps.*;
|
|||||||
public class HabitsTest extends BaseUserInterfaceTest
|
public class HabitsTest extends BaseUserInterfaceTest
|
||||||
{
|
{
|
||||||
@Test
|
@Test
|
||||||
public void shouldCreateHabit() throws Exception
|
public void shouldCreateHabit() throws Exception {
|
||||||
|
shouldCreateHabit("this is a test description");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldCreateHabitBlankDescription() throws Exception {
|
||||||
|
shouldCreateHabit("");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void shouldCreateHabit(String description) throws Exception
|
||||||
{
|
{
|
||||||
launchApp();
|
launchApp();
|
||||||
|
|
||||||
@@ -46,14 +55,16 @@ public class HabitsTest extends BaseUserInterfaceTest
|
|||||||
clickMenu(ADD);
|
clickMenu(ADD);
|
||||||
|
|
||||||
verifyShowsScreen(EDIT_HABIT);
|
verifyShowsScreen(EDIT_HABIT);
|
||||||
typeName("Hello world");
|
String testName = "Hello world";
|
||||||
|
typeName(testName);
|
||||||
typeQuestion("Did you say hello to the world today?");
|
typeQuestion("Did you say hello to the world today?");
|
||||||
|
typeDescription(description);
|
||||||
pickFrequency("Every week");
|
pickFrequency("Every week");
|
||||||
pickColor(5);
|
pickColor(5);
|
||||||
clickSave();
|
clickSave();
|
||||||
|
|
||||||
verifyShowsScreen(LIST_HABITS);
|
verifyShowsScreen(LIST_HABITS);
|
||||||
verifyDisplaysText("Hello world");
|
verifyDisplaysText(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user