Merge pull request #2757 from owncloud/spaces-tests-20211112
[tests-only] Add test step about 'space contains for user'
This commit is contained in:
@@ -16,7 +16,7 @@ Feature: Upload files into a space
|
|||||||
And user "Alice" lists all available spaces via the GraphApi
|
And user "Alice" lists all available spaces via the GraphApi
|
||||||
And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api
|
And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api
|
||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And the space "Project Venus" should contain these entries:
|
And for user "Alice" the space "Project Venus" should contain these entries:
|
||||||
| mainFolder |
|
| mainFolder |
|
||||||
|
|
||||||
Scenario: Bob creates a folder via the Graph api in a space, he expects a 404 code and Alice checks that this folder does not exist
|
Scenario: Bob creates a folder via the Graph api in a space, he expects a 404 code and Alice checks that this folder does not exist
|
||||||
@@ -25,7 +25,7 @@ Feature: Upload files into a space
|
|||||||
And user "Alice" lists all available spaces via the GraphApi
|
And user "Alice" lists all available spaces via the GraphApi
|
||||||
And user "Bob" creates a folder "forAlice" in space "Project Merkur" using the WebDav Api
|
And user "Bob" creates a folder "forAlice" in space "Project Merkur" using the WebDav Api
|
||||||
Then the HTTP status code should be "404"
|
Then the HTTP status code should be "404"
|
||||||
And the space "Project Merkur" should not contain these entries:
|
And for user "Alice" the space "Project Merkur" should not contain these entries:
|
||||||
| forAlice |
|
| forAlice |
|
||||||
|
|
||||||
Scenario: Alice creates a folder via Graph api and uploads a file
|
Scenario: Alice creates a folder via Graph api and uploads a file
|
||||||
@@ -36,7 +36,7 @@ Feature: Upload files into a space
|
|||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And user "Alice" uploads a file inside space "Project Moon" with content "Test" to "test.txt" using the WebDAV API
|
And user "Alice" uploads a file inside space "Project Moon" with content "Test" to "test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And the space "Project Moon" should contain these entries:
|
And for user "Alice" the space "Project Moon" should contain these entries:
|
||||||
| NewFolder |
|
| NewFolder |
|
||||||
| test.txt |
|
| test.txt |
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ Feature: Upload files into a space
|
|||||||
And user "Alice" lists all available spaces via the GraphApi
|
And user "Alice" lists all available spaces via the GraphApi
|
||||||
And user "Bob" uploads a file inside space "Project Pluto" with content "Test" to "test.txt" using the WebDAV API
|
And user "Bob" uploads a file inside space "Project Pluto" with content "Test" to "test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "404"
|
Then the HTTP status code should be "404"
|
||||||
And the space "Project Pluto" should not contain these entries:
|
And for user "Alice" the space "Project Pluto" should not contain these entries:
|
||||||
| test.txt |
|
| test.txt |
|
||||||
|
|
||||||
Scenario: Alice creates uploads a file and checks her quota
|
Scenario: Alice creates uploads a file and checks her quota
|
||||||
@@ -61,8 +61,7 @@ Feature: Upload files into a space
|
|||||||
And user "Alice" lists all available spaces via the GraphApi
|
And user "Alice" lists all available spaces via the GraphApi
|
||||||
And user "Alice" uploads a file inside space "Project Saturn" with content "Test" to "test.txt" using the WebDAV API
|
And user "Alice" uploads a file inside space "Project Saturn" with content "Test" to "test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
When user "Alice" lists the content of the space with the name "Project Saturn" using the WebDav Api
|
And for user "Alice" the space "Project Saturn" should contain these entries:
|
||||||
Then the propfind result of the space should contain these entries:
|
|
||||||
| test.txt |
|
| test.txt |
|
||||||
And user "Alice" lists all available spaces via the GraphApi
|
And user "Alice" lists all available spaces via the GraphApi
|
||||||
And the json responded should contain a space "Project Saturn" with these key and value pairs:
|
And the json responded should contain a space "Project Saturn" with these key and value pairs:
|
||||||
|
|||||||
@@ -584,6 +584,34 @@ class SpacesContext implements Context {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Then /^for user "([^"]*)" the space "([^"]*)" should (not|)\s?contain these (?:files|entries):$/
|
||||||
|
*
|
||||||
|
* @param string $user
|
||||||
|
* @param string $spaceName
|
||||||
|
* @param string $shouldOrNot (not|)
|
||||||
|
* @param TableNode $expectedFiles
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws Exception|GuzzleException
|
||||||
|
*/
|
||||||
|
public function usertheSpaceShouldContainEntries(
|
||||||
|
string $user,
|
||||||
|
string $spaceName,
|
||||||
|
string $shouldOrNot,
|
||||||
|
TableNode $expectedFiles
|
||||||
|
):void {
|
||||||
|
$this->theUserListsTheContentOfAPersonalSpaceRootUsingTheWebDAvApi(
|
||||||
|
$user,
|
||||||
|
$spaceName
|
||||||
|
);
|
||||||
|
$this->propfindResultShouldContainEntries(
|
||||||
|
$shouldOrNot,
|
||||||
|
$expectedFiles,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then /^the json responded should contain a space "([^"]*)" with these key and value pairs:$/
|
* @Then /^the json responded should contain a space "([^"]*)" with these key and value pairs:$/
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user