|
|
@ -2,23 +2,19 @@ |
|
|
|
import { NightwatchBrowser } from 'nightwatch' |
|
|
|
import { NightwatchBrowser } from 'nightwatch' |
|
|
|
import init from '../helpers/init' |
|
|
|
import init from '../helpers/init' |
|
|
|
|
|
|
|
|
|
|
|
describe('HomeTab e2e test', function () { |
|
|
|
module.exports = { |
|
|
|
|
|
|
|
|
|
|
|
before(function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
init(browser, done) |
|
|
|
init(browser, done) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
it('Should create new file', function (browser: NightwatchBrowser) { |
|
|
|
'Should create new file': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.waitForElementVisible('*[data-id="homeTabNewFile"]') |
|
|
|
.waitForElementVisible('*[data-id="homeTabNewFile"]') |
|
|
|
.click('*[data-id="homeTabNewFile"]') |
|
|
|
.click('*[data-id="homeTabNewFile"]') |
|
|
|
// click again to make it work
|
|
|
|
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000) |
|
|
|
.click('*[data-id="homeTabNewFile"]') |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', 'newTestFile') |
|
|
|
.waitForElementVisible('li[data-id="treeViewLitreeViewItem//blank"]') |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) |
|
|
|
.sendKeys('li[data-id="treeViewLitreeViewItem//blank"]', 'newTestFile') |
|
|
|
|
|
|
|
.sendKeys('li[data-id="treeViewLitreeViewItem//blank"]', browser.Keys.ENTER) |
|
|
|
|
|
|
|
.waitForElementVisible('li[data-id="treeViewLitreeViewItemnewTestFile.sol"]') |
|
|
|
.waitForElementVisible('li[data-id="treeViewLitreeViewItemnewTestFile.sol"]') |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
after(browser => browser.end()); |
|
|
|
|
|
|
|
}) |
|
|
|
|