updated test:

linter fixes
prevent 000
pull/719/head
LianaHus 4 years ago committed by Liana Husikyan
parent 2651eb3da1
commit c62bdc17e3
  1. 4
      apps/remix-ide-e2e/src/tests/runAndDeploy.ts
  2. 7
      apps/remix-ide/src/app/tabs/runTab/settings.js

@ -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')

@ -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()
}

Loading…
Cancel
Save