commit
0ae5305822
@ -1,3 +1,6 @@ |
||||
machine: |
||||
node: |
||||
version: 6.0.0 |
||||
dependencies: |
||||
pre: |
||||
- "npm i -g testem" |
||||
|
@ -0,0 +1,7 @@ |
||||
function wait() { |
||||
return new Promise(function(resolve, reject) { |
||||
setTimeout(function() { |
||||
resolve() |
||||
}, 500) |
||||
}) |
||||
} |
@ -0,0 +1,22 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width"> |
||||
<title>QUnit Example</title> |
||||
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.0.0.css"> |
||||
</head> |
||||
<body> |
||||
<div id="qunit"></div> |
||||
<div id="qunit-fixture"></div> |
||||
<script src="https://code.jquery.com/qunit/qunit-2.0.0.js"></script> |
||||
<script src="./jquery-3.1.0.min.js"></script> |
||||
<script src="helpers.js"></script> |
||||
<script src="tests.js"></script> |
||||
<script src="/testem.js"></script> |
||||
|
||||
<iframe src="/development/index.html" height="500px" width="360px"> |
||||
<p>Your browser does not support iframes</p> |
||||
</iframe> |
||||
</body> |
||||
</html> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,21 @@ |
||||
QUnit.test('agree to terms', function (assert) { |
||||
var done = assert.async() |
||||
|
||||
// Select the mock app root
|
||||
var app = $('iframe').contents().find('#app-content .mock-app-root') |
||||
|
||||
// Agree to terms
|
||||
app.find('button').click() |
||||
|
||||
// Wait for view to transition:
|
||||
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() |
||||
}) |
||||
}) |
@ -0,0 +1,9 @@ |
||||
launch_in_dev: |
||||
- Chrome |
||||
- Firefox |
||||
launch_in_ci: |
||||
- Chrome |
||||
- Firefox |
||||
framework: |
||||
- qunit |
||||
test_page: "test/integration/index.html" |
Loading…
Reference in new issue