diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js
index 57bb51f806..c44a1101d8 100644
--- a/src/app/tabs/settings-tab.js
+++ b/src/app/tabs/settings-tab.js
@@ -69,7 +69,7 @@ module.exports = class SettingsTab extends ViewPlugin {
// Gist settings
const token = this.config.get('settings/gist-access-token')
- const gistAccessToken = yo``
+ const gistAccessToken = yo``
if (token) gistAccessToken.value = token
const removeToken = () => { self.config.set('settings/gist-access-token', ''); gistAccessToken.value = ''; tooltip('Access token removed') }
const saveToken = () => { this.config.set('settings/gist-access-token', gistAccessToken.value); tooltip('Access token saved') }
diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js
index b0e3c24297..116fbb27ca 100644
--- a/src/app/tabs/test-tab.js
+++ b/src/app/tabs/test-tab.js
@@ -33,6 +33,7 @@ module.exports = class TestTab extends ViewPlugin {
this.runningTestsNumber = 0
this.readyTestsNumber = 0
this.areTestsRunning = false
+ this.defaultPath = 'browser/tests'
appManager.event.on('activate', (name) => {
if (name === 'solidity') this.updateRunAction()
@@ -351,7 +352,8 @@ module.exports = class TestTab extends ViewPlugin {
}
updateCurrentPath (e) {
- this.testTabLogic.setCurrentPath(e.target.value)
+ const newValue = e.target.value == '' ? this.defaultPath : e.target.value
+ this.testTabLogic.setCurrentPath(newValue)
this.updateRunAction()
this.updateForNewCurrent()
}
@@ -494,14 +496,14 @@ module.exports = class TestTab extends ViewPlugin {
this.testsExecutionStopped = yo``
this.testsExecutionStoppedError = yo``
this.uiPathList = yo``
- const placeHolderPath = 'browser/tests'
const availablePaths = yo`
this.updateCurrentPath(e)}/>
@@ -545,7 +547,7 @@ module.exports = class TestTab extends ViewPlugin {
`
this._view.el = el
- this.testTabLogic.setCurrentPath(placeHolderPath)
+ this.testTabLogic.setCurrentPath(this.defaultPath)
this.updateForNewCurrent(this.fileManager.currentFile())
return el
}
diff --git a/test-browser/tests/solidityUnittests.test.js b/test-browser/tests/solidityUnittests.test.js
index 8c7c1eafba..a3dd412ee3 100644
--- a/test-browser/tests/solidityUnittests.test.js
+++ b/test-browser/tests/solidityUnittests.test.js
@@ -94,7 +94,7 @@ module.exports = {
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/tests/ks2b_test.sol')
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/tests/4_Ballot_test.sol')
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/tests/simple_storage_test.sol')
- .pause(6000)
+ .pause(7000)
.assert.containsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped')
},
@@ -141,6 +141,19 @@ module.exports = {
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', `Method 'add' can not have parameters inside a test contract`)
},
+ 'Changing current path': function (browser) {
+ browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
+ .addFile('myTests/simple_storage_test.sol', sources[0]['browser/tests/simple_storage_test.sol'])
+ .clickLaunchIcon('solidityUnitTesting')
+ .setValue('*[data-id="uiPathInput"]', 'browser/myTests')
+ .clickElementAtPosition('.singleTestLabel', 0)
+ .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
+ .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000)
+ .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]')
+ .clearValue('*[data-id="uiPathInput"]')
+ .setValue('*[data-id="uiPathInput"]', 'browser/tests')
+ },
+
'Solidity Unittests': function (browser) {
runTests(browser)
},