-
Notifications
You must be signed in to change notification settings - Fork 2
/
shares.feature
136 lines (116 loc) · 5.49 KB
/
shares.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@shares
Feature: Private Share
As a user
I want to share my content with other users in the platform
So that the content is accessible and others can contribute
Background: User is logged in
Given user Alice is logged in
@createshare
Rule: Create a share
@smoke
Scenario Outline: Correct share with user
Given the following items have been created in Alice account
| <type> | <item> |
When Alice selects to share the <type> <item> using the <menu> menu
And Alice selects the following user as sharee with <permissions> permissions
| sharee | <sharee> |
| email | <email> |
| permissions | <permissions> |
Then user <sharee> should have access to <item>
And share should be created on <item> with the following fields
| sharee | <sharee> (<email>) |
| permissions | <permissions> |
Examples:
| type | item | permissions | sharee | email | menu |
| file | Share1.txt | Viewer | Bob | bob@own.com | Actions |
| folder | Share2 | Editor | Charles | charly@own.com | Contextual |
@smoke
Scenario Outline: Correct share with group
Given the following items have been created in Alice account
| <type> | <item> |
When Alice selects to share the <type> <item> using the <menu> menu
And Alice selects the following group as sharee with <permissions> permissions
| group | <group> |
Then share should be created on <item> with the following fields
| group | <group> |
| permissions | <permissions> |
And group test should have access to <item>
Examples:
| type | item | group | permissions | menu |
| file | Share3.txt | test | Viewer | Contextual |
| folder | Share4 | test | Editor | Actions |
@editshare
Rule: Edit an existing share
Scenario Outline: Edit existing share on a folder, removing permissions
Given the following items have been created in Alice account
| folder | <item> |
And Alice has shared <type> <item> with user <sharee> with Viewer permissions
When Alice selects to share the folder <item> using the Actions menu
And Alice edits the share with the following fields
| sharee | <sharee> (<email>) |
| permissions | <permissions> |
Then user <sharee> should have access to <item>
And share should be created on <item> with the following fields
| sharee | <sharee> (<email>) |
| permissions | <permissions> |
Examples:
| type | item | sharee | email | permissions |
| folder | Share5 | Bob | bob@own.com | Editor |
| folder | Share6 | Bob | bob@own.com | Custom |
@resharing @ignore
Rule: Resharing
Scenario Outline: Resharing allowed
Given the following items have been created in Alice account
| <type> | <item> |
When Alice selects to share the <type> <item> using the Actions menu
And Alice selects the following user as sharee with Viewer permissions
| sharee | <sharee> |
| email | <email> |
And Bob has reshared <type> <item> with <shareetype> <sharee2> with Viewer permissions
Then user <sharee> should have access to <item>
And user <sharee2> should have access to <item>
And share should be created on <item> with the following fields
| sharee | <sharee> (<email>) |
| sharee | <sharee2> (<email2>) |
Examples:
| type | item | shareetype | sharee | email | sharee2 | email2 |
| file | Share7.txt | user | Bob | bob@own.com | Charles | charly@own.com |
| folder | Share8 | user | Bob | bob@own.com | Charles | charly@own.com |
Scenario Outline: Resharing not allowed
Given the following items have been created in Alice account
| <type> | <item> |
When Alice selects to share the <type> <item> using the Actions menu
And Alice selects the following user as sharee without sharing permission
| sharee | <sharee> |
And <sharee> has reshared <type> <item> with user <sharee2> with Viewer permissions
Then user <sharee> should have access to <item>
But user <sharee2> should not have access to <item>
Examples:
| type | item | sharee | sharee2 |
| file | Share9.txt | Bob | Charles |
@deleteshare
Rule: Delete an existing share
Scenario Outline: Delete existing share on folder
Given the following items have been created in Alice account
| <type> | <item> |
And Alice has shared <type> <item> with <shareetype> <sharee> with <permission> permissions
When Alice selects to share the <type> <item> using the Actions menu
And Alice deletes the share with
| <sharee> (<email>) |
Then user <sharee> should not have access to <item>
And <item> should not be shared anymore with
| <sharee> (<email>) |
Examples:
| type | item | shareetype | sharee | email | permission |
| folder | Share10 | user | Bob | bob@own.com | Viewer |
@sharesortcut @smoke
Scenario Outline: Check shared file in list
Given the following items have been created in Bob account
| <type> | <item> |
And Bob has shared <type> <item> with user Alice with Viewer permissions
When Alice opens the sidebar
And Alice opens the option shared with me in sidebar
Then Alice should see <item> in shared with me
Examples:
| type | item |
| file | Share11.txt |