diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-08-26 12:26:33 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-08-26 12:26:33 +1000 |
commit | 21372fab36d3a500feda29b52ae8d8a007c11f8f (patch) | |
tree | 883ad51e2687c3ee4bcb8ea0c7c4becbfe0fc77b | |
parent | 3f1faa4d0e0212b1bc26f2ac8e5f0c486ccc1858 (diff) | |
download | BIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.tar.gz BIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.tar.zst BIP39-21372fab36d3a500feda29b52ae8d8a007c11f8f.zip |
Test toggling address visibility
-rw-r--r-- | tests.js | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -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 |
1057 | function() { | ||
1058 | page.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 | ||