refactored acceptance test code to store response data related to public shares on single store (#6930)

This commit is contained in:
Prajwol Amatya
2023-08-03 13:51:22 +05:45
committed by GitHub
parent b730234e86
commit db098fa4f5
7 changed files with 75 additions and 259 deletions
@@ -1499,7 +1499,7 @@ trait WebDav {
* @throws Exception
*/
public function publicGetsSizeOfLastSharedPublicLinkUsingTheWebdavApi():void {
$tokenArray = $this->getLastPublicShareData()->data->token;
$tokenArray = $this->getLastCreatedPublicShare()->token;
$token = (string)$tokenArray[0];
$url = $this->getBaseUrl() . "/remote.php/dav/public-files/$token";
$this->response = HttpRequestHelper::sendRequest(
@@ -5117,7 +5117,7 @@ trait WebDav {
* @throws Exception
*/
public function theLastPublicDavResponseShouldContainTheseNodes(TableNode $table):void {
$user = $this->getLastPublicShareToken();
$user = $this->getLastCreatedPublicShareToken();
$this->verifyTableNodeColumns($table, ["name"]);
$type = $this->usingOldDavPath ? "public-files" : "public-files-new";
foreach ($table->getHash() as $row) {
@@ -5136,7 +5136,7 @@ trait WebDav {
* @throws Exception
*/
public function theLastPublicDavResponseShouldNotContainTheseNodes(TableNode $table):void {
$user = $this->getLastPublicShareToken();
$user = $this->getLastCreatedPublicShareToken();
$this->verifyTableNodeColumns($table, ["name"]);
$type = $this->usingOldDavPath ? "public-files" : "public-files-new";
foreach ($table->getHash() as $row) {
@@ -5155,7 +5155,7 @@ trait WebDav {
* @throws Exception
*/
public function thePublicListsTheResourcesInTheLastCreatedPublicLinkWithDepthUsingTheWebdavApi(string $depth):void {
$user = $this->getLastPublicShareToken();
$user = $this->getLastCreatedPublicShareToken();
$response = $this->listFolder(
$user,
'/',