Skip to content

Commit 3a8fb68

Browse files
committed
fix sharing dialog tests
1 parent f0049fb commit 3a8fb68

File tree

4 files changed

+27
-36
lines changed

4 files changed

+27
-36
lines changed

test/gui/shared/steps/account_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def step(context):
262262
waitForInitialSyncToComplete(getResourcePath('/', account_details["user"]))
263263

264264

265-
@When('the user cancels the sync connection wizard')
265+
@Step('the user cancels the sync connection wizard')
266266
def step(context):
267267
SyncConnectionWizard.cancelFolderSyncConnectionWizard()
268268

test/gui/shared/steps/sharing_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def step(context, permissions, receiver, resource):
285285
SharingDialog.removePermissions(permissions)
286286

287287

288-
@When("the user closes the sharing dialog")
288+
@Step("the user closes the sharing dialog")
289289
def step(context):
290290
SharingDialog.closeSharingDialog()
291291

test/gui/tst_sharing/test.feature

+24-34
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Feature: Sharing
8383
And the user opens the sharing dialog of "SharedFolder" using the client-UI
8484
And the user searches for collaborator "Brian Murphy" using the client-UI
8585
Then the error "No results for 'Brian Murphy'" should be displayed
86-
When the user closes the sharing dialog
86+
And the user closes the sharing dialog
8787

8888

8989
Scenario: try to self share a file/folder
@@ -97,7 +97,7 @@ Feature: Sharing
9797
And the user opens the sharing dialog of "OwnFolder" using the client-UI
9898
And the user selects "Alice Hansen" as collaborator of resource "OwnFolder" using the client-UI
9999
Then the error "Can't share with yourself" should be displayed
100-
When the user closes the sharing dialog
100+
And the user closes the sharing dialog
101101

102102

103103
Scenario: search for users with minimum autocomplete characters
@@ -111,7 +111,7 @@ Feature: Sharing
111111
| user |
112112
| TestUser1 |
113113
| TestUser2 |
114-
When the user closes the sharing dialog
114+
And the user closes the sharing dialog
115115

116116
Scenario: autocomplete offers a list of users followed by a list of groups
117117
And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" in the server
@@ -122,7 +122,7 @@ Feature: Sharing
122122
| user |
123123
| admin |
124124
| admin (group) |
125-
When the user closes the sharing dialog
125+
And the user closes the sharing dialog
126126

127127
Scenario: collaborators are listed in chronological order
128128
Given user "Brian" has been created on the server with default attributes and without skeleton files
@@ -145,7 +145,7 @@ Feature: Sharing
145145
| TestUser1 |
146146
| TestUser3 |
147147
| TestUser2 |
148-
When the user closes the sharing dialog
148+
And the user closes the sharing dialog
149149

150150
@issue-7459
151151
Scenario: Progress indicator should not be visible after unselecting the password protection checkbox while sharing through public link
@@ -155,7 +155,7 @@ Feature: Sharing
155155
And the user toggles the password protection using the client-UI
156156
And the user toggles the password protection using the client-UI
157157
Then the password progress indicator should not be visible in the client-UI - expected to fail
158-
When the user closes the sharing dialog
158+
And the user closes the sharing dialog
159159

160160

161161
Scenario: Collaborator should not see to whom a file/folder is shared.
@@ -170,7 +170,7 @@ Feature: Sharing
170170
When the user closes the sharing dialog
171171
And the user opens the sharing dialog of "Folder" using the client-UI
172172
Then the error text "The item is not shared with any users or groups" should be displayed in the sharing dialog
173-
When the user closes the sharing dialog
173+
And the user closes the sharing dialog
174174

175175

176176
Scenario: share file and folder to a group
@@ -186,7 +186,6 @@ Feature: Sharing
186186
Then group "grp1" should be listed in the collaborators list for file "simple-folder" with permissions "edit,share" on the client-UI
187187
And as "Brian" folder "simple-folder" should exist in the server
188188
And as "Brian" file "textfile0.txt" should exist in the server
189-
When the user closes the sharing dialog
190189

191190

192191
Scenario: User (non-author) can not share to a group to which the file/folder is already shared
@@ -205,7 +204,7 @@ Feature: Sharing
205204
When the user closes the sharing dialog
206205
And the user tires to share resource "Folder" with the group "grp1" using the client-UI
207206
Then the error "Path already shared with this group" should be displayed
208-
When the user closes the sharing dialog
207+
And the user closes the sharing dialog
209208

210209

211210
Scenario: sharee edits content of files shared by sharer
@@ -224,7 +223,6 @@ Feature: Sharing
224223
And as "Brian" the file "textfile.txt" should have the content "overwrite file in the root" in the server
225224
And as "Alice" the file "simple-folder/textfile.txt" should have the content "overwrite file inside a folder" in the server
226225
And as "Alice" the file "textfile.txt" should have the content "overwrite file in the root" in the server
227-
When the user closes the sharing dialog
228226

229227

230228
Scenario: sharee tries to edit content of files shared without write permission
@@ -242,7 +240,6 @@ Feature: Sharing
242240
And as "Brian" the file "textfile.txt" should have the content "file in the root" in the server
243241
And as "Alice" the file "Parent/textfile.txt" should have the content "file inside a folder" in the server
244242
And as "Alice" the file "textfile.txt" should have the content "file in the root" in the server
245-
When the user closes the sharing dialog
246243

247244

248245
Scenario: sharee edits shared files and again try to edit after write permission is revoked
@@ -261,14 +258,14 @@ Feature: Sharing
261258
And the user removes permissions "edit" for user "Brian Murphy" of resource "textfile.txt" using the client-UI
262259
When the user closes the sharing dialog
263260
And the user removes permissions "edit" for user "Brian Murphy" of resource "FOLDER" using the client-UI
261+
And the user closes the sharing dialog
264262
And user "Brian" tries to overwrite the file "textfile.txt" with content "overwrite ownCloud test text file"
265263
And user "Brian" tries to overwrite the file "FOLDER/simple.txt" with content "overwrite some content"
266264
And user "Brian" waits for file "textfile.txt" to have sync error
267265
Then as "Brian" the file "textfile.txt" should have the content "ownCloud test text file" in the server
268266
And as "Brian" the file "FOLDER/simple.txt" should have the content "some content" in the server
269267
And as "Alice" the file "textfile.txt" should have the content "ownCloud test text file" in the server
270268
And as "Alice" the file "FOLDER/simple.txt" should have the content "some content" in the server
271-
When the user closes the sharing dialog
272269

273270

274271
Scenario: sharee creates a file and a folder inside a shared folder
@@ -287,7 +284,6 @@ Feature: Sharing
287284
And as "Brian" folder "Parent/localFolder" should exist in the server
288285
And as "Alice" file "Parent/localFile.txt" should exist in the server
289286
And as "Alice" folder "Parent/localFolder" should exist in the server
290-
When the user closes the sharing dialog
291287

292288

293289
Scenario: sharee tries to create a file and a folder inside a shared folder without write permission
@@ -306,7 +302,6 @@ Feature: Sharing
306302
And as "Brian" folder "Parent/localFolder" should not exist in the server
307303
And as "Alice" file "Parent/localFile.txt" should not exist in the server
308304
And as "Alice" folder "Parent/localFolder" should not exist in the server
309-
When the user closes the sharing dialog
310305

311306

312307
Scenario: sharee renames the shared file and folder
@@ -329,7 +324,6 @@ Feature: Sharing
329324
And as "Alice" file "textfile.txt" should exist in the server
330325
And as "Alice" folder "PARENT" should not exist in the server
331326
And as "Alice" file "lorem.txt" should not exist in the server
332-
When the user closes the sharing dialog
333327

334328
@issue-9439 @issue-11102 @skip
335329
Scenario: sharee deletes a file and folder shared by sharer
@@ -346,7 +340,6 @@ Feature: Sharing
346340
And as "Brian" folder "Folder" on the server should not exist
347341
And as "Alice" file "textfile.txt" on the server should exist
348342
And as "Alice" folder "Folder" on the server should exist
349-
When the user closes the sharing dialog
350343

351344
@issue-11102 @skip
352345
Scenario: sharee tries to delete shared file and folder without permissions
@@ -364,7 +357,6 @@ Feature: Sharing
364357
And as "Brian" folder "Folder" on the server should not exist
365358
And as "Alice" file "textfile.txt" on the server should exist
366359
And as "Alice" folder "Folder" on the server should exist
367-
When the user closes the sharing dialog
368360

369361

370362
Scenario: reshare a file/folder
@@ -381,7 +373,6 @@ Feature: Sharing
381373
And user "Carol King" should be listed in the collaborators list for file "textfile.txt" with permissions "edit,share" on the client-UI
382374
And as "Carol" folder "FOLDER" should exist in the server
383375
And as "Carol" file "textfile.txt" should exist in the server
384-
When the user closes the sharing dialog
385376

386377

387378
Scenario: try to reshare a file/folder shared without share permission
@@ -394,9 +385,10 @@ Feature: Sharing
394385
And user "Brian" has set up a client with default settings
395386
When the user opens the sharing dialog of "FOLDER" using the client-UI
396387
Then the error text "The file can not be shared because it was shared without sharing permission." should be displayed in the sharing dialog
388+
And the user closes the sharing dialog
397389
When the user opens the sharing dialog of "textfile.txt" using the client-UI
398390
Then the error text "The file can not be shared because it was shared without sharing permission." should be displayed in the sharing dialog
399-
When the user closes the sharing dialog
391+
And the user closes the sharing dialog
400392

401393

402394
Scenario: unshare a shared file and folder
@@ -412,8 +404,8 @@ Feature: Sharing
412404
When the user closes the sharing dialog
413405
And the user unshares the resource "simple-folder" for collaborator "Brian Murphy" using the client-UI
414406
Then the text "The item is not shared with any users or groups" should be displayed in the sharing dialog
407+
And the user closes the sharing dialog
415408
And as "Brian" folder "simple-folder" on the server should not exist
416-
When the user closes the sharing dialog
417409

418410

419411
Scenario: share a file with many users
@@ -432,7 +424,6 @@ Feature: Sharing
432424
| Brian Murphy | edit,share |
433425
| Carol King | edit,share |
434426
| David Lopez | edit,share |
435-
When the user closes the sharing dialog
436427

437428
@issue-7423
438429
Scenario: unshare a reshared file
@@ -444,7 +435,7 @@ Feature: Sharing
444435
And user "Brian" has set up a client with default settings
445436
When the user unshares the resource "textfile.txt" for collaborator "Carol King" using the client-UI
446437
Then the text "The item is not shared with any users or groups" should be displayed in the sharing dialog
447-
When the user closes the sharing dialog
438+
And the user closes the sharing dialog
448439

449440
@smokeTest
450441
Scenario: simple sharing of file and folder by public link without password
@@ -459,7 +450,7 @@ Feature: Sharing
459450
When the user creates a new public link with permissions "Download / View" for folder "simple-folder" without password using the client-UI
460451
Then as user "Alice" the folder "simple-folder" should have a public link in the server
461452
And the public should be able to download the folder "simple-folder/child" without password from the last created public link by "Alice" on the server
462-
When the user closes the sharing dialog
453+
And the user closes the sharing dialog
463454

464455

465456
Scenario Outline: simple sharing of file and folder by public link with password
@@ -473,7 +464,7 @@ Feature: Sharing
473464
When the user creates a new public link with permissions "Download / View" for folder "simple-folder" with password "<password>" using the client-UI
474465
Then as user "Alice" the folder "simple-folder" should have a public link in the server
475466
And the public should be able to download the folder "simple-folder" with password "<password>" from the last created public link by "Alice" on the server
476-
When the user closes the sharing dialog
467+
And the user closes the sharing dialog
477468
Examples:
478469
| password |
479470
| password1234 |
@@ -487,8 +478,8 @@ Feature: Sharing
487478
| name | Public-link |
488479
And user "Alice" has set up a client with default settings
489480
When the user deletes the public link for file "textfile0.txt"
481+
And the user closes the sharing dialog
490482
Then as user "Alice" the file "/textfile0.txt" should not have any public link in the server
491-
When the user closes the sharing dialog
492483

493484

494485
Scenario: sharing of a file by public link with password and changing the password
@@ -502,7 +493,7 @@ Feature: Sharing
502493
And the user changes the password of public link "Public-link" to "password1234" using the client-UI
503494
Then as user "Alice" the file "textfile0.txt" should have a public link in the server
504495
And the public should be able to download the file "textfile0.txt" with password "password1234" from the last created public link by "Alice" on the server
505-
When the user closes the sharing dialog
496+
And the user closes the sharing dialog
506497

507498

508499
Scenario: simple sharing of a file by public link with default expiration date
@@ -514,7 +505,6 @@ Feature: Sharing
514505
When the user closes the sharing dialog
515506
Then the expiration date of the last public link of file "textfile.txt" should be "%default%"
516507
And as user "Alice" the file "textfile.txt" should have a public link in the server
517-
When the user closes the sharing dialog
518508

519509
@issue-9321 @skipOnWindows
520510
Scenario: simple sharing of file and folder by public link with expiration date
@@ -531,10 +521,10 @@ Feature: Sharing
531521
And the user creates a new public link with following settings using the client-UI:
532522
| path | FOLDER |
533523
| expireDate | 2031-12-30 |
524+
And the user closes the sharing dialog
534525
Then as user "Alice" the folder "FOLDER" should have a public link in the server
535526
And the last public link share response of user "Alice" should include the following fields on the server
536527
| expireDate | 2031-12-30 |
537-
When the user closes the sharing dialog
538528

539529
@issue-9321 @skipOnWindows
540530
Scenario: simple sharing of a file by public link with password and expiration date
@@ -544,11 +534,11 @@ Feature: Sharing
544534
| path | textfile.txt |
545535
| password | pass123 |
546536
| expireDate | 2031-10-14 |
537+
And the user closes the sharing dialog
547538
Then as user "Alice" the file "textfile.txt" should have a public link in the server
548539
And the last public link share response of user "Alice" should include the following fields on the server
549540
| expireDate | 2031-10-14 |
550541
And the public should be able to download the file "textfile.txt" with password "pass123" from the last created public link by "Alice" in the server
551-
When the user closes the sharing dialog
552542

553543
@skip @issue-9321 @skipOnWindows
554544
Scenario: user changes the expiration date of an already existing public link for file using client-UI
@@ -561,9 +551,9 @@ Feature: Sharing
561551
When the user opens the public links dialog of "textfile0.txt" using the client-UI
562552
And the user edits the public link named "Public link" of file "textfile0.txt" changing following
563553
| expireDate | 2038-07-21 |
554+
And the user closes the sharing dialog
564555
Then the last public link share response of user "Alice" should include the following fields on the server
565556
| expireDate | 2038-07-21 |
566-
When the user closes the sharing dialog
567557

568558
@skip @issue-9321 @skipOnWindows
569559
Scenario: user changes the expiration date of an already existing public link for folder using client-UI
@@ -577,24 +567,24 @@ Feature: Sharing
577567
When the user opens the public links dialog of "simple-folder" using the client-UI
578568
And the user edits the public link named "Public link" of file "simple-folder" changing following
579569
| expireDate | 2038-07-21 |
570+
And the user closes the sharing dialog
580571
Then the last public link share response of user "Alice" should include the following fields on the server
581572
| expireDate | 2038-07-21 |
582-
When the user closes the sharing dialog
583573

584574

585575
Scenario Outline: simple sharing of folder by public link with different roles
586576
Given user "Alice" has created folder "simple-folder" in the server
587577
And user "Alice" has set up a client with default settings
588578
When the user creates a new public link for folder "simple-folder" using the client-UI with these details:
589579
| role | <role> |
580+
And the user closes the sharing dialog
590581
Then user "Alice" on the server should have a share with these details:
591582
| field | value |
592583
| share_type | public_link |
593584
| uid_owner | Alice |
594585
| permissions | <permissions> |
595586
| path | /simple-folder |
596587
| name | Public link |
597-
When the user closes the sharing dialog
598588
Examples:
599589
| role | permissions |
600590
| Viewer | read |
@@ -608,6 +598,7 @@ Feature: Sharing
608598
And user "Alice" has set up a client with default settings
609599
When the user creates a new public link for folder "simple-folder" using the client-UI with these details:
610600
| role | Contributor |
601+
And the user closes the sharing dialog
611602
Then user "Alice" on the server should have a share with these details:
612603
| field | value |
613604
| share_type | public_link |
@@ -616,7 +607,6 @@ Feature: Sharing
616607
| path | /simple-folder |
617608
| name | Public link |
618609
And the public should not be able to download the file "lorem.txt" from the last created public link by "Alice" in the server
619-
When the user closes the sharing dialog
620610

621611

622612
Scenario Outline: change collaborator permissions of a file & folder
@@ -632,6 +622,7 @@ Feature: Sharing
632622
When the user closes the sharing dialog
633623
And the user removes permissions "<permissions>" for user "Brian Murphy" of resource "lorem.txt" using the client-UI
634624
Then "<permissions>" permissions should not be displayed for user "Brian Murphy" for resource "lorem.txt" on the client-UI
625+
And the user closes the sharing dialog
635626
And user "Alice" on the server should have a share with these details:
636627
| field | value |
637628
| uid_owner | Alice |
@@ -648,7 +639,6 @@ Feature: Sharing
648639
| file_target | /Shares/lorem.txt |
649640
| item_type | file |
650641
| permissions | <expected-file-permission> |
651-
When the user closes the sharing dialog
652642
Examples:
653643
| permissions | expected-folder-permission | expected-file-permission |
654644
| edit | read, share | read, share |

test/gui/tst_syncing/test.feature

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Feature: Syncing files
154154
| aFolder |
155155
| 123Folder |
156156
| bFolder |
157+
And the user cancels the sync connection wizard
157158

158159

159160
Scenario Outline: Syncing a folder to the server

0 commit comments

Comments
 (0)