Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

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

Merged
phil-davis merged 1 commit into
masterfrom
refactor-permission-tests
Sep 29, 2020
Merged

phil-davis merged 1 commit into
masterfrom
refactor-permission-tests

Conversation

@dpakach

@dpakach dpakach commented Sep 24, 2020 •

Copy link
Copy Markdown
Contributor

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 dpakach mentioned this pull request Sep 25, 2020
2 tasks
@dpakach
dpakach force-pushed the refactor-permission-tests branch from aa9a60a to 7ac50b0 Compare September 25, 2020 09:25
@dpakach dpakach self-assigned this Sep 25, 2020
@dpakach
dpakach marked this pull request as ready for review September 25, 2020 10:53
@dpakach

dpakach commented Sep 25, 2020

Copy link
Copy Markdown
Contributor Author

@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.

@individual-it individual-it left a comment

Copy link
Copy Markdown
Member

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

@dpakach
dpakach force-pushed the refactor-permission-tests branch from 7ac50b0 to 2540bc7 Compare September 29, 2020 10:37
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants