From b7c198c99d392d54a355c7e35765f0acff271553 Mon Sep 17 00:00:00 2001 From: Todor Kolev Date: Tue, 11 Jun 2024 20:21:46 +0100 Subject: [PATCH] WIP saving work --- .../identus/walletsdk/steps/EdgeAgentSteps.kt | 16 ++++++++++------ .../features/credential/Credential.feature | 18 ++---------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/tests/end-to-end/src/test/kotlin/org/hyperledger/identus/walletsdk/steps/EdgeAgentSteps.kt b/tests/end-to-end/src/test/kotlin/org/hyperledger/identus/walletsdk/steps/EdgeAgentSteps.kt index 7195a5e2c..391533c1f 100644 --- a/tests/end-to-end/src/test/kotlin/org/hyperledger/identus/walletsdk/steps/EdgeAgentSteps.kt +++ b/tests/end-to-end/src/test/kotlin/org/hyperledger/identus/walletsdk/steps/EdgeAgentSteps.kt @@ -1,11 +1,11 @@ -package io.iohk.atala.prism.steps +package org.hyperledger.identus.walletsdk.steps import io.cucumber.java.After import io.cucumber.java.en.Then import io.cucumber.java.en.When -import io.iohk.atala.prism.abilities.UseWalletSdk -import io.iohk.atala.prism.workflow.CloudAgentWorkflow -import io.iohk.atala.prism.workflow.EdgeAgentWorkflow +import org.hyperledger.identus.walletsdk.abilities.UseWalletSdk +import org.hyperledger.identus.walletsdk.workflow.CloudAgentWorkflow +import org.hyperledger.identus.walletsdk.workflow.EdgeAgentWorkflow import net.serenitybdd.screenplay.Actor import net.serenitybdd.screenplay.actors.OnStage import javax.inject.Inject @@ -123,17 +123,21 @@ class EdgeAgentSteps { edgeAgentWorkflow.processIssuedCredential(edgeAgent, numberOfCredentials) } + @Then("{actor} should have {} credentials") + fun `Edge Agent should have N credential`(actor: Actor, numberOfCredentials: Int) { + //edgeAgentWorkflow.creden + } + @Then("{actor} waits to receive the revocation notifications from {actor}") fun `Edge Agent waits to receive the revocation notifications from Cloud Agent`(edgeAgent: Actor, cloudAgent: Actor) { val revokedRecordIdList = cloudAgent.recall>("revokedRecordIdList") edgeAgentWorkflow.waitForCredentialRevocationMessage(edgeAgent, revokedRecordIdList.size) } - @After fun stopAgent() { OnStage.theActor("Edge Agent").attemptsTo( UseWalletSdk.stop() ) } -} +} \ No newline at end of file diff --git a/tests/end-to-end/src/test/resources/features/credential/Credential.feature b/tests/end-to-end/src/test/resources/features/credential/Credential.feature index 9754ac10e..29f190822 100644 --- a/tests/end-to-end/src/test/resources/features/credential/Credential.feature +++ b/tests/end-to-end/src/test/resources/features/credential/Credential.feature @@ -1,4 +1,4 @@ -@credential @jwt +@credential @jwt @blap Feature: Receive verifiable credential The Edge Agent should be able to receive a verifiable credential from Cloud Agent @@ -10,18 +10,4 @@ Feature: Receive verifiable credential And Cloud Agent should see the credential was accepted Then Edge Agent wait to receive 1 issued credentials And Edge Agent process 1 issued credentials - And Edge Agent should have 1 credentials - - Scenario: Receive multiple verifiable credentials sequentially - Given Cloud Agent is connected to Edge Agent - When Edge Agent accepts 3 credential offer sequentially from Cloud Agent - Then Cloud Agent should see all credentials were accepted - And Edge Agent wait to receive 3 issued credentials - And Edge Agent process 3 issued credentials - - Scenario: Receive multiple verifiable credentials at once - Given Cloud Agent is connected to Edge Agent - When Edge Agent accepts 3 credentials offer at once from Cloud Agent - Then Cloud Agent should see all credentials were accepted - And Edge Agent wait to receive 3 issued credentials - And Edge Agent process 3 issued credentials + And Edge Agent should have 1 credentials \ No newline at end of file