diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/AViewEnrolledCoursesTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/AViewEnrolledCoursesTest.java index 6be8985..15e6d37 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/AViewEnrolledCoursesTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/AViewEnrolledCoursesTest.java @@ -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 enrolledCourses = driver.findElements(By.className("course-title")); - assertFalse(enrolledCourses.isEmpty(), "The enrolled courses list should not be empty."); + List 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.");