Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuSoysal authored Apr 26, 2023
1 parent fc49d3e commit f78f16b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/main/java/io/github/mathieusoysal/Roboto.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ public void refreshPage() {
LOGGER.info(() -> "Page refreshed");
}

public boolean checkinButtonIsNotPresent() {
public boolean checkinButtonIsPresent() {
page.waitForLoadState();
if (pageContent.equals(""))
pageContent = page.content();
return pageContent.equals(page.content());
return !pageContent.equals(page.content());
}

public void subcribeToCheckIn() {
Expand All @@ -112,7 +112,8 @@ public void subcribeToCheckIn() {
@Override
public void close() {
if (telemetry) {
String archiveName = trace + "-" + LocalDateTime.now(ZoneId.systemDefault()).toString().replaceAll(":", "-")
String archiveName = "archive/" + trace + "-"
+ LocalDateTime.now(ZoneId.systemDefault()).toString().replaceAll(":", "-")
+ ".zip";
context.tracing().stop(new Tracing.StopOptions()
.setPath(Paths.get(archiveName)));
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/github/mathieusoysal/RobotoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void testCheckinButtonIsNotPresent() throws EmailFieldNotFoundException, Passwor
Roboto roboto = new Roboto(false);
roboto.getPage().setDefaultTimeout(1000);
roboto.connect(System.getenv("TEST_EMAIL"), System.getenv("TEST_PASSWORD"));
assertTrue(roboto.checkinButtonIsNotPresent());
assertTrue(roboto.checkinButtonIsNotPresent());
assertFalse(roboto.checkinButtonIsPresent());
assertFalse(roboto.checkinButtonIsPresent());
}

}

0 comments on commit f78f16b

Please sign in to comment.