Skip to content

Commit

Permalink
Revert "Update Cypress"
Browse files Browse the repository at this point in the history
This reverts commit 3058d29.
  • Loading branch information
igor-korost committed Mar 6, 2024
1 parent 3058d29 commit c6e5fb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,14 @@ public void checkSnackbarWithNoActionTest() {

@Test
public void checkSnackbarDurationTest() {
final int DURATION = 5; // Duration in seconds
final int DURATION = 5;

// Set the duration for the snackbar visibility
snackBarPage.durationInput.setValue(String.valueOf(DURATION));
JAction action = () -> {
snackBarPage.customSnackbar.base().timer().wait(() -> snackBarPage.customSnackbar.isDisplayed());
snackBarPage.customSnackbar.base().timer().wait(() -> snackBarPage.customSnackbar.isHidden());
};

// Open the custom snackbar
snackBarPage.durationInput.setValue(String.valueOf(DURATION));
snackBarPage.customSnackbarOpenButton.click();

// Wait for the snackbar to be displayed
snackBarPage.customSnackbar.base().timer().waitFor(() -> snackBarPage.customSnackbar.isDisplayed(), DURATION, "Snackbar did not appear in expected time");

// Then, wait for the snackbar to disappear.
// Assuming snackbar visibility duration is DURATION, add a buffer to wait for disappearance.
int waitTimeForDisappearance = DURATION + 2; // Adding a buffer time for it to disappear
snackBarPage.customSnackbar.base().timer().waitFor(() -> snackBarPage.customSnackbar.isHidden(), waitTimeForDisappearance, "Snackbar did not disappear in expected time");
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
arguments=--headed
arguments=--headless

0 comments on commit c6e5fb5

Please sign in to comment.