Acceptance fix

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-03-01 10:45:56 +01:00
parent 7bcc821642
commit 484568e995
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
2 changed files with 37 additions and 1 deletions

View File

@ -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"

View File

@ -109,6 +109,13 @@ class FilesSharingAppContext implements Context, ActorAwareInterface {
$this->actor->getSession()->visit($this->actor->getSharedNotebook()["shared link"]);
}
/**
* @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
*/
@ -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());
}
@ -142,6 +158,15 @@ class FilesSharingAppContext implements Context, ActorAwareInterface {
$this->actor->getSession()->getCurrentUrl());
}
/**
* @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
*/