diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts index 31a4c0942f..5a0d71904d 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts @@ -25,15 +25,13 @@ module.exports = { 'Should load run and deploy tab and check value validation': function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') - .clickLaunchIcon('udapp') - .waitForElementPresent('*[data-id="sidePanelSwapitTitle"]') .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS') .clearValue('#value') .setValue('#value', '0000') .assert.containsText('*[data-id="dandrValue"]', '0') .clearValue('#value') .setValue('#value', '-44') - .assert.containsText('*[data-id="dandrValue"]', '44') + .assert.containsText('*[data-id="dandrValue"]', '0') .clearValue('#value') .setValue('#value', '') .assert.containsText('*[data-id="dandrValue"]', '0') diff --git a/apps/remix-ide/src/app/tabs/runTab/settings.js b/apps/remix-ide/src/app/tabs/runTab/settings.js index 9a54f15eff..3d3c304e34 100644 --- a/apps/remix-ide/src/app/tabs/runTab/settings.js +++ b/apps/remix-ide/src/app/tabs/runTab/settings.js @@ -53,11 +53,8 @@ class SettingsUI { }) } - validateInput (e) { - console.log('start value = ', this.el.querySelector('#value').value) - console.log("e = ", e) - if (!helper.isNumeric(e.key)) { - console.log("e.data = ", e.key) + validateInputKey (e) { + if (!helper.isNumeric(e.key) || (e.key === 0 && !this.el.querySelector('#value').value)) { e.preventDefault() e.stopImmediatePropagation() }