From 2a3a32fc3ae62568b9d90bb0f166d899d42dbe5b Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 31 Dec 2021 14:07:38 +0530 Subject: [PATCH] default test path optimization --- apps/remix-ide/src/app/tabs/test-tab.js | 2 +- .../solidity-unit-testing/src/lib/solidity-unit-testing.tsx | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 6fd97b446a..82861a66dc 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -133,7 +133,7 @@ module.exports = class TestTab extends ViewPlugin { render () { this.onActivationInternal() - this.renderComponent() + this.renderComponent('tests') return this.element } 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 64db219780..e51b80f73e 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 @@ -21,7 +21,6 @@ export const SolidityUnitTesting = (props: Record) => { const { helper, testTab, initialPath } = props const { testTabLogic } = testTab - const [defaultPath, setDefaultPath] = useState('tests') const [toasterMsg, setToasterMsg] = useState('') const [disableCreateButton, setDisableCreateButton] = useState(true) @@ -52,7 +51,7 @@ export const SolidityUnitTesting = (props: Record) => { const selectedTests: any = useRef([]) const currentErrors: any = useRef([]) - + const defaultPath = 'tests' let areTestsRunning = false let runningTestFileName: any @@ -115,9 +114,6 @@ export const SolidityUnitTesting = (props: Record) => { }, [initialPath]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { - updateDirList('/') - updateForNewCurrent() - testTab.on('filePanel', 'newTestFileCreated', async (file: string) => { try { testTabLogic.getTests((error: any, tests: any) => {