pull/5370/head
bunsenstraat 2 years ago
parent 6f180014d2
commit b17bf675ed
  1. 22
      apps/remix-ide-e2e/src/tests/homeTab.test.ts

@ -2,23 +2,19 @@
import { NightwatchBrowser } from 'nightwatch'
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)
})
},
it('Should create new file', function (browser: NightwatchBrowser) {
'Should create new file': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="homeTabNewFile"]')
.click('*[data-id="homeTabNewFile"]')
// click again to make it work
.click('*[data-id="homeTabNewFile"]')
.waitForElementVisible('li[data-id="treeViewLitreeViewItem//blank"]')
.sendKeys('li[data-id="treeViewLitreeViewItem//blank"]', 'newTestFile')
.sendKeys('li[data-id="treeViewLitreeViewItem//blank"]', browser.Keys.ENTER)
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000)
.sendKeys('*[data-id$="/blank"] .remixui_items', 'newTestFile')
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.waitForElementVisible('li[data-id="treeViewLitreeViewItemnewTestFile.sol"]')
})
after(browser => browser.end());
})
}
}
Loading…
Cancel
Save