Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-05-28 21:50:02 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-05-29 14:37:43 +0300
commitf7e8034d72add82bf677055f0a5ab6ed6a38c53c (patch)
tree0fa3972636259aaecda5fd5d857aa9ab4bdfe95f /build
parent062525b4609a89307781c6dc6b222878a014f7ba (diff)
Generalize integration test steps to download last share
Note that the "last link share can be downloaded" step was kept as it tests the "url" property specific of link shares. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/Sharing.php18
-rw-r--r--build/integration/sharing_features/sharing-v1.feature4
2 files changed, 18 insertions, 4 deletions
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index 0958ab5b64b..4ce2e12e29d 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -164,9 +164,23 @@ trait Sharing {
}
/**
- * @Then /^last link share with password "([^"]*)" can be downloaded$/
+ * @Then /^last share can be downloaded$/
*/
- public function lastLinkShareWithPasswordCanBeDownloaded($password) {
+ public function lastShareCanBeDownloaded() {
+ if (count($this->lastShareData->data->element) > 0) {
+ $token = $this->lastShareData->data[0]->token;
+ } else {
+ $token = $this->lastShareData->data->token;
+ }
+
+ $fullUrl = substr($this->baseUrl, 0, -4) . "index.php/s/" . $token . "/download";
+ $this->checkDownload($fullUrl, null, 'text/plain');
+ }
+
+ /**
+ * @Then /^last share with password "([^"]*)" can be downloaded$/
+ */
+ public function lastShareWithPasswordCanBeDownloaded($password) {
if (count($this->lastShareData->data->element) > 0) {
$token = $this->lastShareData->data[0]->token;
} else {
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature
index 8440a2d874e..498fe1456f6 100644
--- a/build/integration/sharing_features/sharing-v1.feature
+++ b/build/integration/sharing_features/sharing-v1.feature
@@ -75,7 +75,7 @@ Feature: sharing
| password | publicpw |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
- And last link share with password "publicpw" can be downloaded
+ And last share with password "publicpw" can be downloaded
Scenario: Creating a new public share of a folder
Given user "user0" exists
@@ -108,7 +108,7 @@ Feature: sharing
| expireDate | +3 days |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
- And last link share with password "publicpw" can be downloaded
+ And last share with password "publicpw" can be downloaded
Scenario: Creating a new public share, updating its expiration date and getting its info
Given user "user0" exists