From 3f339f29ad6d841f56a8ec286874cfdc1da9c5b4 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Wed, 8 Mar 2023 11:27:41 +0000 Subject: [PATCH 1/3] tests: correct error codes in e2e tests --- tests/e2e-tests/src/test/kotlin/features/did/PublishDidSteps.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e-tests/src/test/kotlin/features/did/PublishDidSteps.kt b/tests/e2e-tests/src/test/kotlin/features/did/PublishDidSteps.kt index 2471f2833a..629bb44fa5 100644 --- a/tests/e2e-tests/src/test/kotlin/features/did/PublishDidSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/did/PublishDidSteps.kt @@ -66,7 +66,7 @@ class PublishDidSteps { ) actor.should( ResponseConsequence.seeThatResponse { - it.statusCode(SC_OK) + it.statusCode(SC_CREATED) it.body("longFormDid", not(emptyString())) }, ) From a497eabc921542be0b829913cec3763468c46143 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Wed, 8 Mar 2023 11:56:56 +0000 Subject: [PATCH 2/3] test: test --- .../src/test/kotlin/features/did/ManageDidSteps.kt | 4 ++-- .../test/kotlin/features/present_proof/PresentProofSteps.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e-tests/src/test/kotlin/features/did/ManageDidSteps.kt b/tests/e2e-tests/src/test/kotlin/features/did/ManageDidSteps.kt index 0ffb559673..826dcde765 100644 --- a/tests/e2e-tests/src/test/kotlin/features/did/ManageDidSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/did/ManageDidSteps.kt @@ -13,7 +13,7 @@ import net.serenitybdd.screenplay.Actor import net.serenitybdd.screenplay.rest.interactions.Get import net.serenitybdd.screenplay.rest.interactions.Post import net.serenitybdd.screenplay.rest.questions.ResponseConsequence -import org.apache.http.HttpStatus.SC_OK +import org.apache.http.HttpStatus.SC_CREATED import org.assertj.core.api.Assertions import org.hamcrest.Matchers.* @@ -80,7 +80,7 @@ class ManageDidSteps { fun theDidShouldBeRegisteredSuccessfully(actor: Actor) { actor.should( ResponseConsequence.seeThatResponse { - it.statusCode(SC_OK) + it.statusCode(SC_CREATED) it.body("longFormDid", not(emptyString())) }, ) diff --git a/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt b/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt index 0f8c6ae5b6..bce77f1087 100644 --- a/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt @@ -64,7 +64,7 @@ class PresentProofSteps { it.statusCode(SC_OK) }, ) - lastResponseList("", PresentationProof::class).findLast { + lastResponseList("contents", PresentationProof::class).findLast { it.status == "RequestReceived" } != null }, @@ -97,7 +97,7 @@ class PresentProofSteps { it.statusCode(SC_OK) }, ) - val presentation = lastResponseList("", PresentationProof::class).find { + val presentation = lastResponseList("contents", PresentationProof::class).find { it.presentationId == faber.recall("presentationId") } presentation != null && @@ -119,7 +119,7 @@ class PresentProofSteps { it.statusCode(SC_OK) }, ) - val presentation = lastResponseList("", PresentationProof::class).find { + val presentation = lastResponseList("contents", PresentationProof::class).find { it.presentationId == faber.recall("presentationId") } presentation != null && presentation.status == "PresentationVerified" From 26b03df36b5d3ba3dbc97f99d0b740c0975ac849 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Wed, 8 Mar 2023 12:15:40 +0000 Subject: [PATCH 3/3] test: test --- .../src/test/kotlin/features/present_proof/PresentProofSteps.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt b/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt index bce77f1087..53af7272d3 100644 --- a/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/present_proof/PresentProofSteps.kt @@ -71,7 +71,7 @@ class PresentProofSteps { "ERROR: Bob did not achieve any presentation request!", ) - val presentationId = lastResponseList("", PresentationProof::class).findLast { + val presentationId = lastResponseList("contents", PresentationProof::class).findLast { it.status == "RequestReceived" }!!.presentationId bob.attemptsTo(