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 { 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());
})
Loading…
Cancel
Save