Skip to content

Commit

Permalink
WIP saving work
Browse files Browse the repository at this point in the history
  • Loading branch information
todorkoleviohk committed Jun 11, 2024
1 parent b9faf40 commit b7c198c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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<MutableList<String>>("revokedRecordIdList")
edgeAgentWorkflow.waitForCredentialRevocationMessage(edgeAgent, revokedRecordIdList.size)
}


@After
fun stopAgent() {
OnStage.theActor("Edge Agent").attemptsTo(
UseWalletSdk.stop()
)
}
}
}
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

0 comments on commit b7c198c

Please sign in to comment.