Commit f3767c92 authored by aniket-engg's avatar aniket-engg Committed by Aniket

updated runs from URL

test for runs set default value in input
parent 006464f3
...@@ -23,6 +23,7 @@ module.exports = { ...@@ -23,6 +23,7 @@ module.exports = {
.assert.containsText('#versionSelector option[selected="selected"]', '0.7.4+commit.3f05b770') .assert.containsText('#versionSelector option[selected="selected"]', '0.7.4+commit.3f05b770')
.assert.containsText('#evmVersionSelector option[selected="selected"]', 'istanbul') .assert.containsText('#evmVersionSelector option[selected="selected"]', 'istanbul')
.verify.elementPresent('#optimize:checked') .verify.elementPresent('#optimize:checked')
.verify.attributeEquals('#runs', 'value', '300')
}, },
'Should load using compiler from link passed in remix URL': function (browser: NightwatchBrowser) { 'Should load using compiler from link passed in remix URL': function (browser: NightwatchBrowser) {
...@@ -34,9 +35,10 @@ module.exports = { ...@@ -34,9 +35,10 @@ module.exports = {
.pause(5000) .pause(5000)
.assert.containsText('#versionSelector option[selected="selected"]', 'custom') .assert.containsText('#versionSelector option[selected="selected"]', 'custom')
// default values // default values
.assert.containsText('#evmVersionSelector option[selected="selected"]', 'default')
.verify.elementPresent('#optimize') .verify.elementPresent('#optimize')
.assert.elementNotPresent('#optimize:checked') .assert.elementNotPresent('#optimize:checked')
.assert.containsText('#evmVersionSelector option[selected="selected"]', 'default') .verify.elementPresent('#runs:disabled')
.end() .end()
}, },
......
...@@ -197,12 +197,14 @@ class CompilerContainer { ...@@ -197,12 +197,14 @@ class CompilerContainer {
class="custom-select ml-2 ${css.runs}" class="custom-select ml-2 ${css.runs}"
id="runs" id="runs"
placeholder="200" placeholder="200"
value="200"
type="number" type="number"
title="Estimated number of times each opcode of the deployed code will be executed across the life-time of the contract." title="Estimated number of times each opcode of the deployed code will be executed across the life-time of the contract."
onchange=${() => this.onchangeRuns()} onchange=${() => this.onchangeRuns()}
>` >`
if (this.compileTabLogic.optimize) this._view.runs.removeAttribute('disabled') if (this.compileTabLogic.optimize) {
else { this._view.runs.value = this.compileTabLogic.runs
} else {
this._view.runs.setAttribute('disabled', '') this._view.runs.setAttribute('disabled', '')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment