}
/**
- * @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 {
| 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
| 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