diff --git a/apps/remix-ide-e2e/src/tests/homeTab.test.ts b/apps/remix-ide-e2e/src/tests/homeTab.test.ts index 8d3d643db1..81f78be22a 100644 --- a/apps/remix-ide-e2e/src/tests/homeTab.test.ts +++ b/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()); -}) \ No newline at end of file + } +} \ No newline at end of file