Skip to content

Commit

Permalink
set empty value in setValueBySingleKeys when requested
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Oct 3, 2019
1 parent 5370d58 commit fd5dc8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/acceptance/customCommands/setValueBySingleKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
exports.command = function setValueBySingleKeys (selector, inputValue) {
const chars = inputValue.split('')
if (chars.length === 0) {
return this.setValue(selector, '')
}
return Promise.all(chars.map((char) => {
return this.setValue(selector, char)
})
Expand Down

0 comments on commit fd5dc8d

Please sign in to comment.