diff --git a/tests/integration/composer.lock b/tests/integration/composer.lock index db167d43c4..5ddf40d438 100644 --- a/tests/integration/composer.lock +++ b/tests/integration/composer.lock @@ -905,16 +905,16 @@ }, { "name": "libresign/behat-builtin-extension", - "version": "v0.6.3", + "version": "v0.7.0", "source": { "type": "git", "url": "https://github.com/LibreSign/behat-builtin-extension.git", - "reference": "d9ddb309bbf36826f47318ca74d67c9e6c5714f9" + "reference": "fbb27f1573ab646f774daab8f4a6c5d5e2c25102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LibreSign/behat-builtin-extension/zipball/d9ddb309bbf36826f47318ca74d67c9e6c5714f9", - "reference": "d9ddb309bbf36826f47318ca74d67c9e6c5714f9", + "url": "https://api.github.com/repos/LibreSign/behat-builtin-extension/zipball/fbb27f1573ab646f774daab8f4a6c5d5e2c25102", + "reference": "fbb27f1573ab646f774daab8f4a6c5d5e2c25102", "shasum": "" }, "require": { @@ -945,9 +945,9 @@ "description": "Behat extension to run php built-in web server", "support": { "issues": "https://github.com/LibreSign/behat-builtin-extension/issues", - "source": "https://github.com/LibreSign/behat-builtin-extension/tree/v0.6.3" + "source": "https://github.com/LibreSign/behat-builtin-extension/tree/v0.7.0" }, - "time": "2024-10-31T18:50:11+00:00" + "time": "2026-09-19T19:17:52+00:00" }, { "name": "libresign/behat-tsa-extension", @@ -1128,24 +1128,24 @@ }, { "name": "libresign/nextcloud-behat", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/LibreSign/nextcloud-behat.git", - "reference": "617ffaae34ebf0e3794a09123a376c2598008f48" + "reference": "c650035f5e61d19110b8d62ca4a8a073ad7fad12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LibreSign/nextcloud-behat/zipball/617ffaae34ebf0e3794a09123a376c2598008f48", - "reference": "617ffaae34ebf0e3794a09123a376c2598008f48", + "url": "https://api.github.com/repos/LibreSign/nextcloud-behat/zipball/c650035f5e61d19110b8d62ca4a8a073ad7fad12", + "reference": "c650035f5e61d19110b8d62ca4a8a073ad7fad12", "shasum": "" }, "require": { "behat/behat": "^3.29", "estahn/json-query-wrapper": "*", "guzzlehttp/guzzle": "^7.10", - "libresign/behat-builtin-extension": "^0.6.3", - "php": ">=8.1", + "libresign/behat-builtin-extension": "^0.7.0", + "php": ">=8.2", "phpunit/phpunit": "*" }, "require-dev": { @@ -1182,9 +1182,9 @@ ], "support": { "issues": "https://github.com/LibreSign/nextcloud-behat/issues", - "source": "https://github.com/LibreSign/nextcloud-behat/tree/v1.6.0" + "source": "https://github.com/LibreSign/nextcloud-behat/tree/v1.6.1" }, - "time": "2026-04-11T00:33:49+00:00" + "time": "2026-09-20T16:52:51+00:00" }, { "name": "myclabs/deep-copy", diff --git a/tests/integration/config/behat.yml b/tests/integration/config/behat.yml index 6fb644805f..3a38b111f3 100644 --- a/tests/integration/config/behat.yml +++ b/tests/integration/config/behat.yml @@ -16,7 +16,11 @@ default: base_url: http://mailpit:8025 PhpBuiltin\Server: runAs: www-data - workers: 10 + # Keep the minimum workers needed for occasional nested HTTP to the same + # PHP built-in server (single-process deadlocks on self-requests). Prefer + # inline fixtures over url→/develop/pdf to avoid load-driven + # cURL 52 flakes from higher PHP_CLI_SERVER_WORKERS values. + workers: 2 jarnaiz\JUnitFormatter\JUnitFormatterExtension: filename: report.xml outputDir: '%paths.base%/../output/' diff --git a/tests/integration/features/account/signature.feature b/tests/integration/features/account/signature.feature index e7e5cb4ccb..a497e5439e 100644 --- a/tests/integration/features/account/signature.feature +++ b/tests/integration/features/account/signature.feature @@ -257,7 +257,7 @@ Feature: account/signature And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required"}]} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer@test.coop"}]}] | | name | document | When as user "" diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index db97f6df23..e58f005186 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -7,6 +7,7 @@ */ use Behat\Gherkin\Node\TableNode; +use Behat\Hook\AfterSuite; use Behat\Hook\BeforeScenario; use Behat\Hook\BeforeSuite; use Behat\Step\Given; @@ -25,11 +26,18 @@ class FeatureContext extends NextcloudApiContext implements OpenedEmailStorageAw #[BeforeSuite()] public static function beforeSuite(BeforeSuiteScope $scope):void { parent::beforeSuite($scope); + FixtureHttpServer::start(); self::runCommand('config:system:set debug --value true --type boolean'); + self::runCommand('config:system:set allow_local_remote_servers --value true --type boolean'); self::runCommand('app:enable --force libresign'); self::runCommand('app:enable --force notifications'); } + #[AfterSuite()] + public static function afterSuite(): void { + FixtureHttpServer::stop(); + } + #[BeforeScenario()] public static function beforeScenario(): void { parent::beforeScenario(); @@ -51,6 +59,8 @@ protected function parseText(string $text): string { $fields = $this->fields; $fields['BASE_URL'] = $this->baseUrl . '/index.php'; $fields['TSA_URL'] = getenv('LIBRESIGN_TSA_URL') ?: 'https://freetsa.org/tsr'; + $fields['SMALL_VALID_PDF_BASE64'] = $this->getSmallValidPdfBase64(); + $fields['SMALL_VALID_PDF_URL'] = FixtureHttpServer::getSmallValidPdfUrl(); $patterns = []; $replacements = []; foreach ($fields as $key => $value) { @@ -62,6 +72,19 @@ protected function parseText(string $text): string { return $text; } + /** + * Inline PDF fixture for Behat requests that do not need to exercise url download. + * + * Prefer this over url→the Behat Nextcloud server. For url coverage use , + * which is served by FixtureHttpServer on a separate local port. + */ + private function getSmallValidPdfBase64(): string { + $pdfPath = __DIR__ . '/../../../php/fixtures/pdfs/small_valid.pdf'; + $contents = file_get_contents($pdfPath); + Assert::assertNotFalse($contents, 'Demo PDF fixture missing: ' . $pdfPath); + return 'data:application/pdf;base64,' . base64_encode($contents); + } + #[Given('I fetch the signer UUID from opened email')] public function iFetchTheLinkOnOpenedEmail(): void { if (!$this->openedEmailStorage->hasOpenedEmail()) { diff --git a/tests/integration/features/bootstrap/FixtureHttpServer.php b/tests/integration/features/bootstrap/FixtureHttpServer.php new file mode 100644 index 0000000000..11b561ee1b --- /dev/null +++ b/tests/integration/features/bootstrap/FixtureHttpServer.php @@ -0,0 +1,107 @@ + /dev/null 2>&1 & echo $!', + escapeshellarg(self::$host), + self::$port, + escapeshellarg(self::$documentRoot) + ); + + self::$pid = trim((string)shell_exec($cmd)); + if (self::$pid === '' || !ctype_digit(self::$pid)) { + throw new RuntimeException('Failed to start fixture HTTP server process.'); + } + + for ($attempt = 0; $attempt < 30; $attempt++) { + usleep(100000); + $socket = @fsockopen(self::$host, self::$port); + if (is_resource($socket)) { + fclose($socket); + register_shutdown_function(static function (): void { + self::stop(); + }); + return; + } + } + + self::stop(); + throw new RuntimeException('Fixture HTTP server did not become ready in time.'); + } + + public static function stop(): void { + if (self::isRunning()) { + exec('kill ' . self::$pid); + } + self::$pid = '0'; + self::$port = 0; + } + + public static function getSmallValidPdfUrl(): string { + if (!self::isRunning() || self::$port <= 0) { + throw new RuntimeException('Fixture HTTP server is not running.'); + } + + return sprintf('http://%s:%d/small_valid.pdf', self::$host, self::$port); + } + + private static function isRunning(): bool { + if (self::$pid === '' || self::$pid === '0') { + return false; + } + + exec(sprintf('ps %d', (int)self::$pid), $result); + + return count($result) > 1; + } + + private static function findOpenPort(string $host): int { + $server = @stream_socket_server('tcp://' . $host . ':0', $errno, $errstr); + if ($server === false) { + throw new RuntimeException('Unable to allocate local port for fixture HTTP server: ' . $errstr); + } + + $name = stream_socket_get_name($server, false); + fclose($server); + + if (!is_string($name) || !str_contains($name, ':')) { + throw new RuntimeException('Unable to detect allocated local port for fixture HTTP server.'); + } + + $parts = explode(':', $name); + $port = (int)end($parts); + if ($port <= 0) { + throw new RuntimeException('Invalid allocated port for fixture HTTP server.'); + } + + return $port; + } +} diff --git a/tests/integration/features/file/envelope.feature b/tests/integration/features/file/envelope.feature index f8da38ead1..212780f254 100644 --- a/tests/integration/features/file/envelope.feature +++ b/tests/integration/features/file/envelope.feature @@ -6,7 +6,7 @@ Feature: envelope And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/file" - | files | [{"url":"/apps/libresign/develop/pdf"},{"url":"/apps/libresign/develop/pdf"}] | + | files | [{"base64":""},{"base64":""}] | | name | Contract Package | Then the response should have a status code 422 And the response should be a JSON array with the following mandatory values @@ -43,7 +43,7 @@ Feature: envelope And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/file" - | files | [{"url":"/apps/libresign/develop/pdf"},{"url":"/apps/libresign/develop/pdf"},{"url":"/apps/libresign/develop/pdf"}] | + | files | [{"base64":""},{"base64":""},{"base64":""}] | | name | Too Many Files | Then the response should have a status code 422 And the response should be a JSON array with the following mandatory values @@ -55,7 +55,7 @@ Feature: envelope And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/file" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | name | Single Document | Then the response should have a status code 200 And the response should be a JSON array with the following mandatory values diff --git a/tests/integration/features/file/list.feature b/tests/integration/features/file/list.feature index 50a566f739..3dcef48d6f 100644 --- a/tests/integration/features/file/list.feature +++ b/tests/integration/features/file/list.feature @@ -6,7 +6,7 @@ Feature: file-list And set the email of user "signer1" to "signer1@domain.test" And set the email of user "signer2" to "" And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | And the response should have a status code 200 @@ -47,25 +47,25 @@ Feature: file-list And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required"}]} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | And the response should have a status code 200 diff --git a/tests/integration/features/file/thumbnail.feature b/tests/integration/features/file/thumbnail.feature index 031faaaf2c..536c3ad8f3 100644 --- a/tests/integration/features/file/thumbnail.feature +++ b/tests/integration/features/file/thumbnail.feature @@ -6,7 +6,7 @@ Feature: file-thumbnail And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required"}]} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 diff --git a/tests/integration/features/file/validate.feature b/tests/integration/features/file/validate.feature index 4e75c231ac..414e17ffa7 100644 --- a/tests/integration/features/file/validate.feature +++ b/tests/integration/features/file/validate.feature @@ -5,7 +5,7 @@ Feature: validate And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"admin"}]},{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | status | 0 | | name | Visible elements validation | @@ -76,7 +76,7 @@ Feature: validate | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}}}]} | And user "signer1" exists When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | Document Name | Then the response should have a status code 200 @@ -122,7 +122,7 @@ Feature: validate And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"admin"}]}] | | name | document | And the response should have a status code 200 @@ -144,7 +144,7 @@ Feature: validate And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"admin"}]}] | | name | Requester legal information | Then the response should have a status code 200 @@ -168,7 +168,7 @@ Feature: validate And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"admin"}]}] | | name | Validation page requester legal information | Then the response should have a status code 200 diff --git a/tests/integration/features/notification/custom_message_notification.feature b/tests/integration/features/notification/custom_message_notification.feature index afcf8d4b3a..e60860493f 100644 --- a/tests/integration/features/notification/custom_message_notification.feature +++ b/tests/integration/features/notification/custom_message_notification.feature @@ -15,7 +15,7 @@ Feature: Custom message for signers Scenario: Account method - default message without custom description When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | name | Document without custom message | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | Then the response should have a status code 200 @@ -25,7 +25,7 @@ Feature: Custom message for signers Scenario: Account method - custom description in email When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | name | Document with custom message | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}],"description":"Please review section 3 and the appendix before signing."}] | Then the response should have a status code 200 @@ -36,14 +36,14 @@ Feature: Custom message for signers Scenario: Email method - default notification When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | name | Document for email method | | signers | [{"identifyMethods":[{"method":"email","value":"external@domain.test"}],"displayName":"External Signer"}] | Then the response should have a status code 200 Scenario: Email method - custom description via reminder Given sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | name | Document for email with description | | signers | [{"identifyMethods":[{"method":"email","value":"external@domain.test"}],"displayName":"External Signer","description":"Urgent: Please sign by end of day."}] | And the response should have a status code 200 diff --git a/tests/integration/features/page/validate.feature b/tests/integration/features/page/validate.feature index 4e969a9ccc..8dab524ea9 100644 --- a/tests/integration/features/page/validate.feature +++ b/tests/integration/features/page/validate.feature @@ -9,7 +9,7 @@ Feature: page/validate And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"admin"}]}] | | name | document | And the response should have a status code 200 @@ -78,7 +78,7 @@ Feature: page/validate | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}}}]} | And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName":"External Signer","identifyMethods":[{"method":"email","value":"external@domain.test"}]}] | | name | external-email-pdf | | settings | {"folderName":"rm-target-folder"} | diff --git a/tests/integration/features/policies/groups_request_sign_policy.feature b/tests/integration/features/policies/groups_request_sign_policy.feature index a830b0270c..013107e330 100644 --- a/tests/integration/features/policies/groups_request_sign_policy.feature +++ b/tests/integration/features/policies/groups_request_sign_policy.feature @@ -101,7 +101,7 @@ Feature: policies/groups_request_sign_policy | (jq).ocs.data.policies | (jq)length == 0 | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"ceo-request-access-policy"}]}] | | name | group-admin-without-policy | | status | 0 | @@ -114,7 +114,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: A regular member of the same group also cannot request signatures without an allow policy Given as user "member-request-access-policy" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"member-request-access-policy"}]}] | | name | member-without-policy | | status | 0 | @@ -152,7 +152,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: The regular member now inherits the sysadmin allow rule and can request signatures Given as user "member-request-access-policy" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"member-request-access-policy"}]}] | | name | member-with-system-allow | | status | 0 | @@ -183,7 +183,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: After the deny override, the regular member loses the ability to request signatures Given as user "member-request-access-policy" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"member-request-access-policy"}]}] | | name | member-with-group-deny | | status | 0 | @@ -206,7 +206,7 @@ Feature: policies/groups_request_sign_policy | (jq).ocs.data.policies | (jq)length == 0 | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"ceo-request-access-policy"}]}] | | name | group-admin-after-delete | | status | 0 | @@ -215,7 +215,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: The regular member also regains inherited request access after the deny override is deleted Given as user "member-request-access-policy" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"member-request-access-policy"}]}] | | name | member-after-delete | | status | 0 | @@ -248,14 +248,14 @@ Feature: policies/groups_request_sign_policy Given as user "allow-only-requester" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"allow-only-requester"}]}] | | name | document | Then the response should have a status code 200 Given as user "deny-precedence-requester" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"deny-precedence-requester"}]}] | | name | document | Then the response should have a status code 422 @@ -310,7 +310,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: A company-only member still cannot request signatures before the delegated admin extends access. Given as user "company-member-request-access-extension" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"company-member-request-access-extension"}]}] | | name | company-member-before-extension | | status | 0 | @@ -334,7 +334,7 @@ Feature: policies/groups_request_sign_policy # VALIDATION: After the delegated extension, the company-only member can request signatures. Given as user "company-member-request-access-extension" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"company-member-request-access-extension"}]}] | | name | company-member-after-extension | | status | 0 | diff --git a/tests/integration/features/policies/identification_documents_policy.feature b/tests/integration/features/policies/identification_documents_policy.feature index 9065e6ec13..f8c35bc83e 100644 --- a/tests/integration/features/policies/identification_documents_policy.feature +++ b/tests/integration/features/policies/identification_documents_policy.feature @@ -68,7 +68,7 @@ Feature: policies/identification_documents_policy And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | Identification flow document | Then the response should have a status code 200 @@ -82,7 +82,7 @@ Feature: policies/identification_documents_policy | (jq).ocs.data.settings.identificationDocumentsWaitingApproval | false | When sending "post" to ocs "/apps/libresign/api/v1/id-docs" - | files | [{"file":{"url":"/apps/libresign/develop/pdf"},"type":"IDENTIFICATION"}] | + | files | [{"file":{"base64":""},"type":"IDENTIFICATION"}] | When sending "get" to ocs "/apps/libresign/api/v1/id-docs/approval/list" Then the response should have a status code 404 diff --git a/tests/integration/features/security/envelope_authorization.feature b/tests/integration/features/security/envelope_authorization.feature index 26f19dd92d..ef587e535f 100644 --- a/tests/integration/features/security/envelope_authorization.feature +++ b/tests/integration/features/security/envelope_authorization.feature @@ -10,7 +10,7 @@ Feature: envelope authorization Scenario: A requester cannot modify another requester's draft envelope Given sending "post" to ocs "/apps/libresign/api/v1/file" - | files | [{"url":"/apps/libresign/develop/pdf","name":"Contract.pdf"},{"url":"/apps/libresign/develop/pdf","name":"Annex.pdf"}] | + | files | [{"base64":"","name":"Contract.pdf"},{"base64":"","name":"Annex.pdf"}] | | name | Owner Envelope | And the response should have a status code 200 And fetch field "(ENVELOPE_UUID)ocs.data.uuid" from previous JSON response @@ -23,7 +23,7 @@ Feature: envelope authorization Scenario: The envelope owner reaches upload validation Given sending "post" to ocs "/apps/libresign/api/v1/file" - | files | [{"url":"/apps/libresign/develop/pdf","name":"Contract.pdf"},{"url":"/apps/libresign/develop/pdf","name":"Annex.pdf"}] | + | files | [{"base64":"","name":"Contract.pdf"},{"base64":"","name":"Annex.pdf"}] | | name | Owner Envelope | And the response should have a status code 200 And fetch field "(ENVELOPE_UUID)ocs.data.uuid" from previous JSON response diff --git a/tests/integration/features/sign/cancel.feature b/tests/integration/features/sign/cancel.feature index 6f09322047..92a8108189 100644 --- a/tests/integration/features/sign/cancel.feature +++ b/tests/integration/features/sign/cancel.feature @@ -5,7 +5,7 @@ Feature: sign-request-cancel And reset notifications of user "signer1" And run the command "libresign:configure:openssl --cn test" with result code 0 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 @@ -26,7 +26,7 @@ Feature: sign-request-cancel And reset notifications of user "signer1" And run the command "libresign:configure:openssl --cn test" with result code 0 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}],"notify":false}] | | name | document | | status | 0 | @@ -47,7 +47,7 @@ Feature: sign-request-cancel And user "signer1" exists And run the command "libresign:configure:openssl --cn test" with result code 0 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | When sending "get" to ocs "/apps/libresign/api/v1/file/list?details=1" @@ -63,7 +63,7 @@ Feature: sign-request-cancel And user "signer1" exists And run the command "libresign:configure:openssl --cn test" with result code 0 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 diff --git a/tests/integration/features/sign/reject.feature b/tests/integration/features/sign/reject.feature index 7aa3da3be9..d3bad52ab5 100644 --- a/tests/integration/features/sign/reject.feature +++ b/tests/integration/features/sign/reject.feature @@ -7,7 +7,7 @@ Feature: sign-signature-rejection | value | {"enabled":false} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 @@ -28,7 +28,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 @@ -77,7 +77,7 @@ Feature: sign-signature-rejection | value | {"enabled":false} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -95,7 +95,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional","cancel_workflow":false} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -127,7 +127,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"required"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -152,7 +152,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -178,7 +178,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | status | 0 | @@ -209,7 +209,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | status | 0 | @@ -242,7 +242,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | status | 0 | @@ -274,7 +274,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -483,7 +483,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional","public_status":true,"show_comment_on_validation":true} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -526,7 +526,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional","public_status":true,"show_comment_on_validation":true} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -552,7 +552,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -576,7 +576,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional"} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}],"signingOrder":1},{"identifyMethods":[{"method":"account","value":"signer2"}],"signingOrder":2}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | @@ -603,7 +603,7 @@ Feature: sign-signature-rejection | value | {"enabled":true,"comment_mode":"optional","cancel_workflow":true} | And the response should have a status code 200 And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | | policy | {"overrides":{"signature_rejection":{"enabled":true}}} | diff --git a/tests/integration/features/sign/request.feature b/tests/integration/features/sign/request.feature index 73e43a659e..3c92b63183 100644 --- a/tests/integration/features/sign/request.feature +++ b/tests/integration/features/sign/request.feature @@ -28,6 +28,19 @@ Feature: request-signature | key | value | | (jq).ocs.data.message | File name is required | + Scenario: Create signature request from a remote PDF URL + Given as user "admin" + And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" + | rootCert | {"commonName":"test"} | + When sending "post" to ocs "/apps/libresign/api/v1/request-signature" + | file | {"url":""} | + | signers | [{"identifyMethods":[{"method":"email","value":"signer-url@domain.test"}]}] | + | name | document-from-url | + Then the response should have a status code 200 + And the response should be a JSON array with the following mandatory values + | key | value | + | (jq).ocs.data.name | document-from-url | + Scenario: Create signature request with error using different authenticated account Given as user "admin" And user "signer1" exists @@ -42,7 +55,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 @@ -79,7 +92,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And the response should have a status code 200 @@ -109,7 +122,7 @@ Feature: request-signature And reset notifications of user "signer1" And my inbox is empty And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | Then the response should have a status code 200 @@ -132,7 +145,7 @@ Feature: request-signature And set the email of user "signer1" to "signer1@domain.test" And my inbox is empty And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -156,7 +169,7 @@ Feature: request-signature | rootCert | {"commonName":"test"} | And run the command "config:app:set libresign maximum_validity --value=1 --type=integer" with result code 0 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -180,7 +193,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required"}]} | And sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] | | name | document | And the response should have a status code 200 @@ -232,7 +245,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"factors":[{"name":"account","enabled":true}]} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | document | Then the response should be a JSON array with the following mandatory values @@ -248,7 +261,7 @@ Feature: request-signature And reset notifications of user "signer1" And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | Then the response should have a status code 200 @@ -271,7 +284,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"invaliddomain.test"}]}] | | name | document | Then the response should have a status code 422 @@ -284,7 +297,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/admin/certificate/openssl" | rootCert | {"commonName":"test"} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer3@domain.test"}]}] | | name | document | Then the response should have a status code 422 @@ -299,7 +312,7 @@ Feature: request-signature | rootCert | {"commonName":"test"} | And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -315,7 +328,7 @@ Feature: request-signature And reset notifications of user "signer1" And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | Then the response should have a status code 200 @@ -328,7 +341,7 @@ Feature: request-signature And set the email of user "signer1" to "signer1@domain.test" And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -342,7 +355,7 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required"}]} | And I send a file to be signed - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | status | 0 | | name | document | @@ -372,7 +385,7 @@ Feature: request-signature And set the email of user "signer1" to "" And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]},{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | Then the response should have a status code 200 @@ -391,7 +404,7 @@ Feature: request-signature | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required","signatureMethods":{"emailToken":{"enabled":true}}}]} | And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]},{"identifyMethods":[{"method":"email","value":"22222@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -433,7 +446,7 @@ Feature: request-signature | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required","signatureMethods":{"emailToken":{"enabled":true}}}]} | And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -478,7 +491,7 @@ Feature: request-signature | value | (string){"can_create_account":false,"factors":[{"name":"email","enabled":true,"requirement":"required","signatureMethods":{"emailToken":{"enabled":true}}}]} | And my inbox is empty When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]}] | | name | document | Then the response should have a status code 200 @@ -517,7 +530,7 @@ Feature: request-signature And user "signer1" exists And as user "admin" When I send a file to be signed - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]},{"identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | document | And fetch field "(FILE_UUID)ocs.data.uuid" from previous JSON response @@ -558,13 +571,13 @@ Feature: request-signature And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"factors":[{"name":"email","enabled":true,"requirement":"required","signatureMethods":{"emailToken":{"enabled":true}}}]} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | | status | 0 | And there should be 0 emails in my inbox When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] | | name | document | | status | 1 | diff --git a/tests/integration/features/sign/sequential_signing.feature b/tests/integration/features/sign/sequential_signing.feature index 5fc74e4c7b..6efbed111f 100644 --- a/tests/integration/features/sign/sequential_signing.feature +++ b/tests/integration/features/sign/sequential_signing.feature @@ -14,7 +14,7 @@ Feature: sequential-signing Given user "signer1" exists And user "signer2" exists When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]},{"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | Parallel Document | Then the response should have a status code 200 @@ -40,7 +40,7 @@ Feature: sequential-signing | value | ordered_numeric | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods":[{"method":"account","value":"signer1"}],"signingOrder":1},{"identifyMethods":[{"method":"account","value":"signer2"}],"signingOrder":2}] | | name | Sequential Document | Then the response should have a status code 200 diff --git a/tests/integration/features/sign/signed.feature b/tests/integration/features/sign/signed.feature index c20583430c..e3fcb1f84c 100644 --- a/tests/integration/features/sign/signed.feature +++ b/tests/integration/features/sign/signed.feature @@ -17,7 +17,7 @@ Feature: signed | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"password":{"name":"password","enabled":true}},"signatureMethodEnabled":"password"}]} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName": "Signer Name","description": "Please, sign this document","identifyMethods": [{"method": "account", "value": "signer1"}]}] | | name | Document Name | And the response should have a status code 200 @@ -70,7 +70,7 @@ Feature: signed And reset notifications of user "admin" And reset activity of user "admin" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName": "Signer Name","identifyMethods": [{"method": "account", "value": "signer1"}]},{"displayName": "Admin","identifyMethods": [{"method": "account", "value": "admin"}]}] | | name | Document Name | And the response should have a status code 200 @@ -135,7 +135,7 @@ Feature: signed And reset notifications of user "admin" And reset activity of user "admin" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName": "Signer Name","identifyMethods": [{"method": "account", "value": "signer1"}]},{"displayName": "Admin","identifyMethods": [{"method": "account", "value": "admin"}]}] | | name | Document Name | And the response should have a status code 200 @@ -190,7 +190,7 @@ Feature: signed And reset notifications of user "admin" And reset activity of user "admin" When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName": "Signer Name","identifyMethods": [{"method": "email", "value": "unauthenticated@email.tld"}]}] | | name | Document Name | And the response should have a status code 200 diff --git a/tests/integration/features/sign/signer_geolocation.feature b/tests/integration/features/sign/signer_geolocation.feature index e8d875d325..90901f6308 100644 --- a/tests/integration/features/sign/signer_geolocation.feature +++ b/tests/integration/features/sign/signer_geolocation.feature @@ -17,7 +17,7 @@ Feature: sign/signer_geolocation | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}}}]} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName":"Signer Name","identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | Geolocation document | And the response should have a status code 200 @@ -63,7 +63,7 @@ Feature: sign/signer_geolocation | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}}}]} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName":"Required signer","geolocationRequired":true,"identifyMethods":[{"method":"account","value":"signer1"}]},{"displayName":"Optional signer","geolocationRequired":false,"identifyMethods":[{"method":"account","value":"signer2"}]}] | | name | Mixed geolocation document | And the response should have a status code 200 @@ -100,7 +100,7 @@ Feature: sign/signer_geolocation | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}}}]} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName":"Signer Name","identifyMethods":[{"method":"account","value":"signer1"}]}] | | name | Frozen geolocation document | And the response should have a status code 200 diff --git a/tests/integration/features/sign/tsa.feature b/tests/integration/features/sign/tsa.feature index 2eef050c25..0f17ea525a 100644 --- a/tests/integration/features/sign/tsa.feature +++ b/tests/integration/features/sign/tsa.feature @@ -17,7 +17,7 @@ Feature: TSA Integration - End-to-End Workflow | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}},"signatureMethodEnabled":"clickToSign"}]} | And the response should have a status code 200 When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"displayName": "TSA Signer","identifyMethods": [{"method": "account", "value": "signer1"}]}] | | name | TSA Document Test | Then the response should have a status code 200 @@ -60,7 +60,7 @@ Feature: TSA Integration - End-to-End Workflow And sending "post" to ocs "/apps/libresign/api/v1/policies/system/identify_methods" | value | (string){"factors":[{"name":"account","enabled":true,"requirement":"required","signatureMethods":{"clickToSign":{"enabled":true}},"signatureMethodEnabled":"clickToSign"}]} | When sending "post" to ocs "/apps/libresign/api/v1/request-signature" - | file | {"url":"/apps/libresign/develop/pdf"} | + | file | {"base64":""} | | signers | [{"identifyMethods": [{"method": "account", "value": "signer1"}]}] | | name | TSA Error Test | And as user "signer1"