mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
tests - integration - fix bad cherry-pick
This commit is contained in:
parent
0e70366e9c
commit
48d21f4fca
@ -5,13 +5,11 @@ QUnit.module('first time usage')
|
|||||||
QUnit.test('render init screen', (assert) => {
|
QUnit.test('render init screen', (assert) => {
|
||||||
const done = assert.async()
|
const done = assert.async()
|
||||||
runFirstTimeUsageTest(assert).then(done).catch((err) => {
|
runFirstTimeUsageTest(assert).then(done).catch((err) => {
|
||||||
assert.notOk(err, 'Should not error')
|
assert.notOk(err, `Error was thrown: ${err.stack}`)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
// QUnit.testDone(({ module, name, total, passed, failed, skipped, todo, runtime }) => {
|
// QUnit.testDone(({ module, name, total, passed, failed, skipped, todo, runtime }) => {
|
||||||
// if (failed > 0) {
|
// if (failed > 0) {
|
||||||
// const app = $('iframe').contents()[0].documentElement
|
// const app = $('iframe').contents()[0].documentElement
|
||||||
@ -20,36 +18,29 @@ QUnit.test('render init screen', (assert) => {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
|
||||||
>>>>>>> 5c53bab... test - integration - drop testem for karma
|
|
||||||
async function runFirstTimeUsageTest(assert, done) {
|
async function runFirstTimeUsageTest(assert, done) {
|
||||||
|
|
||||||
await timeout()
|
await timeout()
|
||||||
|
|
||||||
const app = $('#app-content .mock-app-root')
|
const app = $('#app-content .mock-app-root')
|
||||||
|
|
||||||
const recurseNotices = async () => {
|
// recurse notices
|
||||||
|
while (true) {
|
||||||
const button = app.find('button')
|
const button = app.find('button')
|
||||||
if (button.html() === 'Accept') {
|
if (button.html() === 'Accept') {
|
||||||
|
// still notices to accept
|
||||||
const termsPage = app.find('.markdown')[0]
|
const termsPage = app.find('.markdown')[0]
|
||||||
termsPage.scrollTop = termsPage.scrollHeight
|
termsPage.scrollTop = termsPage.scrollHeight
|
||||||
await timeout()
|
await timeout()
|
||||||
button.click()
|
button.click()
|
||||||
<<<<<<< HEAD
|
|
||||||
await wait()
|
|
||||||
await recurseNotices()
|
|
||||||
=======
|
|
||||||
await timeout()
|
await timeout()
|
||||||
>>>>>>> 5c53bab... test - integration - drop testem for karma
|
|
||||||
} else {
|
} else {
|
||||||
await wait()
|
// exit loop
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
await recurseNotices()
|
|
||||||
=======
|
|
||||||
await timeout()
|
await timeout()
|
||||||
>>>>>>> 5c53bab... test - integration - drop testem for karma
|
|
||||||
|
|
||||||
// Scroll through terms
|
// Scroll through terms
|
||||||
const title = app.find('h1').text()
|
const title = app.find('h1').text()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user