fix catastrophic test failures. Resort to default tab naming

pull/4891/head
Joseph Izang 5 months ago committed by Aniket
parent 7038e0a09a
commit 0e54bdbc28
  1. 1
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  2. 8
      apps/remix-ide/src/app/panels/tab-proxy.js
  3. 28
      apps/remix-ide/src/app/plugins/compile-details.tsx

@ -117,7 +117,6 @@ module.exports = {
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.clickInstance(0) .clickInstance(0)
.clickFunction('changeOwner - transact (not payable)', { types: 'address newOwner', values: '0xd9145CCE52D386f254917e481eB44e9943F39138' }) // execute the "changeOwner" function .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"]', '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"]', '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4', 60000) // check that the script is logging the event
.waitForElementContainsText('*[data-id="terminalJournal"]', 'newOwner', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'newOwner', 60000)

@ -241,15 +241,7 @@ export class TabProxy extends Plugin {
icon = 'assets/img/vyperLogo2.webp' icon = 'assets/img/vyperLogo2.webp'
} }
if (title === 'Solidity Compile Details') { if (title === 'Solidity Compile Details') {
let updatedName = this.fileManager.currentFile()
icon = 'assets/img/solidity.webp' icon = 'assets/img/solidity.webp'
name = updatedName.split('/')[1]
let newTitle = ''
title.split(' ').forEach((x, index) => {
if (index !== 0) {
newTitle += ` ${x}`
}})
title = `${name} - ${newTitle}`
} }

@ -6,38 +6,32 @@ import { RemixUiCompileDetails } from '@remix-ui/solidity-compile-details'
const _paq = (window._paq = window._paq || []) 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 = { const profile = {
name: 'compilationDetails', name: 'compilationDetails',
displayName: 'Solidity Compile Details', displayName: 'Solidity Compile Details',
description: 'Displays details from solidity compiler', description: 'Displays details from solidity compiler',
location: 'mainPanel', location: 'mainPanel',
methods: ['showDetails', 'getTabHeadDetails'], methods: ['showDetails'],
events: [] events: []
} }
export class CompilationDetailsPlugin extends ViewPlugin implements ICompilationDetailsPlugin { export class CompilationDetailsPlugin extends ViewPlugin {
dispatch: React.Dispatch<any> = () => {} dispatch: React.Dispatch<any> = () => {}
appManager: RemixAppManager appManager: RemixAppManager
element: HTMLDivElement element: HTMLDivElement
payload: CompileDetailsPayload payload: any
constructor(appManager: RemixAppManager) { constructor(appManager: RemixAppManager) {
super(profile) super(profile)
this.appManager = appManager this.appManager = appManager
this.element = document.createElement('div') this.element = document.createElement('div')
this.element.setAttribute('id', 'compileDetails') this.element.setAttribute('id', 'compileDetails')
this.payload this.payload = {
contractProperties: {} as any,
selectedContract: '',
help: {} as any,
insertValue: {} as any,
saveAs: {} as any,
}
} }
async onActivation() { async onActivation() {
@ -50,7 +44,7 @@ export class CompilationDetailsPlugin extends ViewPlugin implements ICompilation
async showDetails(sentPayload: any) { async showDetails(sentPayload: any) {
await this.call('tabs', 'focus', 'compilationDetails') await this.call('tabs', 'focus', 'compilationDetails')
setTimeout(async () => { setTimeout(() => {
this.payload = sentPayload this.payload = sentPayload
this.renderComponent() this.renderComponent()
}, 2000) }, 2000)

Loading…
Cancel
Save