Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Parajuli <kiranparajuli589@gmail.com>
  • Loading branch information
kiranparajuli589 committed Aug 22, 2022
1 parent e410b44 commit 6f4c819
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The test runner source for API tests
CORE_COMMITID=188d34c2229dc18f946749bb2da8a6ce9cad5259
CORE_BRANCH=ocis-2141/remove-space-examples
CORE_COMMITID=809f7256bdea4cd3dee45dfd5cd078542f4c55cf
CORE_BRANCH=master

# The test runner source for UI tests
WEB_COMMITID=52c0a3e8d0c0a2a8a342ed2656254afe03725260
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ Feature:
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares Jail" should contain these entries:
| textfile1.txt |
And the content of file "textfile1.txt" inside space "Shares Jail" for user "Brian" should be "this is a new content"
And the content of file "textfile1.txt" inside space "Personal" for user "Alice" should be "this is a new content"
And for user "Brian" the content of the file "/textfile1.txt" of the space "Shares Jail" should be "this is a new content"
And for user "Alice" the content of the file "/textfile1.txt" of the space "Personal" should be "this is a new content"
34 changes: 0 additions & 34 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3178,38 +3178,4 @@ public function asUserFileInsideSpaceShouldContainAPropertyWithValue(
$expectedValue
);
}

/**
* @Given /^the content of file "([^"]*)" inside space "([^"]*)" for user "([^"]*)" should be "([^"]*)"$/
*
* @param $fileSource
* @param $spaceName
* @param $user
* @param $expectedContent
*
* @return void
* @throws GuzzleException
*/
public function theContentOfFileInsideSpaceForUserShouldBe($fileSource, $spaceName, $user, $expectedContent) {
$user = $this->featureContext->getActualUsername($user);
$space = $this->getSpaceByName($user, $spaceName);
$fullUrl = $space["root"]["webDavUrl"] . '/' . ltrim($fileSource, "/");
$this->featureContext->setResponse(
HttpRequestHelper::get(
$fullUrl,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
)
);
$this->featureContext->theHttpStatusCodeShouldBe(200);
$actualContent = (string) $this->featureContext->getResponse()->getBody();
Assert::assertEquals(
$expectedContent,
$actualContent,
__METHOD__ . " Downloaded content mis-match for resource at '$fileSource' inside space '$spaceName'" .
"\n- Expected content: $expectedContent" .
"\n+ Actual content: $actualContent"
);
}
}

0 comments on commit 6f4c819

Please sign in to comment.