validate input

pull/5370/head
filip mertens 11 months ago
parent d3ed2be4b9
commit bca8a532e4
  1. 2
      .circleci/config.yml
  2. 10
      apps/remix-ide-e2e/src/commands/validateValueInput.ts
  3. 2
      apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts

@ -3,7 +3,7 @@ version: 2.1
parameters:
run_flaky_tests:
type: boolean
default: false
default: true
orbs:
browser-tools: circleci/browser-tools@1.4.4
win: circleci/windows@5.0

@ -7,18 +7,16 @@ class ValidateValueInput extends EventEmitter {
browser.perform((done) => {
browser
.clearValue(selector)
.execute((selector) => {
(document.querySelector(selector) as any).focus()
}, [selector], () => { })
.click(selector)
.setValue(selector, valueTosSet)
.pause(500)
.execute(function (selector) {
const elem = document.querySelector(selector) as HTMLInputElement
return elem.value
}, [selector], function (result) {
browser.assert.equal(result.value, expectedValue)
})
done()
this.emit('complete')
}).perform(() => { done() ;this.emit('complete') })
})
return this
}

@ -22,7 +22,7 @@ module.exports = {
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS')
},
'Should load run and deploy tab and check value validation #group1': function (browser: NightwatchBrowser) {
'Should load run and deploy tab and check value validation #flaky #group1': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]')
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS')
.validateValueInput('*[data-id="dandrValue"]', '999', '999')

Loading…
Cancel
Save