Skip to content

Commit

Permalink
Merge pull request #2522 from LibreSign/feature/performance-improveme…
Browse files Browse the repository at this point in the history
…nt-at-integration-tests

Performance improvement at integration tests
  • Loading branch information
vitormattos authored Mar 13, 2024
2 parents 2e6a664 + 9b87a48 commit aa434d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/integration/features/account/create_to_sign.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Feature: account/create_to_sign
Background:
Given as user "admin"
And run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
And sending "post" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
| value | (string)[{"name":"email","enabled":true,"mandatory":true,"can_create_account":true}] |
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class FeatureContext extends NextcloudApiContext implements OpenedEmailStorageAw
* @BeforeSuite
*/
public static function beforeSuite(BeforeSuiteScope $scope) {
exec('php ../../../../occ config:system:set debug --value true --type boolean', $output);
self::runCommand('config:system:set debug --value true --type boolean');
self::runCommand('app:enable --force notifications');
}

/**
* @BeforeFeature
* @BeforeScenario
*/
public static function BeforeFeature(): void {
public static function BeforeScenario(): void {
self::runCommand('libresign:developer:reset --all');
self::runCommand('app:enable --force notifications');
}

/**
Expand Down
7 changes: 1 addition & 6 deletions tests/integration/features/sign/request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Feature: request-signature
Scenario: Request to sign with error when the link was expired
Given as user "admin"
And my inbox is empty
And run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
And run the command "config:app:set libresign maximum_validity --value 1"
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
Expand All @@ -119,7 +118,6 @@ Feature: request-signature
Scenario: Request to sign with success when is necessary to renew the link
Given as user "admin"
And my inbox is empty
And run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
And sending "post" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
| value | (string)[{"name":"email","enabled":true,"mandatory":true,"can_create_account":false}] |
Expand Down Expand Up @@ -184,7 +182,6 @@ Feature: request-signature
Scenario: Request to sign with success using account as identifier
Given as user "admin"
And user "signer1" exists
And run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
And set the email of user "signer1" to "[email protected]"
And reset notifications of user "signer1"
Expand All @@ -206,7 +203,6 @@ Feature: request-signature

Scenario: Request to sign with error using account as identifier with invalid email
Given as user "admin"
And run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
Expand Down Expand Up @@ -320,8 +316,7 @@ Feature: request-signature
And I open the latest email to "[email protected]" with subject "LibreSign: There is a file for you to sign"

Scenario: CRUD of identify methods
Given run the command "libresign:developer:reset --all"
And run the command "libresign:configure:openssl --cn test"
Given run the command "libresign:configure:openssl --cn test"
And user "signer1" exists
And as user "admin"
When I send a file to be signed
Expand Down

0 comments on commit aa434d4

Please sign in to comment.