Skip to content

Commit

Permalink
viewEnrolledCoursesFS4oMiniTest passing!
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Jul 30, 2024
1 parent 00a12a9 commit 216d6be
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ void viewEnrolledCoursesFS4oMiniTest(String mail, String password, String role)
NavigationUtilities.toCoursesHome(driver);

// Wait for the courses list to be visible
Wait.notTooMuch(driver).until(ExpectedConditions.visibilityOfElementLocated(By.id("enrolledCoursesList")));
Wait.notTooMuch(driver).until(ExpectedConditions.visibilityOfElementLocated(By.id("course-list")));

// Verify that the dashboard shows a list of courses the user is enrolled in
List<WebElement> enrolledCourses = driver.findElements(By.className("course-title"));
assertFalse(enrolledCourses.isEmpty(), "The enrolled courses list should not be empty.");
List<WebElement> enrolledCourses = driver.findElements(By.className("course-list-item"));
assertFalse(enrolledCourses.size()!=2, "The enrolled courses list should not be empty.");

// Optionally, you can check for specific course titles if known
// assertTrue(enrolledCourses.stream().anyMatch(course -> course.getText().equals("Expected Course Title")), "Expected course is not found in the enrolled courses list.");
Expand Down

0 comments on commit 216d6be

Please sign in to comment.