Skip to content

Commit

Permalink
Automated tests for empty folder creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Petry committed Sep 9, 2019
1 parent f936848 commit 7d60057
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/acceptance/features/webUIFiles/createFolders.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Feature: create folders
When the user reloads the current page of the webUI
Then folder "sub-folder" should be listed on the webUI

Scenario: Try to create a folder without name
When the user creates a folder without name using the webUI
Then the error message 'Folder name cannot be empty' should be displayed on the webUI dialog prompt

Scenario: Try to create a folder with existing name
When the user creates a folder with the invalid name "simple-folder" using the webUI
Then the error message 'simple-folder already exists' should be displayed on the webUI dialog prompt
Expand Down
4 changes: 4 additions & 0 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ When('the user creates a folder with the name {string} using the webUI', functio
return client.page.filesPage().createFolder(folderName)
})

When('the user creates a folder without name using the webUI', function (folderName) {
return client.page.filesPage().createFolder('', false)
})

When('the user creates a folder with the invalid name {string} using the webUI', function (folderName) {
return client.page.filesPage().createFolder(folderName, false)
})
Expand Down

0 comments on commit 7d60057

Please sign in to comment.