Skip to content

Commit

Permalink
userAccessingCalendarFS4oMiniTest passing!
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Jul 30, 2024
1 parent 6b8e432 commit de6b6fb
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,16 @@ void userAccessingCalendarFS4oMiniTest(String mail, String password, String role

try {
// Step 2: User navigates to the calendar page
//NavigationUtilities.toCalendarPage(driver);
NavigationUtilities.toCoursesHome(driver);
// Step 3: System displays a calendar with all the user's classes
List<WebElement> calendarEntries = driver.findElements(By.className("calendar-entry")); // Assuming 'calendar-entry' is the class for calendar entries
List<WebElement> calendarEntries = driver.findElements(By.className("cal-day-badge")); // Assuming 'calendar-entry' is the class for calendar entries
assertFalse(calendarEntries.isEmpty(), "The calendar should display at least one class entry.");

// Additional assertions can be added here to verify the content of the calendar entries
for (WebElement entry : calendarEntries) {
assertNotNull(entry.findElement(By.className("class-title")), "Class title should be present in the calendar entry.");
// You can add more checks for date, time, etc. based on your application structure
}
Click.element(user.getDriver(),calendarEntries.get(0));
String entrytitle=user.getDriver().findElement(By.className("cal-event-title")).getText();
assertEquals("Session 1: Introduction to Web | 12:41",entrytitle,"Class title should be present in the calendar entry.");


} catch (ElementNotFoundException notFoundException) {
fail("Failed to navigate to the calendar page:: " + notFoundException.getClass() + ": " + notFoundException.getLocalizedMessage());
Expand Down

0 comments on commit de6b6fb

Please sign in to comment.