Skip to content

Commit

Permalink
check if a resource really exists
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Oct 15, 2019
1 parent e90e9c9 commit 25e2490
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Feature: Sharing files and folders with internal groups
| simple-folder (2) |
| testimage (2).jpg |
And these resources should be listed in the folder "simple-folder (2)" on the webUI
| lorem.txt |
| entry_name |
| lorem.txt |
But these resources should not be listed in the folder "simple-folder (2)" on the webUI
| entry_name |
| simple-folder (2) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Feature: Sharing files and folders with internal users
| simple-folder (2) |
| testimage (2).jpg |
And these resources should be listed in the folder "simple-folder (2)" on the webUI
| lorem.txt |
| entry_name |
| lorem.txt |
But these resources should not be listed in the folder "simple-folder (2)" on the webUI
| entry_name |
| simple-folder (2) |
Expand Down
3 changes: 3 additions & 0 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ Then('as {string} these folders/files/resources should not be listed in the fold
* @param {DataTable} entryList the list needs a heading line
*/
const theseResourcesShouldBeListed = function (entryList) {
if (entryList.rows().length <= 0) {
throw Error('Gerkin entry list is empty. Missing heading?')
}
entryList.rows().forEach(entry => {
// here each entry is an array with one element,
// which is the name of the entry from the table
Expand Down

0 comments on commit 25e2490

Please sign in to comment.