@@ -5,21 +5,17 @@ Feature: admin/initial_state
55 When sending "get" to "/settings/admin/libresign"
66 Then the response should contain the initial state "libresign-identify_methods" json that match with:
77 | key | value |
8- | (jq )length | 3 |
98 | (jq )map (select (.name =="account ")) | (jq )length == 1 and .[0 ].enabled == true and .[0 ].mandatory == true and .[0 ].signatureMethods .password .enabled == true |
109 | (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 |
11- | (jq )map (select (.name =="whatsapp ")) | (jq )length == 1 and .[0 ].enabled == false and .[0 ].mandatory == true and .[0 ].test_url == "/index .php /settings /user /security " and .[0 ].signatureMethods .whatsappToken .enabled == false |
1210
1311 Scenario : Identify methods stored as invalid string fall back to the default contract
1412 Given as user "admin"
1513 And run the command "config:app:set libresign identify_methods --value=invalid --type=string" with result code 0
1614 When sending "get" to "/settings/admin/libresign"
1715 Then the response should contain the initial state "libresign-identify_methods" json that match with:
1816 | key | value |
19- | (jq )length | 3 |
2017 | (jq )map (select (.name =="account ")) | (jq )length == 1 and .[0 ].enabled == true and .[0 ].mandatory == true and .[0 ].signatureMethods .password .enabled == true |
2118 | (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 |
22- | (jq )map (select (.name =="whatsapp ")) | (jq )length == 1 and .[0 ].enabled == false and .[0 ].mandatory == true and .[0 ].test_url == "/index .php /settings /user /security " and .[0 ].signatureMethods .whatsappToken .enabled == false |
2319
2420 Scenario Outline : Invalid identify methods updates preserve the default contract
2521 Given as user "admin"
@@ -29,10 +25,8 @@ Feature: admin/initial_state
2925 Then sending "get" to "/settings/admin/libresign"
3026 And the response should contain the initial state "libresign-identify_methods" json that match with:
3127 | key | value |
32- | (jq )length | 3 |
3328 | (jq )map (select (.name =="account ")) | (jq )length == 1 and .[0 ].enabled == true and .[0 ].mandatory == true and .[0 ].signatureMethods .password .enabled == true |
3429 | (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 |
35- | (jq )map (select (.name =="whatsapp ")) | (jq )length == 1 and .[0 ].enabled == false and .[0 ].mandatory == true and .[0 ].test_url == "/index .php /settings /user /security " and .[0 ].signatureMethods .whatsappToken .enabled == false |
3630
3731 Examples :
3832 | payload |
@@ -48,10 +42,8 @@ Feature: admin/initial_state
4842 Then sending "get" to "/settings/admin/libresign"
4943 And the response should contain the initial state "libresign-identify_methods" json that match with:
5044 | key | value |
51- | (jq )length | 3 |
5245 | (jq )map (select (.name =="account ")) | (jq )length == 1 and .[0 ].signatureMethods .clickToSign .enabled == true and .[0 ].signatureMethods .password .enabled == false |
5346 | (jq )map (select (.name =="email ")) | (jq )length == 1 and .[0 ].mandatory == false and .[0 ].signatureMethods .emailToken .enabled == true |
54- | (jq )map (select (.name =="whatsapp ")) | (jq )length == 1 and .[0 ].signatureMethods .whatsappToken .enabled == false |
5547 And run the command "config:app:delete libresign identify_methods" with result code 0
5648
5749 Scenario : Stable default admin initial states are exposed
@@ -271,10 +263,6 @@ Feature: admin/initial_state
271263 """
272264 true
273265 """
274- And the response should contain the initial state "libresign-ldap_extension_available" with the following values:
275- """
276- false
277- """
278266 And run the command "user:setting admin libresign files_list_sorting_mode --delete" with result code 0
279267 And run the command "user:setting admin libresign files_list_sorting_direction --delete" with result code 0
280268
0 commit comments