From 0e54bdbc28e4c26d2bef92f92c722b84dc7f93c3 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Sat, 15 Jun 2024 02:44:05 +0100 Subject: [PATCH] fix catastrophic test failures. Resort to default tab naming --- apps/remix-ide-e2e/src/tests/terminal.test.ts | 1 - apps/remix-ide/src/app/panels/tab-proxy.js | 8 ------ .../src/app/plugins/compile-details.tsx | 28 ++++++++----------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 8c716a187d..fdbc8fb8b1 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -117,7 +117,6 @@ module.exports = { .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) .clickInstance(0) .clickFunction('changeOwner - transact (not payable)', { types: 'address newOwner', values: '0xd9145CCE52D386f254917e481eB44e9943F39138' }) // execute the "changeOwner" function - .pause() .waitForElementContainsText('*[data-id="terminalJournal"]', 'previousOwner', 60000) // check that the script is logging the event .waitForElementContainsText('*[data-id="terminalJournal"]', '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4', 60000) // check that the script is logging the event .waitForElementContainsText('*[data-id="terminalJournal"]', 'newOwner', 60000) diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index 05f68cd802..16e1234f8e 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -241,15 +241,7 @@ export class TabProxy extends Plugin { icon = 'assets/img/vyperLogo2.webp' } if (title === 'Solidity Compile Details') { - let updatedName = this.fileManager.currentFile() icon = 'assets/img/solidity.webp' - name = updatedName.split('/')[1] - let newTitle = '' - title.split(' ').forEach((x, index) => { - if (index !== 0) { - newTitle += ` ${x}` - }}) - title = `${name} - ${newTitle}` } diff --git a/apps/remix-ide/src/app/plugins/compile-details.tsx b/apps/remix-ide/src/app/plugins/compile-details.tsx index 3bdef9de32..1be931f0ed 100644 --- a/apps/remix-ide/src/app/plugins/compile-details.tsx +++ b/apps/remix-ide/src/app/plugins/compile-details.tsx @@ -6,38 +6,32 @@ import { RemixUiCompileDetails } from '@remix-ui/solidity-compile-details' const _paq = (window._paq = window._paq || []) -type CompileDetailsPayload = { - contractProperties: any, - selectedContract: string, - help: any, - insertValue: any, - saveAs: any, -} - -interface ICompilationDetailsPlugin extends ViewPlugin { - showDetails: (payload: any) => void -} - const profile = { name: 'compilationDetails', displayName: 'Solidity Compile Details', description: 'Displays details from solidity compiler', location: 'mainPanel', - methods: ['showDetails', 'getTabHeadDetails'], + methods: ['showDetails'], events: [] } -export class CompilationDetailsPlugin extends ViewPlugin implements ICompilationDetailsPlugin { +export class CompilationDetailsPlugin extends ViewPlugin { dispatch: React.Dispatch = () => {} appManager: RemixAppManager element: HTMLDivElement - payload: CompileDetailsPayload + payload: any constructor(appManager: RemixAppManager) { super(profile) this.appManager = appManager this.element = document.createElement('div') this.element.setAttribute('id', 'compileDetails') - this.payload + this.payload = { + contractProperties: {} as any, + selectedContract: '', + help: {} as any, + insertValue: {} as any, + saveAs: {} as any, + } } async onActivation() { @@ -50,7 +44,7 @@ export class CompilationDetailsPlugin extends ViewPlugin implements ICompilation async showDetails(sentPayload: any) { await this.call('tabs', 'focus', 'compilationDetails') - setTimeout(async () => { + setTimeout(() => { this.payload = sentPayload this.renderComponent() }, 2000)