From c0d6dcff00b36e89242695a4a29c5f52f4d3a5be Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 5 Oct 2016 02:42:19 -0700 Subject: Rewritten to react standards. Way easier. --- test/integration/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/tests.js b/test/integration/tests.js index a3f3cd294..f8c1a6fd9 100644 --- a/test/integration/tests.js +++ b/test/integration/tests.js @@ -11,7 +11,7 @@ QUnit.test('agree to terms', function (assert) { wait().then(function() { var title = app.find('h1').text() - assert.equal(title, 'MetaMask', 'title screen') + assert.equal(title, 'Terms of Use Version 1', 'title screen') var buttons = app.find('button') assert.equal(buttons.length, 2, 'two buttons: create and restore') -- cgit From e20e0f661d81937e34fc2f930eee92b8fe2c7e04 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 5 Oct 2016 19:49:53 -0700 Subject: Fix integration test. --- test/integration/tests.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/integration/tests.js b/test/integration/tests.js index f8c1a6fd9..2d813762d 100644 --- a/test/integration/tests.js +++ b/test/integration/tests.js @@ -3,19 +3,26 @@ QUnit.test('agree to terms', function (assert) { // Select the mock app root var app = $('iframe').contents().find('#app-content .mock-app-root') + // var button = $('.agree') + // button.removeAttr('disabled') - // Agree to terms - app.find('button').click() + app.find('.markdown').prop('scrollTop', 100000000) - // Wait for view to transition: + + // Agree to terms wait().then(function() { + app.find('button').click() + wait().then(function() { - var title = app.find('h1').text() - assert.equal(title, 'Terms of Use Version 1', 'title screen') + var title = app.find('h1').text() + assert.equal(title, 'MetaMask', 'title screen') - var buttons = app.find('button') - assert.equal(buttons.length, 2, 'two buttons: create and restore') + var buttons = app.find('button') + assert.equal(buttons.length, 2, 'two buttons: create and restore') - done() + done() + }) }) + + // Wait for view to transition: }) -- cgit From 5e9bc31c58aff4b9d1d0d1bd54416ffb0a1b14d3 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 11 Oct 2016 15:50:02 -0700 Subject: Cleanup. --- test/integration/tests.js | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/integration/tests.js b/test/integration/tests.js index 2d813762d..747845d75 100644 --- a/test/integration/tests.js +++ b/test/integration/tests.js @@ -3,25 +3,37 @@ QUnit.test('agree to terms', function (assert) { // Select the mock app root var app = $('iframe').contents().find('#app-content .mock-app-root') - // var button = $('.agree') - // button.removeAttr('disabled') app.find('.markdown').prop('scrollTop', 100000000) // Agree to terms + // wait().then(function() { + // app.find('button').click() + // wait().then(function() { + // + // var title = app.find('h1').text() + // assert.equal(title, 'MetaMask', 'title screen') + // + // var buttons = app.find('button') + // assert.equal(buttons.length, 2, 'two buttons: create and restore') + // + // done() + // }) + // }) + wait().then(function() { app.find('button').click() - wait().then(function() { - - var title = app.find('h1').text() - assert.equal(title, 'MetaMask', 'title screen') + }).then(function() { + return wait() + }).then(function() { + var title = app.find('h1').text() + assert.equal(title, 'MetaMask', 'title screen') - var buttons = app.find('button') - assert.equal(buttons.length, 2, 'two buttons: create and restore') + var buttons = app.find('button') + assert.equal(buttons.length, 2, 'two buttons: create and restore') - done() - }) + done() }) // Wait for view to transition: -- cgit From 5c0c370fe4bcb4c1a2467edd19e86e463b4fa900 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 11 Oct 2016 15:52:44 -0700 Subject: Remove comments. --- test/integration/tests.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'test') diff --git a/test/integration/tests.js b/test/integration/tests.js index 747845d75..92111b05b 100644 --- a/test/integration/tests.js +++ b/test/integration/tests.js @@ -6,22 +6,6 @@ QUnit.test('agree to terms', function (assert) { app.find('.markdown').prop('scrollTop', 100000000) - - // Agree to terms - // wait().then(function() { - // app.find('button').click() - // wait().then(function() { - // - // var title = app.find('h1').text() - // assert.equal(title, 'MetaMask', 'title screen') - // - // var buttons = app.find('button') - // assert.equal(buttons.length, 2, 'two buttons: create and restore') - // - // done() - // }) - // }) - wait().then(function() { app.find('button').click() }).then(function() { -- cgit