コード例 #1
0
  private void testDeleteCourseAction() {
    courseEditPage = getCourseEditPage();

    ______TS("delete course then cancel");
    courseEditPage.clickDeleteCourseLinkAndCancel();
    assertNotNull(BackDoor.getCourseAsJson(courseId));

    ______TS("delete course then proceed");
    InstructorCoursesPage coursePage = courseEditPage.clickDeleteCourseLinkAndConfirm();
    coursePage.verifyContains("Add New Course");
  }
コード例 #2
0
  private void testDeleteCourseAction() {
    // TODO: use navigateTo instead
    courseEditPage = getCourseEditPage();

    ______TS("delete course then cancel");

    courseEditPage.clickDeleteCourseLinkAndCancel();
    assertNotNull(BackDoor.getCourse(courseId));

    ______TS("delete course then proceed");

    InstructorCoursesPage coursePage = courseEditPage.clickDeleteCourseLinkAndConfirm();
    assertTrue(
        coursePage
            .getStatus()
            .contains(String.format(Const.StatusMessages.COURSE_DELETED, courseId)));
  }