From 79cfc923e23331ca4f2888c846045bc87e760ed7 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 1 Dec 2020 18:42:36 +0100 Subject: [PATCH] fixing test --- apps/remix-ide-e2e/src/tests/signingMessage.test.ts | 5 ++++- .../src/app/tabs/runTab/contractDropdown.js | 13 ++++++------- apps/remix-ide/src/app/ui/modal-dialog-custom.js | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts index e10760a35e..88679b5ce6 100644 --- a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts +++ b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts @@ -27,7 +27,10 @@ module.exports = { }) .addFile('signMassage.sol', sources[0]['browser/signMassage.sol']) .openFile('browser/signMassage.sol') - .pause(10000) + .clickLaunchIcon('solidity') + .click('*[data-id="compilerContainerCompileBtn"]') + .clickLaunchIcon('udapp') + .pause(5000) .selectContract('ECVerify') .createContract('') .clickInstance(0) diff --git a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js index 6afa3aa8b6..e0f6582f22 100644 --- a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js +++ b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js @@ -26,13 +26,12 @@ class ContractDropdownUI { listenToEvents () { this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => { - if (!document.querySelector(`.${css.contractNames.classNames[0]}`)) return - var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) - contractNames.innerHTML = '' + if (!this.selectContractNames) return + this.selectContractNames.innerHTML = '' if (success) { this.enableContractNames(true) this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => { - contractNames.appendChild(yo``) + this.selectContractNames.appendChild(yo``) }) } else { this.enableContractNames(false, 'sol') @@ -187,14 +186,14 @@ class ContractDropdownUI { } changeCurrentFile (currentFile) { - if (!document.querySelector(`.${css.contractNames}`)) return + if (!this.selectContractNames) return if (/.(.abi)$/.exec(currentFile)) { this.createPanel.style.display = 'none' this.orLabel.style.display = 'none' this.compFails.style.display = 'none' this.loadType = 'abi' this.contractNamesContainer.style.display = 'block' - while (this.selectContractNames.options.length > 0) this.selectContractNames.remove(0) + this.selectContractNames.innerHTML = '' this.selectContractNames.appendChild(yo``) this.enableContractNames(true) this.enableAtAddress(true) @@ -203,7 +202,7 @@ class ContractDropdownUI { this.orLabel.style.display = 'block' this.contractNamesContainer.style.display = 'block' this.loadType = 'sol' - while (this.selectContractNames.options.length > 0) this.selectContractNames.remove(0) + this.selectContractNames.innerHTML = '' this.enableContractNames(false) this.enableAtAddress(false) } else { diff --git a/apps/remix-ide/src/app/ui/modal-dialog-custom.js b/apps/remix-ide/src/app/ui/modal-dialog-custom.js index 1068ead408..bcbd4aaec5 100644 --- a/apps/remix-ide/src/app/ui/modal-dialog-custom.js +++ b/apps/remix-ide/src/app/ui/modal-dialog-custom.js @@ -76,7 +76,6 @@ module.exports = { } const validateInput = (e) => { - console.log('validation from ', e) if (!document.getElementById('modal-footer-ok')) return if (e.target.value === '') {