Skip to content

Commit

Permalink
XIVY-12667 Added cleanup after Webtests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-fhe committed Nov 2, 2023
1 parent b9c4087 commit 84002a5
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
10 changes: 8 additions & 2 deletions threema-connector-demo/processes/ThreemaDemoProcess.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,14 @@
{ "name" : "privatekey", "type" : "String" }
],
"map" : {
"param.publicKey" : "in.publicKey",
"param.privatekey" : "in.privatekey"
"param.publicKey" : [
"in.publicKey",
"in.publicKey"
],
"param.privatekey" : [
"in.privatekey",
"in.privatekey"
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<br />
<div class="command-btns">
<p:commandLink id="cancel" actionListener="#{ivyWorkflowView.cancel()}" value="Cancel" />
<p:commandButton id="proceed" actionListener="#{logic.close}" value="Proceed" update="form" icon="pi pi-check" />
<p:commandButton id="proceed" actionListener="#{logic.close}" value="Close" update="form" icon="pi pi-check" />
</div>
</h:form>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"format" : "10.0.0",
"id" : "18B8EF27D89ED10D",
"id" : "18B902D7EEB4DF97",
"kind" : "HTML_DIALOG",
"config" : {
"data" : "threema.connector.demo.KeyPair.KeyPairData"
Expand All @@ -21,7 +21,7 @@
"out.privatekey" : "param.privatekey"
}
},
"guid" : "18B8EF27D8A1D1A5"
"guid" : "18B902D7EEFA5F64"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
Expand All @@ -38,7 +38,7 @@
"type" : "HtmlDialogEventStart",
"name" : "close",
"config" : {
"guid" : "18B8EF27D8CA39FE"
"guid" : "18B902D7EFFC72C5"
},
"visual" : {
"at" : { "x" : 96, "y" : 160 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public class ThreemaServiceMock {
static final String PATH_SUFFIX = "mock";
private static final String THREEMA_ID = "validId";
public static final String URI = "{" + IvyDefaultJaxRsTemplates.APP_URL + "}/api/" + PATH_SUFFIX;
// {ivy.app.baseurl}/api/mock
// https://msgapi.threema.ch


@GET
@Path("/lookup/{type}/{id}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.codeborne.selenide.Selenide.open;
import static org.assertj.core.api.Assertions.assertThat;

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

Expand All @@ -20,6 +21,11 @@
@IvyWebTest
public class MessageMultipleRecipientsTest {

@AfterEach
public void cleanFixture(WebAppFixture fixture) {
fixture.resetConfig("RestClients.ThreemaGateway.Url");
}

@Test
public void sendMessage(WebAppFixture fixture) {
String mockUrl = ThreemaServiceMock.URI.replaceAll("\\{", "%7B").replaceAll("\\}", "%7D").replaceAll("/", "%2F");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static com.codeborne.selenide.Selenide.open;
import static org.assertj.core.api.Assertions.assertThat;

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

Expand All @@ -22,6 +23,12 @@
@IvyWebTest
public class MessageSingleRecipientTest {

@AfterEach
public void cleanFixture(WebAppFixture fixture) {
fixture.resetConfig("RestClients.ThreemaGateway.Url");
}


@Test
public void sendMessage(WebAppFixture fixture) {
String mockUrl = ThreemaServiceMock.URI.replaceAll("\\{", "%7B").replaceAll("\\}", "%7D").replaceAll("/", "%2F");
Expand Down

0 comments on commit 84002a5

Please sign in to comment.