mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-18 08:22:16 +00:00
Test toggling address visibility
This commit is contained in:
27
tests.js
27
tests.js
@@ -978,7 +978,6 @@ page.open(url, function(status) {
|
|||||||
$(".phrase").val("abandon abandon ability");
|
$(".phrase").val("abandon abandon ability");
|
||||||
$(".phrase").trigger("input");
|
$(".phrase").trigger("input");
|
||||||
});
|
});
|
||||||
// check the path is not shown
|
|
||||||
waitForGenerate(function() {
|
waitForGenerate(function() {
|
||||||
// toggle path visibility
|
// toggle path visibility
|
||||||
page.evaluate(function() {
|
page.evaluate(function() {
|
||||||
@@ -1053,7 +1052,33 @@ page.open(url, function(status) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// Address visibility can be toggled
|
// Address 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 address visibility
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".address-toggle").click();
|
||||||
|
});
|
||||||
|
// check the address is not visible
|
||||||
|
var isInvisible = page.evaluate(function() {
|
||||||
|
return $(".address:first span").hasClass("invisible");
|
||||||
|
});
|
||||||
|
if (!isInvisible) {
|
||||||
|
console.log("Toggled address is visible");
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// Private key is shown
|
// Private key is shown
|
||||||
// Private key visibility can be toggled
|
// Private key visibility can be toggled
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user