Skip to content

Commit

Permalink
migrate to latest selenide
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-rew committed Dec 4, 2023
1 parent b737c94 commit e7a8dcc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
inputs:
mvnArgs:
type: string
default: '-Divy.engine.download.url=https://dev.axonivy.com/permalink/nightly-10/axonivy-engine.zip'
default: '-Divy.engine.download.url=https://dev.axonivy.com/permalink/nightly-11.2/axonivy-engine.zip'
required: false


Expand Down
12 changes: 6 additions & 6 deletions doc-factory-demos-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<packaging>iar-integration-test</packaging>

<properties>
<project-build-plugin-version>10.0.14</project-build-plugin-version>
<web-tester.version>10.0.14</web-tester.version>
<project-build-plugin-version>11.2.0</project-build-plugin-version>
<web-tester.version>11.2.1</web-tester.version>
</properties>

<dependencies>
Expand All @@ -22,12 +22,12 @@
<groupId>com.axonivy.ivy.webtest</groupId>
<artifactId>web-tester</artifactId>
<version>${web-tester.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide-proxy</artifactId>
<version>6.9.0</version>
<version>7.0.2</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 e7a8dcc

Please sign in to comment.