diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts index 1fad0fd67e..72cb57b8ea 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts @@ -48,7 +48,7 @@ export default class CodeParserCompiler { init() { this.onAstFinished = async (success, data: CompilationResult, source: CompilationSourceCode, input: any, version) => { - this.plugin.call('editor', 'clearAnnotations') + await this.plugin.call('editor', 'clearAnnotations') this.errorState = true const result = new CompilerAbstract('soljson', data, source, input) let allErrors: errorMarker[] = [] @@ -93,7 +93,7 @@ export default class CodeParserCompiler { const displayErrors = await this.plugin.call('config', 'getAppParameter', 'display-errors') if (displayErrors) await this.plugin.call('editor', 'addErrorMarker', allErrors) - this.addDecorators(allErrors, sources) + await this.addDecorators(allErrors, sources) } else { await this.plugin.call('editor', 'clearErrorMarkers', result.getSourceCode().sources) await this.clearDecorators(result.getSourceCode().sources) diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index df16f47574..b08ba68b1a 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -81,13 +81,14 @@ module.exports = class TestTab extends ViewPlugin { onDeactivation () { this.off('filePanel', 'newTestFileCreated') this.off('filePanel', 'setWorkspace') + this.off('filePanel', 'workspaceCreated') // 'currentFileChanged' event is added more than once this.fileManager.events.removeAllListeners('currentFileChanged') } listenToEvents () { this.on('filePanel', 'workspaceCreated', async () => { - this.createTestLibs() + setTimeout(() => this.createTestLibs(), 50) }) this.testRunner.event.on('compilationFinished', (success, data, source, input, version) => { diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 0229e5580c..c743caac68 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -165,8 +165,7 @@ export const SolidityUnitTesting = (props: Record) => { }) testTab.on('filePanel', 'workspaceCreated', async () => { - setTimeout(async () => { - await setCurrentPath(defaultPath)}, 100) + setTimeout(async () => await setCurrentPath(defaultPath), 100) }) testTab.on('filePanel', 'setWorkspace', async () => {