package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ClearCommandTest extends EzDoGuiTest {

    @Test
    public void clear() {

        //verify a non-empty list can be cleared
        assertTrue(taskListPanel.isListMatching(td.getTypicalTasks()));
        assertClearCommandSuccess();

        //verify other commands can work after a clear command
        commandBox.runCommand(td.hoon.getAddCommand(false));
        assertTrue(taskListPanel.isListMatching(td.hoon));
        commandBox.runCommand("kill 1");
        assertListSize(0);

        //verify clear command works when the list is empty
        assertClearCommandSuccess();
    }

    private void assertClearCommandSuccess() {
        commandBox.runCommand("clear");
        assertListSize(0);
        assertResultMessage("EzDo has been cleared!");
    }
}

@@ -325,16 +325,229 @@
 Success(
+false);%0A%0A        //verify a non-empty list can be cleared using the short clear command%0A        commandBox.runCommand(td.jack.getAddCommand(true));%0A        assertListSize(1);%0A        assertClearCommandSuccess(true
 );%0A%0A    
@@ -888,16 +888,21 @@
 Success(
+false
 );%0A    %7D
@@ -946,20 +946,137 @@
 Success(
-) %7B%0A
+boolean usesShortCommand) %7B%0A        if (usesShortCommand) %7B%0A            commandBox.runCommand(%22c%22);%0A        %7D else %7B%0A    
         
@@ -1103,24 +1103,34 @@
 d(%22clear%22);%0A
+        %7D%0A
         asse

Add test for shortened clear command