mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-08-07 05:14:57 -04:00
setup fakeoffice for acceptance test
This commit is contained in:
3 files changed
+111
-42
No files matched your search
@@ -4,7 +4,7 @@ Feature: App Provider
|
||||
Scenario: open file with Collabora
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
|
||||
When user "Alice" opens file "simple.odt" with Collabora service
|
||||
When user "Alice" opens file "simple.odt" with collaboration service
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
|
||||
@@ -4132,25 +4132,24 @@ class SpacesContext implements Context {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user opens file :filename with Collabora service
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userOpensFileWithCollaboraService(string $user, string $filename): void
|
||||
{
|
||||
$fileId = $this->getFileId($user, "Personal", $filename);
|
||||
$url = $this->featureContext->getBaseUrl() . "/app/open?file_id=$fileId&app_name=Collabora";
|
||||
$this->featureContext->setResponse(
|
||||
HttpRequestHelper::post(
|
||||
$url,
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
$this->featureContext->getPasswordForUser($user)
|
||||
)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @When user :user opens file :filename with collaboration service
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userOpensFileWithCollaborationService(string $user, string $filename): void {
|
||||
$fileId = $this->getFileId($user, "Personal", $filename);
|
||||
$url = $this->featureContext->getBaseUrl() . "/app/open?file_id=$fileId&app_name=FakeOffice";
|
||||
$this->featureContext->setResponse(
|
||||
HttpRequestHelper::post(
|
||||
$url,
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
$this->featureContext->getPasswordForUser($user)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user