-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
viewEnrolledCoursesCOT4oTest passing!
- Loading branch information
1 parent
a9f803d
commit 00a12a9
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"); | ||
|