diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/helper.js | 6 | ||||
-rw-r--r-- | test/integration/lib/first-time.js | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/helper.js b/test/helper.js index 64fe5bd07..a01ea1e53 100644 --- a/test/helper.js +++ b/test/helper.js @@ -1,5 +1,11 @@ +var log = require('loglevel') +log.setDefaultLevel(5) + require('jsdom-global')() window.localStorage = {} if (!('crypto' in window)) { window.crypto = {} } window.crypto.getRandomValues = require('polyfill-crypto.getrandomvalues') + +window.log = log +global.log = log diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index 55a16ef38..dbb88a3da 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -9,6 +9,23 @@ QUnit.test('render init screen', function (assert) { wait().then(function() { app = $('iframe').contents().find('#app-content .mock-app-root') + const recurseNotices = function () { + let button = app.find('button') + if (button.html() === 'Continue') { + let termsPage = app.find('.markdown')[0] + termsPage.scrollTop = termsPage.scrollHeight + return wait().then(() => { + button.click() + return wait() + }).then(() => { + return recurseNotices() + }) + } else { + return wait() + } + } + return recurseNotices() + }).then(function() { // Scroll through terms var title = app.find('h1').text() assert.equal(title, 'MetaMask', 'title screen') |