diff --git a/package.json b/package.json index c85a1146c9..3ee19f8ec0 100644 --- a/package.json +++ b/package.json @@ -175,6 +175,7 @@ "nightwatch_local_console": "nightwatch ./test-browser/tests/console.js --config nightwatch.js --env chrome ", "nightwatch_local_gist": "nightwatch ./test-browser/tests/gist.js --config nightwatch.js --env chrome ", "nightwatch_local_workspace": "nightwatch ./test-browser/tests/workspace.js --config nightwatch.js --env chrome ", + "nightwatch_local_homepage": "nightwatch ./test-browser/tests/homepage.js --config nightwatch.js --env chrome ", "onchange": "onchange build/app.js -- npm-run-all lint", "prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build", "remixd": "remixd -s ./contracts --remix-ide http://127.0.0.1:8080", diff --git a/test-browser/tests/homepage.js b/test-browser/tests/homepage.js new file mode 100644 index 0000000000..722a4a6646 --- /dev/null +++ b/test-browser/tests/homepage.js @@ -0,0 +1,26 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + 'Loads Icon\'s Panel': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .waitForElementVisible('#icon-panel > div > div[class^="homeIcon"]') + .waitForElementVisible('#fileExplorerIcons > div:nth-child(1)') + .waitForElementVisible('#settingsIcons > div:nth-child(1)') + .waitForElementVisible('#settingsIcons > div:nth-child(2)') + }, + + 'Loads Side Panel': function (browser) { + browser.waitForElementVisible('#side-panel') + .assert.containsText('h6[class^="swapitTitle"]', 'FILE EXPLORERS') + .waitForElementVisible('div[class^="treeview"]') + .waitForElementVisible('ul[key="browser"] > li:nth-child(4)') + .end() + }, + + tearDown: sauce +}