Skip to content

Commit

Permalink
GenericNodeTransformation: returning error in case if there wasn't an…
Browse files Browse the repository at this point in the history
…y FailedToDefineParameter and was unmatched transformation step - test added
  • Loading branch information
arkadius committed Dec 6, 2021
1 parent fcb5032 commit b90930d
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,27 @@ class DefinitionResourcesSpec extends FunSpec with ScalatestRouteTest with FailF
}
}

// TODO: currently branch parameters must be determined on node template level - aren't enriched dynamically during node validation
it("return branch parameters definition with standard parameters enrichments") {
getProcessDefinitionData(TestProcessingTypes.Streaming) ~> check {
status shouldBe StatusCodes.OK

val responseJson = responseAs[Json]
val defaultExpression: Json = responseJson.hcursor
.downField("componentGroups")
.downAt(_.hcursor.get[String]("name").right.value == "base")
.downField("components")
.downAt(_.hcursor.get[String]("label").right.value == "enrichWithAdditionalData")
.downField("branchParametersTemplate")
.downAt(_.hcursor.get[String]("name").right.value == "role")
.downField("expression")
.downField("expression")
.focus.get

defaultExpression shouldBe Json.fromString("'Events'")
}
}

private def getParamEditor(serviceName: String, paramName: String) = {
responseAs[Json].hcursor
.downField("streaming")
Expand Down

0 comments on commit b90930d

Please sign in to comment.