create button

pull/5370/head
Aniket-Engg 3 years ago committed by Aniket
parent d62a339b37
commit aa7110470a
  1. 28
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

@ -16,7 +16,7 @@ export const SolidityUnitTesting = (props: any) => {
const [checkSelectAll, setCheckSelectAll] = useState(true) const [checkSelectAll, setCheckSelectAll] = useState(true)
const [testsExecutionStoppedHidden, setTestsExecutionStoppedHidden] = useState(true) const [testsExecutionStoppedHidden, setTestsExecutionStoppedHidden] = useState(true)
const [testsExecutionStoppedErrorHidden, setTestsExecutionStoppedErrorHidden] = useState(true) const [testsExecutionStoppedErrorHidden, setTestsExecutionStoppedErrorHidden] = useState(true)
const [pathOptions, setPathOptions] = useState([]) const [pathOptions, setPathOptions] = useState([''])
const [inputPathValue, setInputPathValue] = useState('tests') const [inputPathValue, setInputPathValue] = useState('tests')
@ -118,21 +118,25 @@ export const SolidityUnitTesting = (props: any) => {
} }
} }
const handleCreateFolder = () => { const handleCreateFolder = (e:any) => {
console.log('handleCreateFolder') console.log('handleCreateFolder')
// this.inputPath.value = this.trimTestDirInput(this.inputPath.value) let inputPath = e.target.value
// let path = removeMultipleSlashes(this.inputPath.value) inputPath = trimTestDirInput(inputPath)
// if (path !== '/') path = removeTrailingSlashes(path) let path = helper.removeMultipleSlashes(inputPath)
// if (this.inputPath.value === '') this.inputPath.value = this.defaultPath if (path !== '/') path = helper.removeTrailingSlashes(path)
// this.inputPath.value = path if (inputPath === '') inputPath = defaultPath
// this.testTabLogic.generateTestFolder(this.inputPath.value) setInputPathValue(path)
// this.createTestFolder.disabled = true testTabLogic.generateTestFolder(inputPath)
// this.updateGenerateFileAction().disabled = false setDisableCreateButton(true)
// this.testTabLogic.setCurrentPath(this.inputPath.value) setDisableGenerateButton(false)
testTabLogic.setCurrentPath(inputPath)
console.log('path-->', path)
console.log('inputPath-->', inputPath)
// this.updateRunAction() // this.updateRunAction()
// this.updateForNewCurrent() // this.updateForNewCurrent()
// this.uiPathList.appendChild(yo`<option>${this.inputPath.value}</option>`) pathOptions.push(inputPath)
setPathOptions(pathOptions)
} }
// const updateGenerateFileAction = () => { // const updateGenerateFileAction = () => {

Loading…
Cancel
Save