Commit 92536a10 authored by lianahus's avatar lianahus Committed by Aniket

test

parent 5add7c9f
...@@ -154,13 +154,17 @@ module.exports = { ...@@ -154,13 +154,17 @@ module.exports = {
.setValue('*[data-id="uiPathInput"]', 'tests1') .setValue('*[data-id="uiPathInput"]', 'tests1')
.click('*[data-id="testTabGenerateTestFolder"]') .click('*[data-id="testTabGenerateTestFolder"]')
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.click('*[data-id="workspaceCreate"]') // create workspace_name // creating a new workspace
.click('*[data-id="workspaceCreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
// eslint-disable-next-line dot-notation // eslint-disable-next-line dot-notation
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_new' }) .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_new' })
.click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.click('*[data-id="workspacesSelect"] option[value="workspace_new"]')
// end of creating
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.assert.containsText('*[data-id="uiPathInput"]', 'tests') .pause(2000)
.verify.attributeEquals('*[data-id="uiPathInput"]', 'value', 'tests')
}, },
'Solidity Unittests': function (browser: NightwatchBrowser) { 'Solidity Unittests': function (browser: NightwatchBrowser) {
......
...@@ -53,8 +53,6 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -53,8 +53,6 @@ module.exports = class TestTab extends ViewPlugin {
listenToEvents () { listenToEvents () {
this.filePanel.event.register('newTestFileCreated', file => { this.filePanel.event.register('newTestFileCreated', file => {
console.log('newTestFileCreated')
var testList = this._view.el.querySelector("[class^='testList']") var testList = this._view.el.querySelector("[class^='testList']")
var test = this.createSingleTest(file) var test = this.createSingleTest(file)
testList.appendChild(test) testList.appendChild(test)
...@@ -62,7 +60,7 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -62,7 +60,7 @@ module.exports = class TestTab extends ViewPlugin {
this.data.selectedTests.push(file) this.data.selectedTests.push(file)
}) })
this.on('fileExplorers', 'setWorkspace', async () => { this.on('filePanel', 'setWorkspace', () => {
this.testTabLogic.setCurrentPath(this.defaultPath) this.testTabLogic.setCurrentPath(this.defaultPath)
this.inputPath.value = this.defaultPath this.inputPath.value = this.defaultPath
this.updateForNewCurrent() this.updateForNewCurrent()
......
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