mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add integration tests for logging out and back in
This commit is contained in:
parent
fe533bbef2
commit
049e351c9d
@ -56,7 +56,33 @@ QUnit.test('agree to terms', function (assert) {
|
|||||||
|
|
||||||
var detail = app.find('.account-detail-section')[0]
|
var detail = app.find('.account-detail-section')[0]
|
||||||
assert.ok(detail, 'Account detail section loaded.')
|
assert.ok(detail, 'Account detail section loaded.')
|
||||||
done()
|
|
||||||
|
|
||||||
|
var sandwich = app.find('.sandwich-expando')[0]
|
||||||
|
sandwich.click()
|
||||||
|
|
||||||
|
return wait()
|
||||||
|
}).then(function() {
|
||||||
|
|
||||||
|
var sandwich = app.find('.menu-droppo')[0]
|
||||||
|
var lock = sandwich.children[2]
|
||||||
|
assert.ok(lock, 'Lock menu item found')
|
||||||
|
lock.click()
|
||||||
|
|
||||||
|
return wait(1000)
|
||||||
|
}).then(function() {
|
||||||
|
|
||||||
|
var pwBox = app.find('#password-box')[0]
|
||||||
|
pwBox.value = PASSWORD
|
||||||
|
|
||||||
|
var createButton = app.find('button.primary')[0]
|
||||||
|
createButton.click()
|
||||||
|
|
||||||
|
return wait(1500)
|
||||||
|
}).then(function() {
|
||||||
|
|
||||||
|
var detail = app.find('.account-detail-section')[0]
|
||||||
|
assert.ok(detail, 'Account detail section loaded again.')
|
||||||
|
|
||||||
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -447,11 +447,12 @@ function updateMetamaskState (newState) {
|
|||||||
|
|
||||||
function lockMetamask () {
|
function lockMetamask () {
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
background.setLocked((err) => {
|
background.setLocked((err, newState) => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
dispatch(actions.hideLoadingIndication())
|
||||||
if (err) {
|
if (err) {
|
||||||
return dispatch(actions.displayWarning(err.message))
|
return dispatch(actions.displayWarning(err.message))
|
||||||
}
|
}
|
||||||
|
dispatch(actions.updateMetamaskState(newState))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user