mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-29 05:30:54 +00:00
Test toggling private key visibility
This commit is contained in:
@@ -1104,6 +1104,30 @@ page.open(url, function(status) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Private key visibility can be toggled
|
// Private key visibility can be toggled
|
||||||
|
function() {
|
||||||
|
page.open(url, function(status) {
|
||||||
|
// set the phrase
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".phrase").val("abandon abandon ability");
|
||||||
|
$(".phrase").trigger("input");
|
||||||
|
});
|
||||||
|
waitForGenerate(function() {
|
||||||
|
// toggle private key visibility
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".private-key-toggle").click();
|
||||||
|
});
|
||||||
|
// check the private key is not visible
|
||||||
|
var isInvisible = page.evaluate(function() {
|
||||||
|
return $(".privkey:first span").hasClass("invisible");
|
||||||
|
});
|
||||||
|
if (!isInvisible) {
|
||||||
|
console.log("Toggled private key is visible");
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// More addresses can be generated
|
// More addresses can be generated
|
||||||
// A custom number of additional addresses can be generated
|
// A custom number of additional addresses can be generated
|
||||||
|
|||||||
Reference in New Issue
Block a user