mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-06 15:13:22 -04:00
review addressed
This commit is contained in:
@@ -25,7 +25,6 @@ use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
/**
|
||||
* steps needed to re-configure oCIS server
|
||||
*/
|
||||
@@ -52,19 +51,19 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user request information of file :file on space :space for :app
|
||||
* @When user :user checks the information of file :file of space :space using office :app
|
||||
*
|
||||
* @param $user
|
||||
* @param $file
|
||||
* @param $space
|
||||
* @param $app
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
* @param string $space
|
||||
* @param string $app
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function userRequestInformationOfFileOnSpaceFor($user, $file, $space, $app) : void {
|
||||
public function userChecksTheInformationOfFileOfSpaceUsingOffice(string $user, string $file, string $space, string $app): void {
|
||||
$fileId = $this->spacesContext->getFileId($user, $space, $file);
|
||||
$response = \json_decode(
|
||||
HttpRequestHelper::post(
|
||||
@@ -90,5 +89,4 @@ class CollaborationContext implements Context {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
Feature: check file info on wopi
|
||||
Feature: check file info with different wopi apps
|
||||
As a user
|
||||
I want to request file information on wopi server
|
||||
So that I can make sure that the response contains all the relevant values
|
||||
So that I can get all the information of a file
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
|
||||
|
||||
Scenario: check file info for fake office
|
||||
Scenario: check file info with fake office
|
||||
Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
When user "Alice" request information of file "textfile0.txt" on space "Personal" for "FakeOffice"
|
||||
When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "FakeOffice"
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -51,19 +51,16 @@ Feature: check file info on wopi
|
||||
"const": "textfile0.txt"
|
||||
},
|
||||
"OwnerId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-fA-F]{32,}$"
|
||||
"type": "string"
|
||||
},
|
||||
"Size": {
|
||||
"const": 11
|
||||
},
|
||||
"UserId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-fA-F]{32,}$"
|
||||
"type": "string"
|
||||
},
|
||||
"Version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d{10,12}\\.\\d+$"
|
||||
"type": "string"
|
||||
},
|
||||
"SupportsCobalt": {
|
||||
"const": false
|
||||
|
||||
Reference in New Issue
Block a user