Skip to content

Commit

Permalink
Merge pull request #3064 from Talank/fixSimilarStepsForErrMsgCheck
Browse files Browse the repository at this point in the history
[Tests-only] Addressing issue 3062
  • Loading branch information
individual-it authored Feb 20, 2020
2 parents a106660 + fcd7f71 commit 3c79fcc
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ Feature: deleting files and folders
| lorem.txt |
| simple-folder |
When the user deletes file "lorem.txt" using the webUI
Then the error message 'Error while deleting "lorem.txt"' should be displayed on the webUI
Then the error message with header 'Error while deleting "lorem.txt"' should be displayed on the webUI
When the user clears all error message from the webUI
And the user deletes folder "simple-folder" using the webUI
Then the error message 'Error while deleting "simple-folder"' should be displayed on the webUI
Then the error message with header 'Error while deleting "simple-folder"' should be displayed on the webUI
When the user reloads the current page of the webUI
Then file "lorem.txt" should not be listed on the webUI
And folder "simple-folder" should not be listed on the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ Feature: Mark file as favorite
| simple-folder |
When the user marks file "lorem.txt" as favorite using the webUI
Then no message should be displayed on the webUI
# Then the error message 'Error while marking "lorem.txt" as favorite' should be displayed on the webUI
# Then the error message with header 'Error while marking "lorem.txt" as favorite' should be displayed on the webUI
And file "lorem.txt" should not be marked as favorite on the webUI
# When the user clears all error message from the webUI
When the user marks folder "simple-folder" as favorite using the webUI
Then no message should be displayed on the webUI
# Then the error message 'Error while marking "simple-folder" as favorite' should be displayed on the webUI
# Then the error message with header 'Error while marking "simple-folder" as favorite' should be displayed on the webUI
And folder "simple-folder" should not be marked as favorite on the webUI
And as "user1" file "lorem.txt" should not exist
And as "user1" folder "simple-folder" should not exist
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ Feature: Unmark file/folder as favorite
| simple-folder |
When the user unmarks the favorited file "lorem.txt" using the webUI
Then no message should be displayed on the webUI
# Then the error message 'Error while marking "lorem.txt" as favorite' should be displayed on the webUI
# Then the error message with header 'Error while marking "lorem.txt" as favorite' should be displayed on the webUI
And file "lorem.txt" should not be marked as favorite on the webUI
# When the user clears all error message from the webUI
When the user unmarks the favorited folder "simple-folder" using the webUI
Then no message should be displayed on the webUI
# Then the error message 'Error while marking "simple-folder" as favorite' should be displayed on the webUI
# Then the error message with header 'Error while marking "simple-folder" as favorite' should be displayed on the webUI
And folder "simple-folder" should not be marked as favorite on the webUI
And as "user1" file "lorem.txt" should not exist
And as "user1" folder "simple-folder" should not exist
4 changes: 2 additions & 2 deletions tests/acceptance/features/webUIFiles/breadcrumb.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: access breadcrumb
And user "user1" has logged in using the webUI
When the user opens folder "folder%2Fwith%2FSlashes" using the webUI
And the user browses to folder "folder%2Fwith%2FSlashes" using the breadcrumb on the webUI
Then the error message "Loading folder failed…" should be displayed on the webUI
Then the error message with header "Loading folder failed…" should be displayed on the webUI
# Then no message should be displayed on the webUI

@issue-1883
Expand All @@ -36,5 +36,5 @@ Feature: access breadcrumb
And user "user1" has logged in using the webUI
When the user opens folder "folder%2Fwith%2FSlashes" using the webUI
And the user reloads the current page of the webUI
Then the error message "Loading folder failed…" should be displayed on the webUI
Then the error message with header "Loading folder failed…" should be displayed on the webUI
# Then no message should be displayed on the webUI
2 changes: 1 addition & 1 deletion tests/acceptance/features/webUIFiles/download.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: download files
| name |
| lorem.txt |
When the user downloads file "lorem.txt" using the webUI
Then the error message 'Download failed' should be displayed on the webUI
Then the error message with header 'Download failed' should be displayed on the webUI
When the user reloads the current page of the webUI
Then file "lorem.txt" should not be listed on the webUI
And as "user1" file "lorem.txt" should not exist
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Feature: rename files

Scenario Outline: Rename a file using forbidden characters
When the user renames file "data.zip" to "<filename>" using the webUI
Then the error message 'Error while renaming "data.zip" to "<filename>"' should be displayed on the webUI
Then the error message with header 'Error while renaming "data.zip" to "<filename>"' should be displayed on the webUI
And file "data.zip" should be listed on the webUI
And file "<filename>" should not be listed on the webUI
Examples:
Expand Down Expand Up @@ -143,7 +143,7 @@ Feature: rename files

Scenario: Rename a file to .part
When the user renames file "data.zip" to "data.part" using the webUI
Then the error message 'Error while renaming "data.zip" to "data.part"' should be displayed on the webUI
Then the error message with header 'Error while renaming "data.zip" to "data.part"' should be displayed on the webUI

Scenario: rename a file on a public share
Given user "user1" has shared folder "simple-folder" with link with "read, update, create, delete" permissions
Expand Down Expand Up @@ -210,7 +210,7 @@ Feature: rename files
| name |
| lorem.txt |
When the user renames file "lorem.txt" to "new-lorem.txt" using the webUI
Then the error message 'Error while renaming "lorem.txt" to "new-lorem.txt"' should be displayed on the webUI
Then the error message with header 'Error while renaming "lorem.txt" to "new-lorem.txt"' should be displayed on the webUI
When the user reloads the current page of the webUI
Then file "lorem.txt" should not be listed on the webUI
And file "new-lorem.txt" should not be listed on the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Feature: rename folders

Scenario Outline: Rename a folder using forbidden characters
When the user renames folder <from_name> to <to_name> using the webUI
Then the error message '<alert_message>' should be displayed on the webUI
Then the error message with header '<alert_message>' should be displayed on the webUI
And folder "simple-folder" should be listed on the webUI
Examples:
| from_name | to_name | alert_message |
Expand All @@ -109,15 +109,15 @@ Feature: rename folders

Scenario: Rename a folder to .part
When the user renames folder "simple-folder" to "simple.part" using the webUI
Then the error message 'Error while renaming "simple-folder" to "simple.part"' should be displayed on the webUI
Then the error message with header 'Error while renaming "simple-folder" to "simple.part"' should be displayed on the webUI

Scenario: User tries to rename a folder that used to exist but does not anymore
Given the user has browsed to the files page
And the following files have been deleted by user "user1"
| name |
| simple-folder |
When the user renames file "simple-folder" to "new-simple-folder" using the webUI
Then the error message 'Error while renaming "simple-folder" to "new-simple-folder"' should be displayed on the webUI
Then the error message with header 'Error while renaming "simple-folder" to "new-simple-folder"' should be displayed on the webUI
When the user reloads the current page of the webUI
Then folder "simple-folder" should not be listed on the webUI
And folder "new-simple-folder" should not be listed on the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Feature: Resharing shared files with different permissions
Given user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete" permissions
And user "user1" has logged in using the webUI
When the user shares folder "simple-folder (2)" with user "User Three" as "Advanced permissions" with permissions "share, delete, update" using the webUI
Then the error message "Error while sharing." should be displayed on the webUI
Then the error message with header "Error while sharing." should be displayed on the webUI
And as "user3" folder "simple-folder (2)" should not exist

Scenario: Reshare a file and folder from shared with me page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: restrict resharing
When the user browses to the shared-with-me page
# Then the user should not be able to share folder "simple-folder (2)" using the webUI
And the user shares folder "simple-folder (2)" with user "User Three" as "Editor" using the webUI
Then the error message "Error while sharing." should be displayed on the webUI
Then the error message with header "Error while sharing." should be displayed on the webUI
And as "user3" folder "simple-folder (2)" should not exist
When the user browses to the favorites page
Then the user should not be able to share folder "simple-folder (2)" using the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ Feature: Sharing files and folders with internal users
| lorem.txt |
| simple-folder |
When the user shares file "lorem.txt" with user "User Two" as "Editor" using the webUI
Then the error message 'Error while sharing.' should be displayed on the webUI
Then the error message with header 'Error while sharing.' should be displayed on the webUI
And user "UserTwo" should not be listed in the collaborators list on the webUI
When the user clears all error message from the webUI
And the user shares folder "simple-folder" with user "User Two" as "Editor" using the webUI
Then the error message 'Error while sharing.' should be displayed on the webUI
Then the error message with header 'Error while sharing.' should be displayed on the webUI
And user "UserTwo" should not be listed in the collaborators list on the webUI
When the user reloads the current page of the webUI
Then file "lorem.txt" should not be listed on the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Feature: Sharing files and folders with internal users with different permission
And user "user1" has logged in using the webUI
When the user browses to the folder "simple-folder (2)" on the files page
And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update" using the webUI
Then the error message "Error while sharing." should be displayed on the webUI
Then the error message with header "Error while sharing." should be displayed on the webUI
And as "user3" folder "simple-empty-folder (2)" should not exist

Scenario: User is not allowed to update permissions of a reshared sub-folder to higher permissions than what user has received
Expand All @@ -175,7 +175,7 @@ Feature: Sharing files and folders with internal users with different permission
And user "user1" has logged in using the webUI
When the user browses to the folder "simple-folder (2)" on the files page
And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update, create" using the webUI
Then the error message "Error while sharing." should be displayed on the webUI
Then the error message with header "Error while sharing." should be displayed on the webUI
And as "user3" folder "simple-empty-folder (2)" should not exist

Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ Feature: files and folders can be deleted from the trashbin

Scenario: Clear trashbin
When the user clears the trashbin
Then the success message "Trash bin was successfully emptied" should be displayed on the webUI
Then the success message with header "Trash bin was successfully emptied" should be displayed on the webUI
And the trashbin should be empty on the webUI
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Feature: Restore deleted files/folders
When the user browses to the trashbin page
#And the user restores file "simple-folder/file-to-delete-and-restore" from the trashbin using the webUI
And the user restores file "simple-folder/file-to-delete-and-restore" from the trashbin using the webUI
Then the error message "Restoration of file-to-delete-and-restore failed" should be displayed on the webUI
Then the error message with header "Restoration of file-to-delete-and-restore failed" should be displayed on the webUI
#And a success message "file-to-delete-and-restore was restored successfully" should be displayed on the webUI
#And as "user1" the file with original path "simple-folder/file-to-delete-and-restore" should not exist in trash
And as "user1" the file with original path "simple-folder/file-to-delete-and-restore" should exist in trash
Expand All @@ -127,7 +127,7 @@ Feature: Restore deleted files/folders
| lorem.txt |
When the user browses to the trashbin page
And the user restores file "lorem.txt" from the trashbin using the webUI
Then the success message "lorem.txt was restored successfully" should be displayed on the webUI
Then the success message with header "lorem.txt was restored successfully" should be displayed on the webUI
And file "lorem.txt" should not be listed on the webUI
And folder "lorem.txt" should be listed on the webUI
When the user browses to the files page using the webUI
Expand All @@ -145,7 +145,7 @@ Feature: Restore deleted files/folders
| lorem.txt |
When the user browses to the trashbin page
And the user restores folder "lorem.txt" from the trashbin using the webUI
Then the success message "lorem.txt was restored successfully" should be displayed on the webUI
Then the success message with header "lorem.txt was restored successfully" should be displayed on the webUI
And folder "lorem.txt" should not be listed on the webUI
And file "lorem.txt" should be listed on the webUI
When the user browses to the files page using the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Feature: Upload a file
And a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally
When the user uploads a created file "big-video.mp4" using the webUI
Then file "big-video.mp4" should not be listed on the webUI
Then the error message 'File upload failed…' should be displayed on the webUI
Then the error message with header 'File upload failed…' should be displayed on the webUI
#And a error message should be displayed on the webUI with the text matching
# | /^Not enough free space, you are uploading (\d+(.\d+)?) MB but only (\d+(.\d+)?) MB is left$/ |
2 changes: 1 addition & 1 deletion tests/acceptance/stepDefinitions/generalContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Given('the property {string} has been deleted in phoenix config file', function
return fs.writeFileSync(this.fullPathOfConfigFile, JSON.stringify(data, null, 4))
})

Then('the success/error message {string} should be displayed on the webUI', function (message) {
Then('the success/error message with header {string} should be displayed on the webUI', function (message) {
return client
.page.phoenixPage()
.waitForElementVisible('@message')
Expand Down

0 comments on commit 3c79fcc

Please sign in to comment.