Skip to content

Commit 7842330

Browse files
committed
test: validate identify_methods attributes in page initial state
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 3c4af80 commit 7842330

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tests/integration/features/page/index.feature

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Feature: page/sign_identify_default
1010
When sending "get" to "/apps/libresign/f/"
1111
Then the response should have a status code 200
1212
And the response should contain the initial state "libresign-effective_policies" json that match with:
13-
| key | value |
14-
| (jq).policies.identify_methods.policyKey | identify_methods |
15-
| (jq)(.policies.identify_methods.sourceScope \| test("^(system\|global)$")) | true |
16-
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| type) | array |
17-
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| length) | 2 |
18-
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| any(.name == "account")) | true |
19-
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| any(.name == "email")) | true |
13+
| key | value |
14+
| (jq).policies.identify_methods.policyKey | identify_methods |
15+
| (jq)(.policies.identify_methods.sourceScope \| test("^(system\|global)$")) | true |
16+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| type) | array |
17+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| length) | 2 |
18+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| map(select(.name == "account")) \| .[0].enabled) | true |
19+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| map(select(.name == "account")) \| .[0].mandatory) | true |
20+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| map(select(.name == "email")) \| .[0].enabled) | true |
21+
| (jq)(.policies.identify_methods.effectiveValue \| if type=="string" then fromjson else . end \| map(select(.name == "email")) \| .[0].mandatory) | false |

0 commit comments

Comments
 (0)