From 079b0cf5567e05da35e3384ab9f2744f41f76cb7 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 30 Jul 2024 13:28:36 +0200 Subject: [PATCH] userAccessCoursesAndViewClassesCOT4oTest passing! --- .../test/llmexperimentation/BViewCourseClassesTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/BViewCourseClassesTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/BViewCourseClassesTest.java index 7e4ee1d..8d1cc24 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/BViewCourseClassesTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/llmexperimentation/BViewCourseClassesTest.java @@ -170,16 +170,17 @@ void userAccessCoursesAndViewClassesCOT4oTest(String mail, String password, Stri String courseName = courses.get(0); // Select the first course for simplicity WebElement course = CourseNavigationUtilities.getCourseByName(driver, courseName); course.findElement(By.cssSelector(".course-title")).click(); - Wait.notTooMuch(driver).until(ExpectedConditions.visibilityOfElementLocated(By.id("course-page"))); + CourseNavigationUtilities.go2Tab(driver, SESSION_ICON); + Wait.notTooMuch(driver).until(ExpectedConditions.visibilityOfElementLocated(By.className("session-data"))); // Step 4: System displays the classes within the course, ordered by date - List classes = driver.findElements(By.cssSelector(".class-item")); + List classes = driver.findElements(By.className("session-data")); assertTrue(classes.size() > 0, "No classes found in the course"); // Verify that classes are ordered by date for (int i = 1; i < classes.size(); i++) { - String previousDate = classes.get(i - 1).findElement(By.cssSelector(".class-date")).getText(); - String currentDate = classes.get(i).findElement(By.cssSelector(".class-date")).getText(); + String previousDate = classes.get(i - 1).findElement(By.className("session-datetime")).getText(); + String currentDate = classes.get(i).findElement(By.className("session-datetime")).getText(); assertTrue(previousDate.compareTo(currentDate) <= 0, "Classes are not ordered by date"); }