fixing test

pull/641/head
LianaHus 4 years ago
parent 322a4e795c
commit 79cfc923e2
  1. 5
      apps/remix-ide-e2e/src/tests/signingMessage.test.ts
  2. 13
      apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
  3. 1
      apps/remix-ide/src/app/ui/modal-dialog-custom.js

@ -27,7 +27,10 @@ module.exports = {
}) })
.addFile('signMassage.sol', sources[0]['browser/signMassage.sol']) .addFile('signMassage.sol', sources[0]['browser/signMassage.sol'])
.openFile('browser/signMassage.sol') .openFile('browser/signMassage.sol')
.pause(10000) .clickLaunchIcon('solidity')
.click('*[data-id="compilerContainerCompileBtn"]')
.clickLaunchIcon('udapp')
.pause(5000)
.selectContract('ECVerify') .selectContract('ECVerify')
.createContract('') .createContract('')
.clickInstance(0) .clickInstance(0)

@ -26,13 +26,12 @@ class ContractDropdownUI {
listenToEvents () { listenToEvents () {
this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => { this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => {
if (!document.querySelector(`.${css.contractNames.classNames[0]}`)) return if (!this.selectContractNames) return
var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) this.selectContractNames.innerHTML = ''
contractNames.innerHTML = ''
if (success) { if (success) {
this.enableContractNames(true) this.enableContractNames(true)
this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => { this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => {
contractNames.appendChild(yo`<option value="${contract.name}" compiler="${compilerFullName}">${contract.name} - ${contract.file}</option>`) this.selectContractNames.appendChild(yo`<option value="${contract.name}" compiler="${compilerFullName}">${contract.name} - ${contract.file}</option>`)
}) })
} else { } else {
this.enableContractNames(false, 'sol') this.enableContractNames(false, 'sol')
@ -187,14 +186,14 @@ class ContractDropdownUI {
} }
changeCurrentFile (currentFile) { changeCurrentFile (currentFile) {
if (!document.querySelector(`.${css.contractNames}`)) return if (!this.selectContractNames) return
if (/.(.abi)$/.exec(currentFile)) { if (/.(.abi)$/.exec(currentFile)) {
this.createPanel.style.display = 'none' this.createPanel.style.display = 'none'
this.orLabel.style.display = 'none' this.orLabel.style.display = 'none'
this.compFails.style.display = 'none' this.compFails.style.display = 'none'
this.loadType = 'abi' this.loadType = 'abi'
this.contractNamesContainer.style.display = 'block' this.contractNamesContainer.style.display = 'block'
while (this.selectContractNames.options.length > 0) this.selectContractNames.remove(0) this.selectContractNames.innerHTML = ''
this.selectContractNames.appendChild(yo`<option>${currentFile}</option>`) this.selectContractNames.appendChild(yo`<option>${currentFile}</option>`)
this.enableContractNames(true) this.enableContractNames(true)
this.enableAtAddress(true) this.enableAtAddress(true)
@ -203,7 +202,7 @@ class ContractDropdownUI {
this.orLabel.style.display = 'block' this.orLabel.style.display = 'block'
this.contractNamesContainer.style.display = 'block' this.contractNamesContainer.style.display = 'block'
this.loadType = 'sol' this.loadType = 'sol'
while (this.selectContractNames.options.length > 0) this.selectContractNames.remove(0) this.selectContractNames.innerHTML = ''
this.enableContractNames(false) this.enableContractNames(false)
this.enableAtAddress(false) this.enableAtAddress(false)
} else { } else {

@ -76,7 +76,6 @@ module.exports = {
} }
const validateInput = (e) => { const validateInput = (e) => {
console.log('validation from ', e)
if (!document.getElementById('modal-footer-ok')) return if (!document.getElementById('modal-footer-ok')) return
if (e.target.value === '') { if (e.target.value === '') {

Loading…
Cancel
Save