Skip to content

Commit

Permalink
Merge pull request #242 from axonivy-market/selenidev2
Browse files Browse the repository at this point in the history
Selenidev2
  • Loading branch information
ivy-rew authored Dec 6, 2023
2 parents b737c94 + d135df5 commit 6c99735
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
uses: './.github/workflows/ci.yml'
secrets: inherit
with:
mvnArgs: '"-Divy.engine.download.url=https://dev.axonivy.com/permalink/dev/axonivy-engine.zip" "-Divy.engine.version=11.3.0" "-Dproject-build-plugin-version=11.3.0-SNAPSHOT" "-Dweb-tester.version=11.3.0-SNAPSHOT" -Dmaven.deploy.skip=true'
mvnArgs: '"-Divy.engine.download.url=https://dev.axonivy.com/permalink/dev/axonivy-engine.zip" "-Divy.engine.version=11.3.0" "-Dproject-build-plugin-version=11.3.0-SNAPSHOT" "-Dweb-tester.version=11.3.0-SNAPSHOT" "-Dselenide.version=7.0.3" -Dmaven.deploy.skip=true'

2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.axonivy.utils.docfactory</name>
<name>DocFactoryModules</name>
<comment></comment>
<projects>
</projects>
Expand Down
3 changes: 2 additions & 1 deletion aspose-email-demo-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<properties>
<project-build-plugin-version>10.0.14</project-build-plugin-version>
<web-tester.version>10.0.14</web-tester.version>
<selenide.version>6.9.0</selenide.version>
</properties>

<dependencies>
Expand All @@ -33,7 +34,7 @@
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide-proxy</artifactId>
<version>6.9.0</version>
<version>${selenide.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
3 changes: 2 additions & 1 deletion doc-factory-demos-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<properties>
<project-build-plugin-version>10.0.14</project-build-plugin-version>
<web-tester.version>10.0.14</web-tester.version>
<selenide.version>6.9.0</selenide.version>
</properties>

<dependencies>
Expand All @@ -27,7 +28,7 @@
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide-proxy</artifactId>
<version>6.9.0</version>
<version>${selenide.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import static com.codeborne.selenide.Selenide.open;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.FileNotFoundException;
import java.nio.file.Path;

import org.junit.jupiter.api.BeforeAll;
Expand Down Expand Up @@ -60,7 +59,7 @@ void docWithNestedTablesHTML() throws Exception {
}

@Test
void zipMultipleDocuments() throws FileNotFoundException {
void zipMultipleDocuments() throws Exception {
open(EngineUrl.createProcessUrl("/DocFactoryDemos/16CD7829EF6B489B/start2.ivp"));
var doc = Selenide.$$("button").find(exactText("Create Multiple Formats")).shouldBe(visible).download();
assertThat(doc).hasName("Documents.zip");
Expand All @@ -86,7 +85,7 @@ void ivyDocApi(WebAppFixture fixture) {
$("iframe").shouldBe(visible);
}

private void assertDownload(String process, String expectedFileName) throws FileNotFoundException {
private void assertDownload(String process, String expectedFileName) throws Exception {
open(EngineUrl.createProcessUrl(DOC_DEMOS_BASE + process));
var doc = $("#docLink").shouldBe(visible).download();
assertThat(doc).hasName(expectedFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import static com.codeborne.selenide.Selenide.open;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.FileNotFoundException;
import java.nio.file.Path;
import java.time.Duration;

Expand Down Expand Up @@ -62,11 +61,11 @@ void docWithNestedObject() throws Exception {
assertDownload("start6.ivp", "DocWithNestedObject.pdf");
}

private void assertDownload(String process, String expectedFileName) throws FileNotFoundException {
private void assertDownload(String process, String expectedFileName) throws Exception {
open(EngineUrl.createProcessUrl(DOC_DEMOS_BASE + process));
var doc = $("#docLink").shouldBe(visible).download(DownloadOptions.using(FileDownloadMode.PROXY)
.withTimeout(Duration.ofSeconds(10))
.withFilter(FileFilters.withName(expectedFileName)));
.withFilter(FileFilters.withName(expectedFileName)));

assertThat(doc).hasName(expectedFileName);
assertThat(doc.length() / 1024).isGreaterThan(15);
Expand Down

0 comments on commit 6c99735

Please sign in to comment.