コード例 #1
0
  @Before
  public void before() {

    super.before();

    if (!user.isAnyTaskExistInTree()) {
      user.createNewTaskWhenTreeEmpty();
    }

    user.focusOut(); // if we create a new task on empty tree, we already focus on first item
    user.focusToRootTaskItem(0);
  }
コード例 #2
0
  @Before
  public void before() {

    super.before();

    // same task name may make confuse, It's better to clear all task
    if (user.isAnyTaskExistInTree()) {
      user.clearAllTasks();
    }

    // Create tasks for test
    if (!user.isAnyTaskExistInTree()) {
      user.createNewTaskWhenTreeEmpty("NewTask");

      while (user.getRootLevelItemsLength() < 3) {
        user.focusToRootTaskItem(0);
        user.insertNewTaskBelowCurrentTask("HelloTask" + user.getRootLevelItemsLength());
      }
    }

    // Prepare tag to test
    if (!user.getTagAction().hasTagNameInTagManagementList(overdueTag)) {
      user.getTagAction().createTagWithTagManagement(overdueTag);
    }

    if (!user.getTagAction().hasTagNameInTagManagementList(todayTag)) {
      user.getTagAction().createTagWithTagManagement(todayTag);
    }

    if (!user.getTagAction().hasTagNameInTagManagementList(laterTag)) {
      user.getTagAction().createTagWithTagManagement(laterTag);
    }

    // now we have three task on tree
    user.focusOnProjectTitle();
  }