Skip to content

Commit

Permalink
Add commit and branch related to this PR to work
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarGi committed Sep 5, 2022
1 parent c31a0ed commit bbe4c75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The test runner source for API tests
CORE_COMMITID=d8ed82769fc422c38d6f6bc21253a052eef5e239
CORE_COMMITID=b51fb4c01f08763e023aece4f90308e07a7ac73f
CORE_BRANCH=master

# The test runner source for UI tests
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ default:
- FilesVersionsContext:
- OCSContext:
- PublicWebDavContext:
- FavoritesContext:
- TrashbinContext:
- WebDavPropertiesContext:

Expand Down
19 changes: 17 additions & 2 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,21 @@ public function getSpaceByName(string $user, string $spaceName): array {
return $spaces[$spaceName];
}

/**
* This method sets space id by Space Name
* This is currently used to set space id from ocis in core so that we can reuse available resource (code) and avoid duplication
*
* @param string $user
* @param string $spaceName
*
* @return void
* @throws GuzzleException
*/
public function setSpaceIDByName(string $user, string $spaceName): void {
$space = $this->getSpaceByName($user,$spaceName);
WebDavHelper::$SPACE_ID_FROM_OCIS = $space['id'];
}

/**
* The method finds available spaces to the manager user and returns the space by spaceName
*
Expand Down Expand Up @@ -3259,7 +3274,7 @@ public function asUserFileInsideSpaceShouldContainAPropertyWithValue(
* @throws GuzzleException
*/
public function userFavoritesElementInSpaceUsingTheWebdavApi(string $user, string $path, string $spaceName): void {
$space = $this->getSpaceByName($user, $spaceName);
$this->favoritesContext->userFavoritesElement($user, $path, $space['id']);
$this->setSpaceIDByName($user, $spaceName);
$this->favoritesContext->userFavoritesElement($user, $path);
}
}

0 comments on commit bbe4c75

Please sign in to comment.