Skip to content

Commit

Permalink
viewEnrolledCoursesCOT4oTest passing!
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Jul 30, 2024
1 parent a9f803d commit 00a12a9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,19 @@ void viewEnrolledCoursesCOT4oTest(String email, String password, String role) {
// Setup
//String email = "[email protected]";
//String password = "password";
String[] expectedCourses = {"Course 1", "Course 2", "Course 3"};
String[] expectedCourses = {"Pseudoscientific course for treating the evil eye", "Don't mind. This is a real course"};

// Login
this.slowLogin(user, email, password);

// Verify Dashboard
try {
NavigationUtilities.toCoursesHome(driver);
// Wait for the dashboard to load
Wait.notTooMuch(driver).until(ExpectedConditions.presenceOfElementLocated(By.id("dashboard")));
Wait.notTooMuch(driver).until(ExpectedConditions.presenceOfElementLocated(COURSES_DASHBOARD_TITLE));

// Get the list of enrolled courses
List<WebElement> courses = driver.findElements(By.className("course-title"));
List<WebElement> courses = driver.findElements(By.className("title"));

// Verify the number of courses
assertEquals(expectedCourses.length, courses.size(), "Number of enrolled courses does not match");
Expand Down

0 comments on commit 00a12a9

Please sign in to comment.