Skip to content

Commit

Permalink
Adjust more bug-demo scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Oct 6, 2020
1 parent 10dd14e commit 2f57133
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @files_sharing-app-required @notToImplementOnOCIS
@api @files_sharing-app-required
Feature: share resources with a disabled user

Background:
Expand All @@ -15,12 +15,11 @@ Feature: share resources with a disabled user
| ocs_api_version | ocs_status_code |
| 1 | 997 |

@issue-32068
@issue-32068 @skipOnOcV10
Scenario: Creating a new share with a disabled user
Given using OCS API version "2"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has been disabled
When user "Alice" shares file "welcome.txt" with user "Brian" using the sharing API
Then the OCS status code should be "997"
#And the OCS status code should be "401"
Then the OCS status code should be "401"
And the HTTP status code should be "401"
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
@api @files_sharing-app-required @issue-ocis-reva-243
@skipOnOcV10 @notToImplementOnOCIS
Feature: share resources with a disabled user
@api @files_sharing-app-required @issue-ocis-reva-243 @notToImplementOnOCIS
Feature: share resources with a disabled user - current oC10 behavior for issue-32068

Background:
Given user "Alice" has been created with default attributes and skeleton files

@issue-32068
Scenario: Creating a new share with a disabled user
Given user "Alice" has been created with default attributes and skeleton files
And using OCS API version "2"
Given using OCS API version "2"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has been disabled
When user "Alice" shares file "welcome.txt" with user "Brian" using the sharing API
Then the OCS status code should be "401"
Then the OCS status code should be "997"
#Then the OCS status code should be "401"
And the HTTP status code should be "401"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @files_sharing-app-required @notToImplementOnOCIS
@api @files_sharing-app-required
Feature: sharing

Background:
Expand Down Expand Up @@ -74,19 +74,16 @@ Feature: sharing
And as "Alice" file "/folderToShare/renamedFile" should exist
But as "Alice" file "/folderToShare/fileInside" should not exist

@issue-30325
@issue-30325 @skipOnOcV10
Scenario: receiver tries to rename a received share with share, read permissions
Given user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "/folderToShare/fileInside"
And user "Alice" has shared folder "folderToShare" with user "Brian" with permissions "share,read"
When user "Brian" moves folder "folderToShare" to "myFolder" using the WebDAV API
Then the HTTP status code should be "403"
# Then the HTTP status code should be "201"
And as "Brian" folder "myFolder" should not exist
# And as "Brian" folder "myFolder" should exist
Then the HTTP status code should be "201"
And as "Brian" folder "myFolder" should exist
But as "Alice" folder "myFolder" should not exist
# When user "Brian" moves file "/myFolder/fileInside" to "/myFolder/renamedFile" using the WebDAV API
When user "Brian" moves file "/folderToShare/fileInside" to "/folderToShare/renamedFile" using the WebDAV API
When user "Brian" moves file "/myFolder/fileInside" to "/myFolder/renamedFile" using the WebDAV API
Then the HTTP status code should be "403"
And as "Brian" file "/folderToShare/renamedFile" should not exist
But as "Brian" file "/folderToShare/fileInside" should exist
And as "Brian" file "/myFolder/renamedFile" should not exist
But as "Brian" file "/myFolder/fileInside" should exist
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
@api @files_sharing-app-required @issue-ocis-reva-14 @issue-ocis-reva-243
@skipOnOcV10 @notToImplementOnOCIS
Feature: sharing
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: sharing - current oC10 behavior for issue-30325

@issue-30325
Scenario: receiver tries to rename a received share with share, read permissions
Background:
Given using OCS API version "1"
And these users have been created with default attributes and skeleton files:
| username |
| Alice |
| Brian |
| Carol |
And user "Alice" has created folder "folderToShare"

@issue-30325
Scenario: receiver tries to rename a received share with share, read permissions
Given user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "thisIsAFileInsideTheSharedFolder" to "/folderToShare/fileInside"
And user "Alice" has shared folder "folderToShare" with user "Brian" with permissions "share,read"
When user "Brian" moves folder "folderToShare" to "myFolder" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" folder "myFolder" should exist
Then the HTTP status code should be "403"
# Then the HTTP status code should be "201"
And as "Brian" folder "myFolder" should not exist
# And as "Brian" folder "myFolder" should exist
But as "Alice" folder "myFolder" should not exist
When user "Brian" moves file "/myFolder/fileInside" to "/myFolder/renamedFile" using the WebDAV API
# When user "Brian" moves file "/myFolder/fileInside" to "/myFolder/renamedFile" using the WebDAV API
When user "Brian" moves file "/folderToShare/fileInside" to "/folderToShare/renamedFile" using the WebDAV API
Then the HTTP status code should be "403"
And as "Brian" file "/folderToShare/renamedFile" should not exist
# And as "Brian" file "/myFolder/renamedFile" should not exist
But as "Brian" file "/folderToShare/fileInside" should exist
# But as "Brian" file "/myFolder/fileInside" should exist

0 comments on commit 2f57133

Please sign in to comment.