From c0dce7530cf3dd304238b6d93ded693a5c3b81b5 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 14 Jan 2025 06:58:41 -0500 Subject: [PATCH] fix(agama): update expected status code (#10618) * fix: fix broken test Signed-off-by: jgomer2001 * docs: minor doc update #10617 Signed-off-by: jgomer2001 --------- Signed-off-by: jgomer2001 --- .../developer/agama/native-applications.md | 48 ++++++++++++++++++- .../agama/test/CustomConfigsFlowTest.java | 2 +- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/docs/janssen-server/developer/agama/native-applications.md b/docs/janssen-server/developer/agama/native-applications.md index 29b193e8e77..e0688606cb7 100644 --- a/docs/janssen-server/developer/agama/native-applications.md +++ b/docs/janssen-server/developer/agama/native-applications.md @@ -64,9 +64,53 @@ This hypothetical flow is simple but will give you a good idea on how to interac ### The flow code -The following code depicts the implementation. +The below depicts the implementation: -![enabled-2fa-methods](../../../assets/agama/challenge-flow.png) +![co.acme.flows.emailOtp](../../../assets/agama/challenge-flow.png) + + Flow `co.acme.flows.emailOtp` is self-explanatory and does not require further insight. Note the templates referenced in RRF directives don't necessarily have to exist, however, the template names will be included in the output of the endpoint as the flow executes. This serves as a hint or reference for the app to know the current point of execution and determine what should be shown in the UI. It will be more clearly seen in the next section. diff --git a/jans-auth-server/agama/engine/src/test/java/io/jans/agama/test/CustomConfigsFlowTest.java b/jans-auth-server/agama/engine/src/test/java/io/jans/agama/test/CustomConfigsFlowTest.java index 869a91440e0..09c64fa2d65 100644 --- a/jans-auth-server/agama/engine/src/test/java/io/jans/agama/test/CustomConfigsFlowTest.java +++ b/jans-auth-server/agama/engine/src/test/java/io/jans/agama/test/CustomConfigsFlowTest.java @@ -25,7 +25,7 @@ public void withTimeout() { int status = page.getWebResponse().getStatusCode(); String text = page.getVisibleText().toLowerCase(); - if (status == 200) { + if (status == 410) { //See timeout.ftlh assertTextContained(text, "took", "more", "expected"); } else if (status == 404) {