Skip to content

Commit

Permalink
stabilize barcode+mail: increase timeout
Browse files Browse the repository at this point in the history
raise download timeout
  • Loading branch information
ivy-rew committed Nov 1, 2023
1 parent c701074 commit a2431ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Selenide.open;

import java.time.Duration;

import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;

Expand All @@ -26,7 +28,7 @@ public void createBarcodePage(){
$(By.id(BARCODE_STRING)).sendKeys(String.valueOf("Hello Axon Ivy"));
$(By.id(PROCEED_BUTTON)).shouldBe(visible).click();

$(By.id(BARCODE_IMAGE)).shouldBe(visible).isImage();
$(By.id(BARCODE_IMAGE)).shouldBe(visible, Duration.ofSeconds(30)).isImage();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import java.io.File;
import java.time.Duration;

import org.awaitility.Awaitility;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -32,7 +33,9 @@ public static void setUp() {
@Test
public void testMsgEmail() throws Exception {
open(EngineUrl.createProcessUrl("AsposeEmailDemo/1712BF5507F25F15/start.ivp"));
File msg = $(By.id("form:createBtn")).shouldBe(visible).download();
$(By.id("form:customer")).shouldBe(visible);
var creator = $(By.id("form:createBtn")).shouldBe(visible, Duration.ofSeconds(30));
File msg = creator.download(Duration.ofSeconds(30).toMillis());

Awaitility.await().untilAsserted(() -> {
assertThat(msg).exists();
Expand Down

0 comments on commit a2431ce

Please sign in to comment.