Commit e145a2da authored by yann300's avatar yann300

fix e2e

parent 7accbc72
......@@ -94,7 +94,7 @@ module.exports = {
'Should fail on compilation, open file on error click, not disappear error': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/compilationError_test.sol', sources[0]['compilationError_test.sol'])
.click('div[title="default_workspace/tests/compilationError_test.sol"] span[class="close"]')
.click('div[title="default_workspace/tests/compilationError_test.sol"] span[class="close-tabs"]')
.clickLaunchIcon('solidityUnitTesting')
.pause(2000)
.click('*[data-id="testTabCheckAllTests"]')
......
......@@ -31,7 +31,7 @@ export const TabsUI = (props: TabsUIProps) => {
const renderTab = (tab, index) => {
const classNameImg = 'my-1 mr-1 text-dark ' + tab.iconClass
const classNameTab = 'nav-item nav-link tab' + (index === selectedIndex ? ' active' : '')
const classNameTab = 'nav-item nav-link tab' + (index === currentIndexRef.current ? ' active' : '')
return (
<div ref={el => { tabsRef.current[index] = el }} className={classNameTab} title={tab.tooltip}>
{tab.icon ? (<img className="my-1 mr-1 iconImage" src={tab.icon} />) : (<i className={classNameImg}></i>)}
......@@ -44,12 +44,13 @@ export const TabsUI = (props: TabsUIProps) => {
}
const active = () => {
if (currentIndexRef.current < 0) return ''
return props.tabs[currentIndexRef.current].name
}
const activateTab = (name: string) => {
const index = props.tabs.findIndex((tab) => tab.name === name)
setSelectedIndex(index)
currentIndexRef.current = index
setSelectedIndex(index)
}
useEffect(() => {
props.onReady({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment