pull/2943/head
bunsenstraat 2 years ago
parent 81af656ac7
commit 70c44c2db2
  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