From 79d083467f5918ceddbad9ede9b76c7c471a6685 Mon Sep 17 00:00:00 2001 From: Fabian Heuberger Date: Thu, 2 Nov 2023 12:13:42 +0100 Subject: [PATCH] XIVY-12667 Upgraded buildplugin to 10.0.14 enabled and configured webtests --- threema-connector-demo/pom.xml | 2 +- threema-connector-test/pom.xml | 4 ++-- threema-connector-webtest/pom.xml | 10 ++++++++-- .../webtest/MessageMultipleRecipientsTest.java | 9 ++++++--- .../connector/webtest/MessageSingleRecipientTest.java | 9 ++++++--- threema-connector/pom.xml | 2 +- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/threema-connector-demo/pom.xml b/threema-connector-demo/pom.xml index 981dd84..dddf810 100644 --- a/threema-connector-demo/pom.xml +++ b/threema-connector-demo/pom.xml @@ -18,7 +18,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + 10.0.14 true diff --git a/threema-connector-test/pom.xml b/threema-connector-test/pom.xml index f614ad4..cac22d0 100644 --- a/threema-connector-test/pom.xml +++ b/threema-connector-test/pom.xml @@ -15,7 +15,7 @@ com.axonivy.ivy.test unit-tester - 10.0.0 + 10.0.14 test @@ -36,7 +36,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + 10.0.14 true diff --git a/threema-connector-webtest/pom.xml b/threema-connector-webtest/pom.xml index fd5ebe5..cfa091a 100644 --- a/threema-connector-webtest/pom.xml +++ b/threema-connector-webtest/pom.xml @@ -12,10 +12,16 @@ ${project.version} iar + + com.axonivy.connector.threema + threema-connector-test + ${project.version} + iar + com.axonivy.ivy.webtest web-tester - 10.0.0 + 10.0.14 test @@ -25,7 +31,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + 10.0.14 true diff --git a/threema-connector-webtest/src_test/threema/connector/webtest/MessageMultipleRecipientsTest.java b/threema-connector-webtest/src_test/threema/connector/webtest/MessageMultipleRecipientsTest.java index 44bea27..ed26b67 100644 --- a/threema-connector-webtest/src_test/threema/connector/webtest/MessageMultipleRecipientsTest.java +++ b/threema-connector-webtest/src_test/threema/connector/webtest/MessageMultipleRecipientsTest.java @@ -7,20 +7,23 @@ import static com.codeborne.selenide.Selenide.open; import static org.assertj.core.api.Assertions.assertThat; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.openqa.selenium.By; import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.ivy.webtest.engine.EngineUrl; +import com.axonivy.ivy.webtest.engine.WebAppFixture; import com.codeborne.selenide.ElementsCollection; +import ch.ivyteam.threema.mocks.ThreemaServiceMock; + @IvyWebTest public class MessageMultipleRecipientsTest { @Test - @Disabled - public void sendMessage() { + public void sendMessage(WebAppFixture fixture) { + String mockUrl = ThreemaServiceMock.URI.replaceAll("\\{", "%7B").replaceAll("\\}", "%7D").replaceAll("/", "%2F"); + fixture.config("RestClients.ThreemaGateway.Url", mockUrl); open(EngineUrl.createProcessUrl("threema-connector-demo/18B8EEA3B9A84FAE/SendMessageToMultipleRecipients.ivp")); String message = "Hello World"; String recipients = "validId\ninvalidId"; diff --git a/threema-connector-webtest/src_test/threema/connector/webtest/MessageSingleRecipientTest.java b/threema-connector-webtest/src_test/threema/connector/webtest/MessageSingleRecipientTest.java index 941e59b..70c5537 100644 --- a/threema-connector-webtest/src_test/threema/connector/webtest/MessageSingleRecipientTest.java +++ b/threema-connector-webtest/src_test/threema/connector/webtest/MessageSingleRecipientTest.java @@ -8,21 +8,24 @@ import static com.codeborne.selenide.Selenide.open; import static org.assertj.core.api.Assertions.assertThat; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.openqa.selenium.By; import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.ivy.webtest.engine.EngineUrl; +import com.axonivy.ivy.webtest.engine.WebAppFixture; import com.axonivy.ivy.webtest.primeui.PrimeUi; import com.codeborne.selenide.ElementsCollection; +import ch.ivyteam.threema.mocks.ThreemaServiceMock; + @IvyWebTest public class MessageSingleRecipientTest { @Test - @Disabled - public void sendMessage() { + public void sendMessage(WebAppFixture fixture) { + String mockUrl = ThreemaServiceMock.URI.replaceAll("\\{", "%7B").replaceAll("\\}", "%7D").replaceAll("/", "%2F"); + fixture.config("RestClients.ThreemaGateway.Url", mockUrl); open(EngineUrl.createProcessUrl("threema-connector-demo/18B8EEA3B9A84FAE/SendMessageToSingleRecipient.ivp")); String message = "Hello World"; String validId = "validId"; diff --git a/threema-connector/pom.xml b/threema-connector/pom.xml index 11ba934..f173cd3 100644 --- a/threema-connector/pom.xml +++ b/threema-connector/pom.xml @@ -11,7 +11,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + 10.0.14 true