-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added feature for moving file and folder (#10392)
added step implementation for moving file and folder addded tag for the feature made similar step definition of moving files and folders into single step definition renamed test folder refined the sequence of steps optimized steps fixed indentation changed function name
- Loading branch information
1 parent
1bcf86f
commit b0fd601
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Feature: move file and folder | ||
|
||
As a user | ||
I want to be able to move a folder and a file | ||
So that I can organize my files and folders | ||
|
||
|
||
Background: | ||
Given user "Alice" has been created on the server with default attributes and without skeleton files | ||
And user "Alice" has created folder "folder1" on the server | ||
And user "Alice" has created folder "folder1/folder2" on the server | ||
And user "Alice" has created folder "folder1/folder2/folder3" on the server | ||
And user "Alice" has created folder "folder1/folder2/folder3/folder4" on the server | ||
And user "Alice" has created folder "folder1/folder2/folder3/folder4/folder5" on the server | ||
|
||
|
||
Scenario: Move folder and file from level 5 sub-folder to sync root | ||
Given user "Alice" has created folder "folder1/folder2/folder3/folder4/folder5/test-folder" on the server | ||
And user "Alice" has uploaded file with content "ownCloud" to "folder1/folder2/folder3/folder4/folder5/lorem.txt" on the server | ||
And user "Alice" has set up a client with default settings | ||
When user "Alice" moves file "folder1/folder2/folder3/folder4/folder5/lorem.txt" to "/" in the sync folder | ||
And user "Alice" moves folder "folder1/folder2/folder3/folder4/folder5/test-folder" to "/" in the sync folder | ||
And the user waits for the files to sync | ||
Then as "Alice" the file "lorem.txt" on the server should have the content "ownCloud" | ||
And as "Alice" folder "test-folder" should exist on the server | ||
And as "Alice" file "folder1/folder2/folder3/folder4/folder5/lorem.txt" should not exist on the server | ||
And as "Alice" folder "folder1/folder2/folder3/folder4/folder5/test-folder" should not exist on the server | ||
|
||
|
||
Scenario: Move two folders and a file down to the level 5 sub-folder | ||
And user "Alice" has created folder "test-folder1" on the server | ||
And user "Alice" has created folder "test-folder2" on the server | ||
And user "Alice" has uploaded file with content "ownCloud test" to "testFile.txt" on the server | ||
And user "Alice" has set up a client with default settings | ||
When user "Alice" moves folder "test-folder1" to "folder1/folder2/folder3/folder4/folder5" in the sync folder | ||
And user "Alice" moves folder "test-folder2" to "folder1/folder2/folder3/folder4/folder5" in the sync folder | ||
And user "Alice" moves file "testFile.txt" to "folder1/folder2/folder3/folder4/folder5" in the sync folder | ||
And the user waits for the files to sync | ||
Then as "Alice" file "folder1/folder2/folder3/folder4/folder5/testFile.txt" should exist on the server | ||
And as "Alice" folder "folder1/folder2/folder3/folder4/folder5/test-folder1" should exist on the server | ||
And as "Alice" folder "folder1/folder2/folder3/folder4/folder5/test-folder2" should exist on the server | ||
And as "Alice" file "testFile.txt" should not exist on the server | ||
And as "Alice" folder "test-folder1" should not exist on the server | ||
And as "Alice" folder "test-folder2" should not exist on the server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
source(findFile('scripts', 'python/bdd.py')) | ||
|
||
setupHooks('../shared/scripts/bdd_hooks.py') | ||
collectStepDefinitions('./steps', '../shared/steps') | ||
|
||
|
||
def main(): | ||
testSettings.throwOnFailure = True | ||
runFeatureFile('test.feature') |