diff --git a/apps/remix-ide-e2e/src/commands/verifyContracts.ts b/apps/remix-ide-e2e/src/commands/verifyContracts.ts index ae4ca93369..027f71dd05 100644 --- a/apps/remix-ide-e2e/src/commands/verifyContracts.ts +++ b/apps/remix-ide-e2e/src/commands/verifyContracts.ts @@ -22,12 +22,12 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str if (opts.version) { browser .click('*[data-id="compilation-details"]') - .waitForElementVisible('*[data-id="treeViewDivcompiler"]') + .waitForElementVisible('*[data-id="treeViewDivtreeViewItemcompiler"]') .pause(2000) - .click('*[data-id="treeViewDivcompiler"]') - .waitForElementVisible('*[data-id="treeViewLicompiler/version"]') - .assert.containsText('*[data-id="treeViewLicompiler/version"]', `version:\n ${opts.version}`) - .modalFooterCancelClick() + .click('*[data-id="treeViewDivtreeViewItemcompiler"]') + .waitForElementVisible('*[data-id="treeViewLiversion"]') + .assert.containsText('*[data-id="treeViewLiversion"]', `${opts.version}`) + .click('[data-id="workspacesModalDialog-modal-footer-ok-react"]') .perform(() => { done() callback() diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 6e6daad29d..6ed2c52ce7 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -70,6 +70,8 @@ class CompileTab extends ViewPlugin { this.isHardHatProject = false this.compileErrors = {} this.compiledFileName = '' + this.selectedVersion = '' + this.configurationSettings = null this.el = document.createElement('div') this.el.setAttribute('id', 'compileTabView') @@ -196,6 +198,10 @@ class CompileTab extends ViewPlugin { this.hhCompilation = value } + setSelectedVersion (version) { + this.selectedVersion = version + } + getCompilationResult () { return this.compileTabLogic.compiler.state.lastCompilationResult } @@ -219,7 +225,7 @@ class CompileTab extends ViewPlugin { * @param {object} settings {evmVersion, optimize, runs, version, language} */ async compileWithParameters (compilationTargets, settings) { - settings.version = settings.version || this.compilerContainer.data.selectedVersion + settings.version = settings.version || this.selectedVersion const res = await compile(compilationTargets, settings) return res } @@ -227,7 +233,7 @@ class CompileTab extends ViewPlugin { // This function is used for passing the compiler configuration to 'remix-tests' getCurrentCompilerConfig () { return { - currentVersion: this.compilerContainer.data.selectedVersion, + currentVersion: this.selectedVersion, evmVersion: this.compileTabLogic.evmVersion, optimize: this.compileTabLogic.optimize, runs: this.compileTabLogic.runs @@ -240,20 +246,10 @@ class CompileTab extends ViewPlugin { * @param {object} settings {evmVersion, optimize, runs, version, language} */ setCompilerConfig (settings) { - return new Promise((resolve, reject) => { - addTooltip(yo`
${JSON.stringify(settings, null, '\t')}
${JSON.stringify(settings, null, '\t')}