Skip to content

Commit 40f78ae

Browse files
committed
test: align identify methods initial-state assertions
Signed-off-by: Vitor Mattos <[email protected]>
1 parent f7e71a9 commit 40f78ae

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

tests/integration/features/admin/initial_state.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Feature: admin/initial_state
2828
Then sending "get" to "/settings/admin/libresign"
2929
And the response should contain the initial state "libresign-identify_methods" json that match with:
3030
| key | value |
31-
| (jq)map(select(.name=="account")) | (jq)length == 1 and .[0].enabled == true and .[0].mandatory == true and .[0].signatureMethods.password.enabled == true |
32-
| (jq)map(select(.name=="email")) | (jq)length == 1 and .[0].enabled == false and .[0].mandatory == true and .[0].can_create_account == true and .[0].signatureMethods.emailToken.enabled == true |
31+
| (jq)map(select(.name=="account")) | (jq)length == 1 and .[0].mandatory == true and .[0].signatureMethods.password.enabled == true |
32+
| (jq)map(select(.name=="email")) | (jq)length == 1 and .[0].mandatory == true and .[0].can_create_account == true and .[0].signatureMethods.emailToken.enabled == true |
3333

3434
Examples:
3535
| payload |

tests/integration/features/page/index.feature

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ Feature: page/sign_identify_default
77
And sending "delete" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
88
When sending "get" to "/apps/libresign/f/"
99
Then the response should have a status code 200
10-
And the response should contain the initial state "libresign-identify_methods" with the following values:
11-
"""
12-
[
13-
{"name":"account","friendly_name":"Account","enabled":true,"mandatory":true,"signatureMethods":{"clickToSign":{"enabled":false,"label":"Click to sign","name":"clickToSign"},"emailToken":{"enabled":false,"label":"Email token","name":"emailToken"},"password":{"enabled":true,"label":"Certificate with password","name":"password"}}},
14-
{"name":"email","friendly_name":"Email","enabled":false,"mandatory":true,"can_create_account":true,"test_url":"/index.php/settings/admin/mailtest","signatureMethods":{"clickToSign":{"enabled":false,"label":"Click to sign","name":"clickToSign"},"emailToken":{"enabled":true,"label":"Email token","name":"emailToken"}}}
15-
]
16-
"""
10+
And the response should contain the initial state "libresign-effective_policies" json that match with:
11+
| key | value |
12+
| (jq).policies.identify_methods.policyKey | identify_methods |

0 commit comments

Comments
 (0)