Repository navigation
[Tests-Only] Refactor createShareToShareFolder.feature to use Shares folder - #37881
Conversation
Codecov Report
@@ Coverage Diff @@
## master #37881 +/- ##
=========================================
Coverage 64.75% 64.75%
Complexity 19403 19403
=========================================
Files 1285 1285
Lines 75823 75823
Branches 1336 1336
=========================================
Hits 49096 49096
Misses 26333 26333
Partials 394 394
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
ed0d145 to
b753dbb
Compare
|
|
For a start, I could change the words to: That is more the standard grammar that we use. Not mentioning administrator makes it a bit less like an "action" step. We could also say: That would not imply that any action has to be done - on some system-under-test it might need a setting to be set/changed, on another system-under-test it might be "is" already by default. |
40bd9e0 to
806b69d
Compare
|
|
||
| /** | ||
| * @Then /^the last share_id should not be included in the response/ | ||
| * @Then /^the last share id should not be included in the response/ |
There was a problem hiding this comment.
Note: I took the opportunity to change the step text slightly.
|
|
||
| /** | ||
| * @Then user :user should not see share_id of last share | ||
| * @Then user :user should not see the share id of the last share |
There was a problem hiding this comment.
Note: I took the opportunity to change the step text slightly.
|
|
||
| /** | ||
| * @When /^user "([^"]*)" (declines|accepts) the share "([^"]*)" offered by user "([^"]*)" using the sharing API$/ | ||
| * @When /^user "([^"]*)" (declines|accepts) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/ |
There was a problem hiding this comment.
Note: I took the opportunity to change the step text slightly.
|
|
||
| /** | ||
| * @Given /^user "([^"]*)" has (declined|accepted) the share "([^"]*)" offered by user "([^"]*)"$/ | ||
| * @Given /^user "([^"]*)" has (declined|accepted) share "([^"]*)" offered by user "([^"]*)"$/ |
There was a problem hiding this comment.
Note: I took the opportunity to change the step text slightly.
| $fullUrl = $this->getBaseUrl() . '/' . | ||
| WebDavHelper::getDavPath($user, $this->getDavPathVersion()); | ||
| return $fullUrl . '/' . \ltrim($fileDestination, '/'); | ||
| return \rtrim($fullUrl, '/') . '/' . \ltrim($fileDestination, '/'); |
There was a problem hiding this comment.
When developing this PR, I noticed that some requests had a double-slash here. If WebDavHelper::getDavPath already ends with a slash / then we do not want to end up with 2 slashes. (the server was responding OK, but it will be nicer to test the ordinary case when the request URL has just a single slash between each part)
| Assert::assertTrue( | ||
| $this->isEtagValid(), | ||
| "$entry '$path' expected to exist but not found" | ||
| "$entry '$path' expected to exist for user $user but not found" |
There was a problem hiding this comment.
I enhanced this message. In scenario outlines with multiple users, it was not clear which user was missing the expected file or folder.
dcf6137 to
304d853
Compare
Description
This is a way to get sharing API test scenarios that will be valid in both oC10 and OCIS. OCIS always puts received shares into a folder called
Sharesfor the share receiver. On OCIS, auto-accept shares is always disabled.keep the existing oC10 sharing scenarios that deliver shares into the root
/folder of the share receiver. Tag themnotToImplementOnOCIS. That maintains the test coverage of the default sharing on oC10 and the scenarios will not get run on OCIS.make new scenarios in new feature files
*ToSharesFolder.feature- for examplecreateShareToSharesFolder.feature. In those scenarios, set the folder for received shares to "Shares".Given the administrator has set the default folder for received shares to "Shares"And adjust the test steps and expectations so that the share receiver expects the shares in
/Sharesfolder.Put no specific tag on these test scenarios - they should pass on both oC10 and OCIS.
That tests a full range of oC10 behavior when the default folder for received shares is configured, and also tests sharing behavior in OCIS.
in the new scenarios, disable auto-accept shares. On OCIS this will do nothing (auto-accept shares is already disabled). On oC10 this will provide the same expected behavior as on OCIS.
Given auto-accept shares has been disabledAnd adjust the scenarios so that they have steps to accept a share before the receiver tries to access it. e.g.
So the pattern of these new feature files will have a
Backgroundthat has at least these lines:And such features should work the same way on oC10 and OCIS - so the scenarios can be run on both.
apiShareManagementBasicsuite becomesapiShareToRootManagementBasicandapiShareToSharesManagementBasicRelated Issue
owncloud/ocis#518
How Has This Been Tested?
CI
Types of changes
Checklist: