From 06ddf16cebcb5d334b33403524844d07a7edeb8d Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 11 Nov 2021 11:44:58 +0530 Subject: [PATCH] component load --- apps/remix-ide/src/app/tabs/test-tab.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 20e2fdcb17..ae4028167f 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -50,6 +50,7 @@ module.exports = class TestTab extends ViewPlugin { this.allFilesInvolved = ['.deps/remix-tests/remix_tests.sol', '.deps/remix-tests/remix_accounts.sol'] this.isDebugging = false this.currentErrors = [] + this.element = document.createElement('div') appManager.event.on('activate', (name) => { if (name === 'solidity') this.updateRunAction() @@ -60,6 +61,7 @@ module.exports = class TestTab extends ViewPlugin { } onActivationInternal () { + console.log('onActivationInternal---start->') this.testTabLogic = new TestTabLogic(this.fileManager) this.listenToEvents() this.call('filePanel', 'registerContextMenuItem', { @@ -71,6 +73,7 @@ module.exports = class TestTab extends ViewPlugin { path: [], pattern: [] }) + console.log('onActivationInternal---end->') } async setTestFolderPath (event) { @@ -92,6 +95,7 @@ module.exports = class TestTab extends ViewPlugin { } async onActivation () { + console.log('onActivation--->') const isSolidityActive = await this.call('manager', 'isActive', 'solidity') if (!isSolidityActive) { await this.call('manager', 'activatePlugin', 'solidity') @@ -99,10 +103,10 @@ module.exports = class TestTab extends ViewPlugin { await this.testRunner.init() await this.createTestLibs() this.updateRunAction() - this.renderComponent() } onDeactivation () { + console.log('onDeactivation--->') this.off('filePanel', 'newTestFileCreated') this.off('filePanel', 'setWorkspace') // 'currentFileChanged' event is added more than once @@ -110,6 +114,7 @@ module.exports = class TestTab extends ViewPlugin { } listenToEvents () { + console.log('listenToEvents--start-->') this.on('filePanel', 'newTestFileCreated', async file => { try { await this.testTabLogic.getTests((error, tests) => { @@ -147,6 +152,7 @@ module.exports = class TestTab extends ViewPlugin { }) this.fileManager.events.on('currentFileChanged', (file, provider) => this.updateForNewCurrent(file)) + console.log('listenToEvents--end-->') } async updateForNewCurrent (file) { @@ -796,13 +802,18 @@ module.exports = class TestTab extends ViewPlugin { } render () { + console.log('render--->') + this.onActivationInternal() + this.renderComponent() return this.element } renderComponent () { + console.log('renderComponent-start-->') ReactDOM.render( , this.element) + console.log('renderComponent-end-->') } render2 () {