From 34ba2d09bbdb9f4483d4b15a8d4e2631d43f4b20 Mon Sep 17 00:00:00 2001 From: Walmyr Filho Date: Thu, 7 Nov 2019 21:11:25 +0100 Subject: [PATCH] Remove unnecessary keyword this from functions Also, update the changelog and package patch version. --- CHANGELOG.md | 4 ++++ package-lock.json | 2 +- package.json | 2 +- src/inputFieldInteractions.js | 6 +++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6192c86..87acf73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 4.0.5 + +- Remove unnecessary keyword this from functions + # 4.0.4 - Increase code coverage diff --git a/package-lock.json b/package-lock.json index 8d0697c..b3b2fda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "protractor-helper", - "version": "4.0.4", + "version": "4.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index df230b7..5503a2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "protractor-helper", - "version": "4.0.4", + "version": "4.0.5", "scripts": { "pretest": "webdriver-manager update --gecko false", "test": "jasmine test/spec/*.spec.js && protractor test/e2e/protractor.conf.js", diff --git a/src/inputFieldInteractions.js b/src/inputFieldInteractions.js index 8349eea..28d2604 100644 --- a/src/inputFieldInteractions.js +++ b/src/inputFieldInteractions.js @@ -43,8 +43,8 @@ const clearFieldAndFillItWithText = function( text = utils.requiredParam(clearFieldAndFillItWithText, "text"), timeoutInMilliseconds = utils.timeout.timeoutInMilliseconds ) { - this.clear(htmlElement, timeoutInMilliseconds); - this.fillFieldWithText(htmlElement, text, timeoutInMilliseconds); + clear(htmlElement, timeoutInMilliseconds); + fillFieldWithText(htmlElement, text, timeoutInMilliseconds); }; const fillFieldWithTextAndPressEnter = function( @@ -52,7 +52,7 @@ const fillFieldWithTextAndPressEnter = function( text = utils.requiredParam(fillFieldWithTextAndPressEnter, "text"), timeoutInMilliseconds = utils.timeout.timeoutInMilliseconds ) { - this.fillFieldWithText(htmlElement, text + protractor.Key.ENTER, timeoutInMilliseconds); + fillFieldWithText(htmlElement, text + protractor.Key.ENTER, timeoutInMilliseconds); }; module.exports = {