diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-01 10:45:56 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-01 10:45:56 +0100 |
commit | 484568e995fe3586b823a1493505b4c39aa1ea23 (patch) | |
tree | ad0ddadd121f838b36ae04abdc15a3ef49044ed2 /tests | |
parent | 7bcc82164221f5f6c807af4e1309220a1f852a0f (diff) | |
download | nextcloud-server-484568e995fe3586b823a1493505b4c39aa1ea23.tar.gz nextcloud-server-484568e995fe3586b823a1493505b4c39aa1ea23.zip |
Acceptance fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/features/app-files.feature | 11 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/FilesSharingAppContext.php | 27 |
2 files changed, 37 insertions, 1 deletions
diff --git a/tests/acceptance/features/app-files.feature b/tests/acceptance/features/app-files.feature index ef3d07ae499..eeef6de601f 100644 --- a/tests/acceptance/features/app-files.feature +++ b/tests/acceptance/features/app-files.feature @@ -71,6 +71,17 @@ Feature: app-files Then I see that the current page is the Authenticate page for the shared link I wrote down And I see that a wrong password for the shared file message is shown + Scenario: access a direct download shared link protected by password with a valid password + Given I act as John + And I am logged in + And I share the link for "welcome.txt" protected by the password "abcdef" + And I write down the shared link + When I act as Jane + And I visit the direct download shared link I wrote down + And I see that the current page is the Authenticate page for the direct download shared link I wrote down + And I authenticate with password "abcdef" + Then I see that the current page is the direct download shared link I wrote down + Scenario: show the input field for tags in the details view Given I am logged in And I open the details view for "welcome.txt" diff --git a/tests/acceptance/features/bootstrap/FilesSharingAppContext.php b/tests/acceptance/features/bootstrap/FilesSharingAppContext.php index 5c5d23887cd..4b7dd08c83e 100644 --- a/tests/acceptance/features/bootstrap/FilesSharingAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesSharingAppContext.php @@ -110,6 +110,13 @@ class FilesSharingAppContext implements Context, ActorAwareInterface { } /** + * @When I visit the direct download shared link I wrote down + */ + public function iVisitTheDirectDownloadSharedLinkIWroteDown() { + $this->actor->getSession()->visit($this->actor->getSharedNotebook()["shared link"] . "/download"); + } + + /** * @When I authenticate with password :password */ public function iAuthenticateWithPassword($password) { @@ -129,7 +136,16 @@ class FilesSharingAppContext implements Context, ActorAwareInterface { */ public function iSeeThatTheCurrentPageIsTheAuthenticatePageForTheSharedLinkIWroteDown() { PHPUnit_Framework_Assert::assertEquals( - $this->actor->getSharedNotebook()["shared link"] . "/authenticate", + $this->actor->getSharedNotebook()["shared link"] . "/authenticate/preview", + $this->actor->getSession()->getCurrentUrl()); + } + + /** + * @Then I see that the current page is the Authenticate page for the direct download shared link I wrote down + */ + public function iSeeThatTheCurrentPageIsTheAuthenticatePageForTheDirectDownloadSharedLinkIWroteDown() { + PHPUnit_Framework_Assert::assertEquals( + $this->actor->getSharedNotebook()["shared link"] . "/authenticate/download", $this->actor->getSession()->getCurrentUrl()); } @@ -143,6 +159,15 @@ class FilesSharingAppContext implements Context, ActorAwareInterface { } /** + * @Then I see that the current page is the direct download shared link I wrote down + */ + public function iSeeThatTheCurrentPageIsTheDirectDownloadSharedLinkIWroteDown() { + PHPUnit_Framework_Assert::assertEquals( + $this->actor->getSharedNotebook()["shared link"] . "/download", + $this->actor->getSession()->getCurrentUrl()); + } + + /** * @Then I see that a wrong password for the shared file message is shown */ public function iSeeThatAWrongPasswordForTheSharedFileMessageIsShown() { |