aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-08-26 12:26:33 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-08-26 12:26:33 +1000
commit21372fab36d3a500feda29b52ae8d8a007c11f8f (patch)
tree883ad51e2687c3ee4bcb8ea0c7c4becbfe0fc77b /tests.js
parent3f1faa4d0e0212b1bc26f2ac8e5f0c486ccc1858 (diff)
downloadBIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.tar.gz
BIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.tar.zst
BIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.zip
Test toggling address visibility
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/tests.js b/tests.js
index 12a6c5b..6d24ecc 100644
--- a/tests.js
+++ b/tests.js
@@ -978,7 +978,6 @@ page.open(url, function(status) {
978 $(".phrase").val("abandon abandon ability"); 978 $(".phrase").val("abandon abandon ability");
979 $(".phrase").trigger("input"); 979 $(".phrase").trigger("input");
980 }); 980 });
981 // check the path is not shown
982 waitForGenerate(function() { 981 waitForGenerate(function() {
983 // toggle path visibility 982 // toggle path visibility
984 page.evaluate(function() { 983 page.evaluate(function() {
@@ -1053,7 +1052,33 @@ page.open(url, function(status) {
1053 }); 1052 });
1054}); 1053});
1055}, 1054},
1055
1056// Address visibility can be toggled 1056// Address visibility can be toggled
1057function() {
1058page.open(url, function(status) {
1059 // set the phrase
1060 page.evaluate(function() {
1061 $(".phrase").val("abandon abandon ability");
1062 $(".phrase").trigger("input");
1063 });
1064 waitForGenerate(function() {
1065 // toggle address visibility
1066 page.evaluate(function() {
1067 $(".address-toggle").click();
1068 });
1069 // check the address is not visible
1070 var isInvisible = page.evaluate(function() {
1071 return $(".address:first span").hasClass("invisible");
1072 });
1073 if (!isInvisible) {
1074 console.log("Toggled address is visible");
1075 fail();
1076 }
1077 next();
1078 });
1079});
1080},
1081
1057// Private key is shown 1082// Private key is shown
1058// Private key visibility can be toggled 1083// Private key visibility can be toggled
1059 1084