Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests-Only] refactor permission tests for shares folder #4104

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

dpakach
Copy link
Contributor

@dpakach dpakach commented Sep 24, 2020

Description

Refactor webui test scenarios for using the Shares folder and root folder for shares.

Related Issue

Motivation and Context

Shares in ocis are received in Shares folder by default. To test that we need this refactor.

How Has This Been Tested?

🤖

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@dpakach
Copy link
Contributor Author

dpakach commented Sep 25, 2020

@phil-davis I have added all permission tests on the root folder to one suite and removed all scenario outlines. So there is only one test for each condition. These suites check the different combinations of permissions. So I thought it was wise not to run those 2 times. The tests for Shares folder runs all the combination so that we can run them on ocis and oc10 both.

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to solve this discussion #4103 (comment)

two points in the discussion:

  1. creating a new When step with using the API
  2. moving the "accept" steps up to the other Whens

Then custom permissions "<displayed-permissions>" should be set for user "grp2" for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User Three" for folder "simple-folder" on the webUI
And group "grp2" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "User Three" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And user "user2" should have received a share with these details:
Then user "user2" should have received a share with these details:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then user "user2" should have received a share with these details:
And user "user2" should have received a share with these details:

But not a big deal.

And as "user1" folder "simple-folder (2)" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Advanced permissions | Advanced permissions | delete | delete | read, delete |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed combinations of permissions are being done in webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature which also has the share_folder set to Shares - that is OK.

And as "user4" file "lorem(2).txt" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Viewer | Viewer | share | share | read, share |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed example cases are now done in the suite that has share_folder set to Shares, so they can run on OCIS.

And as "user4" folder "simple-folder (2)" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Viewer | Viewer | share | share | read, share |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed example cases are now done in the suite that has share_folder set to Shares, so they can run on OCIS.

And as "user1" file "lorem (2).txt" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Viewer | Viewer | share | share | read, share |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed example cases are now done in the suite that has share_folder set to Shares, so they can run on OCIS.

And as "user1" folder "simple-folder (2)" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Viewer | Viewer | share | share | read, share |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed example cases are now done in the suite that has share_folder set to Shares, so they can run on OCIS.

And as "user4" folder "simple-folder (2)" should not exist
Examples:
| role | displayed-role | extra-permissions | displayed-permissions | actual-permissions |
# | Advanced permissions | Advanced permissions | delete | delete | read, delete |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the detailed example cases are now done in the suite that has share_folder set to Shares, so they can run on OCIS.

Then user "User One" should be listed as "<displayed-role>" in the collaborators list for folder "simple-folder" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for folder "simple-folder" on the webUI
And user "user1" should have received a share with these details:
Then user "user1" should have received a share with these details:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then user "user1" should have received a share with these details:
And user "user1" should have received a share with these details:

Then user "User One" should be listed as "<displayed-role>" in the collaborators list for file "lorem.txt" on the webUI
And custom permissions "<displayed-permissions>" should be set for user "User One" for file "lorem.txt" on the webUI
And user "user1" should have received a share with these details:
Then user "user1" should have received a share with these details:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then user "user1" should have received a share with these details:
And user "user1" should have received a share with these details:

@phil-davis phil-davis merged commit 872333e into master Sep 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the refactor-permission-tests branch September 29, 2020 11:34
@phil-davis
Copy link
Contributor

Then/And can be sorted out later. It is not really important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants