diff --git a/tests/acceptance/features/webUIRenameFiles/renameFiles.feature b/tests/acceptance/features/webUIRenameFiles/renameFiles.feature index 293497ee90c8..a494e5fee54d 100644 --- a/tests/acceptance/features/webUIRenameFiles/renameFiles.feature +++ b/tests/acceptance/features/webUIRenameFiles/renameFiles.feature @@ -5,23 +5,25 @@ Feature: rename files 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 @smokeTest Scenario Outline: Rename a file using special characters - When the user renames file "lorem.txt" to using the webUI + Given 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 file "randomfile.txt" to using the webUI Then file should be listed on the webUI When the user reloads the current page of the webUI Then file should be listed on the webUI Examples: | to_file_name | - | 'लोरेम।तयक्स्त? $%#&@' | + | 'लोरेम।तयक्स्त? $%#&@' | | '"quotes1"' | | "'quotes2'" | Scenario Outline: Rename a file that has special characters in its name + Given user "user1" has uploaded file with content "some content" to + And user "user1" has logged in using the webUI When the user renames file to using the webUI Then file should be listed on the webUI When the user reloads the current page of the webUI @@ -33,7 +35,10 @@ Feature: rename files @smokeTest Scenario: Rename a file using special characters and check its existence after page reload - When the user renames file "lorem.txt" to "लोरेम।तयक्स्त $%&" using the webUI + Given user "user1" has uploaded file with content "some content" to "/randomfile.txt" + And user "user1" has uploaded file with content "more content" to "/zzzz-must-be-last-file-in-folder.txt" + And user "user1" has logged in using the webUI + When the user renames file "randomfile.txt" to "लोरेम।तयक्स्त $%&" using the webUI And the user reloads the current page of the webUI Then file "लोरेम।तयक्स्त $%&" should be listed on the webUI When the user renames file "लोरेम।तयक्स्त $%&" to '"double"quotes.txt' using the webUI @@ -50,7 +55,9 @@ Feature: rename files Then file "aaaaaa.txt" should be listed on the webUI Scenario: Rename a file using spaces at front and/or back of file name and type - When the user renames file "lorem.txt" to " space at start" using the webUI + Given 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 file "randomfile.txt" to " space at start" using the webUI And the user reloads the current page of the webUI Then file " space at start" should be listed on the webUI When the user renames file " space at start" to "space at end " using the webUI @@ -70,9 +77,11 @@ Feature: rename files Then file " multiple space all over . dat " should be listed on the webUI Scenario: Rename a file using both double and single quotes + Given 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 the following file using the webUI | from-name-parts | to-name-parts | - | lorem.txt | First 'single' quotes | + | randomfile.txt | First 'single' quotes | | | -then "double".txt | And the user reloads the current page of the webUI Then the following file should be listed on the webUI @@ -87,51 +96,71 @@ Feature: rename files Then file "loremz.dat" should be listed on the webUI Scenario: Rename a file using forbidden characters - When the user renames file "data.zip" to one of these names using the webUI + Given 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 file "randomfile.txt" to one of these names using the webUI | lorem\txt | | \\.txt | | .htaccess | Then notifications should be displayed on the webUI with the text - | Could not rename "data.zip" | - | Could not rename "data.zip" | - | Could not rename "data.zip" | - And file "data.zip" should be listed on the webUI + | Could not rename "randomfile.txt" | + | Could not rename "randomfile.txt" | + | Could not rename "randomfile.txt" | + And file "randomfile.txt" should be listed on the webUI Scenario: Rename the last file in a folder + Given user "user1" has uploaded file with content "some content" to "/firstfile.txt" + And user "user1" has uploaded file with content "more content" to "/zzzz-must-be-last-file-in-folder.txt" + And user "user1" has logged in using the webUI When the user renames file "zzzz-must-be-last-file-in-folder.txt" to "a-file.txt" using the webUI And the user reloads the current page of the webUI Then file "a-file.txt" should be listed on the webUI Scenario: Rename a file to become the last file in a folder - When the user renames file "lorem.txt" to "zzzz-z-this-is-now-the-last-file.txt" using the webUI + Given user "user1" has uploaded file with content "some content" to "/firstfile.txt" + And user "user1" has uploaded file with content "more content" to "/lastfile.txt" + And user "user1" has logged in using the webUI + When the user renames file "firstfile.txt" to "zzzz-z-this-is-now-the-last-file.txt" using the webUI And the user reloads the current page of the webUI Then file "zzzz-z-this-is-now-the-last-file.txt" should be listed on the webUI Scenario: Rename a file putting a name of a file which already exists - When the user renames file "data.zip" to "lorem.txt" using the webUI - Then near file "data.zip" a tooltip with the text 'lorem.txt already exists' should be displayed on the webUI + Given user "user1" has uploaded file with content "some content" to "/randomfile.txt" + And user "user1" has uploaded file with content "another content" to "/anotherfile.txt" + And user "user1" has logged in using the webUI + When the user renames file "anotherfile.txt" to "randomfile.txt" using the webUI + Then near file "anotherfile.txt" a tooltip with the text 'randomfile.txt already exists' should be displayed on the webUI Scenario: Rename a file to .. - When the user renames file "data.zip" to ".." using the webUI - Then near file "data.zip" a tooltip with the text '".." is an invalid file name.' should be displayed on the webUI + Given 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 file "randomfile.txt" to ".." using the webUI + Then near file "randomfile.txt" a tooltip with the text '".." is an invalid file name.' should be displayed on the webUI Scenario: Rename a file to . - When the user renames file "data.zip" to "." using the webUI - Then near file "data.zip" a tooltip with the text '"." is an invalid file name.' should be displayed on the webUI + Given 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 file "randomfile.txt" to "." using the webUI + Then near file "randomfile.txt" a tooltip with the text '"." is an invalid file name.' should be displayed on the webUI Scenario: Rename a file to .part - When the user renames file "data.zip" to "data.part" using the webUI - Then near file "data.zip" a tooltip with the text '"data.part" has a forbidden file type/extension.' should be displayed on the webUI + Given 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 file "randomfile.txt" to "randomfile.part" using the webUI + Then near file "randomfile.txt" a tooltip with the text '"randomfile.part" has a forbidden file type/extension.' should be displayed on the webUI Scenario: rename a file on a public share - Given the user has created a new public link for folder "simple-folder" using the webUI with + Given user "user1" has created folder "/FOLDER_TO_SHARE" + And user "user1" has uploaded file with content "some content" to "/FOLDER_TO_SHARE/randomfile.txt" + And user "user1" has logged in using the webUI + And the user has created a new public link for folder "FOLDER_TO_SHARE" using the webUI with | permission | read-write | When the public accesses the last created public link using the webUI - And the user renames file "lorem.txt" to "a-renamed-file.txt" using the webUI + And the user renames file "randomfile.txt" to "a-renamed-file.txt" using the webUI Then file "a-renamed-file.txt" should be listed on the webUI - But file "lorem.txt" should not be listed on the webUI + But file "randomfile.txt" should not be listed on the webUI When the user reloads the current page of the webUI Then file "a-renamed-file.txt" should be listed on the webUI - But file "lorem.txt" should not be listed on the webUI - And as "user1" file "simple-folder/a-renamed-file.txt" should exist - And as "user1" file "simple-folder/lorem.txt" should not exist + But file "randomfile.txt" should not be listed on the webUI + And as "user1" file "FOLDER_TO_SHARE/a-renamed-file.txt" should exist + And as "user1" file "FOLDER_TO_SHARE/randomfile.txt" should not exist diff --git a/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature b/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature index a2929b6edd2b..8e6bd39ddd74 100644 --- a/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature +++ b/tests/acceptance/features/webUIRenameFiles/renameFilesInsideProblematicFolderName.feature @@ -5,17 +5,21 @@ Feature: Renaming files inside a folder with problematic name So that I can recognize my file easily Background: - Given user "user1" has been created with default attributes and skeleton files + Given user "user1" has been created with default attributes and without skeleton files And user "user1" has logged in using the webUI Scenario Outline: Rename the existing file inside a problematic folder - When the user opens folder using the webUI - And the user renames file "lorem.txt" to "???.txt" using the webUI + Given user "user1" has uploaded file with content "some content" to "/randomfile.txt" + And user "user1" has created folder "" + And user "user1" has moved file "/randomfile.txt" to "//randomfile.txt" + And the user reloads the current page of the webUI + When the user opens folder "" using the webUI + And the user renames file "randomfile.txt" to "???.txt" using the webUI Then file "???.txt" should be listed on the webUI When the user reloads the current page of the webUI Then file "???.txt" should be listed on the webUI Examples: - | folder | - | "0" | - | "'single'quotes" | - | "strängé नेपाली folder" | \ No newline at end of file + | folder | + | 0 | + | 'single'quotes | + | strängé नेपाली folder | \ No newline at end of file