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

[stable10] webui rename folder without skeleton #35496

Merged
merged 1 commit into from
Jun 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 41 additions & 22 deletions tests/acceptance/features/webUIRenameFolders/renameFolders.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,37 @@ Feature: rename folders
So that I can organise my data structure

Background:
Given user "user1" has been created with default attributes and skeleton files
And user "user1" has logged in using the webUI
And the user has browsed to the files page
Given user "user1" has been created with default attributes and without skeleton files

Scenario Outline: Rename a folder using special characters
When the user renames folder "simple-folder" to <to_folder_name> using the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to <to_folder_name> using the webUI
Then folder <to_folder_name> should be listed on the webUI
When the user reloads the current page of the webUI
Then folder <to_folder_name> should be listed on the webUI
Examples:
| to_folder_name |
| 'सिमप्ले फोल्देर$%#?&@' |
| 'सिमप्ले फोल्देर$%#?&@' |
| '"quotes1"' |
| "'quotes2'" |

Scenario Outline: Rename a folder that has special characters in its name
Given user "user1" has created folder <from_name>
And user "user1" has logged in using the webUI
When the user renames folder <from_name> to <to_name> using the webUI
Then folder <to_name> should be listed on the webUI
When the user reloads the current page of the webUI
Then folder <to_name> should be listed on the webUI
Examples:
| from_name | to_name |
| "strängé नेपाली folder" | "strängé नेपाली folder-#?2" |
| "strängé नेपाली folder" | "strängé नेपाली folder-#?2" |
| "'single'quotes" | "single-quotes" |

Scenario: Rename a folder using special characters and check its existence after page reload
When the user renames folder "simple-folder" to "लोरेम।तयक्स्त $%&" using the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to "लोरेम।तयक्स्त $%&" using the webUI
And the user reloads the current page of the webUI
Then folder "लोरेम।तयक्स्त $%&" should be listed on the webUI
When the user renames folder "लोरेम।तयक्स्त $%&" to '"double"quotes' using the webUI
Expand All @@ -45,7 +49,9 @@ Feature: rename folders
Then folder "hash#And&QuestionMark?At@FolderName" should be listed on the webUI

Scenario: Rename a folder using spaces at front and/or back of the name
When the user renames folder "simple-folder" to " space at start" using the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to " space at start" using the webUI
And the user reloads the current page of the webUI
Then folder " space at start" should be listed on the webUI
When the user renames folder " space at start" to "space at end " using the webUI
Expand All @@ -56,9 +62,11 @@ Feature: rename folders
Then folder " multiple spaces all over " should be listed on the webUI

Scenario: Rename a folder using both double and single quotes
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames the following folder using the webUI
| from-name-parts | to-name-parts |
| simple-folder | First 'single' quotes |
| a-folder | First 'single' quotes |
| | -then "double" |
And the user reloads the current page of the webUI
Then the following folder should be listed on the webUI
Expand All @@ -73,28 +81,39 @@ Feature: rename folders
Then folder "a normal folder" should be listed on the webUI

Scenario: Rename a folder using forbidden characters
When the user renames folder "simple-folder" to one of these names using the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to one of these names using the webUI
| simple\folder |
| \\simple-folder |
| .htaccess |
Then notifications should be displayed on the webUI with the text
| Could not rename "simple-folder" |
| Could not rename "simple-folder" |
| Could not rename "simple-folder" |
And folder "simple-folder" should be listed on the webUI
| Could not rename "a-folder" |
| Could not rename "a-folder" |
| Could not rename "a-folder" |
And folder "a-folder" should be listed on the webUI

Scenario: Rename a folder putting a name of a file which already exists
When the user renames folder "simple-folder" to "lorem.txt" using the webUI
Then near folder "simple-folder" a tooltip with the text 'lorem.txt already exists' should be displayed on the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has uploaded file with content "some content" to "/randomfile.txt"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to "randomfile.txt" using the webUI
Then near folder "a-folder" a tooltip with the text 'randomfile.txt already exists' should be displayed on the webUI

Scenario: Rename a folder to ..
When the user renames folder "simple-folder" to ".." using the webUI
Then near folder "simple-folder" a tooltip with the text '".." is an invalid file name.' should be displayed on the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to ".." using the webUI
Then near folder "a-folder" a tooltip with the text '".." is an invalid file name.' should be displayed on the webUI

Scenario: Rename a folder to .
When the user renames folder "simple-folder" to "." using the webUI
Then near folder "simple-folder" a tooltip with the text '"." is an invalid file name.' should be displayed on the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to "." using the webUI
Then near folder "a-folder" a tooltip with the text '"." is an invalid file name.' should be displayed on the webUI

Scenario: Rename a folder to .part
When the user renames folder "simple-folder" to "simple.part" using the webUI
Then near folder "simple-folder" a tooltip with the text '"simple.part" has a forbidden file type/extension.' should be displayed on the webUI
Given user "user1" has created folder "a-folder"
And user "user1" has logged in using the webUI
When the user renames folder "a-folder" to "a.part" using the webUI
Then near folder "a-folder" a tooltip with the text '"a.part" has a forbidden file type/extension.' should be displayed on the webUI