aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-11-02 12:13:21 +1100
committerIan Coleman <coleman.ian@gmail.com>2016-11-02 12:13:21 +1100
commit1b12b2f5f12b32a2ed6e69ff77f10b889b383e97 (patch)
treece1804c806661b34ec4354db35cf1fd290a5fcb2 /tests.js
parent92b46ab44fb7fe7aef1cef3d843d1e3d19c1d7cb (diff)
downloadBIP39-1b12b2f5f12b32a2ed6e69ff77f10b889b383e97.tar.gz
BIP39-1b12b2f5f12b32a2ed6e69ff77f10b889b383e97.tar.zst
BIP39-1b12b2f5f12b32a2ed6e69ff77f10b889b383e97.zip
Public key column in table, shown as hex
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index ebdf9ec..914be24 100644
--- a/tests.js
+++ b/tests.js
@@ -1166,6 +1166,56 @@ page.open(url, function(status) {
1166}); 1166});
1167}, 1167},
1168 1168
1169// Public key is shown
1170function() {
1171page.open(url, function(status) {
1172 var expected = "033f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3";
1173 // set the phrase
1174 page.evaluate(function() {
1175 $(".phrase").val("abandon abandon ability").trigger("input");
1176 });
1177 // get the address
1178 waitForGenerate(function() {
1179 var actual = page.evaluate(function() {
1180 return $(".pubkey:first").text();
1181 });
1182 if (actual != expected) {
1183 console.log("Public key is not shown");
1184 console.log("Expected: " + expected);
1185 console.log("Got: " + actual);
1186 fail();
1187 }
1188 next();
1189 });
1190});
1191},
1192
1193// Public key visibility can be toggled
1194function() {
1195page.open(url, function(status) {
1196 // set the phrase
1197 page.evaluate(function() {
1198 $(".phrase").val("abandon abandon ability");
1199 $(".phrase").trigger("input");
1200 });
1201 waitForGenerate(function() {
1202 // toggle public key visibility
1203 page.evaluate(function() {
1204 $(".public-key-toggle").click();
1205 });
1206 // check the public key is not visible
1207 var isInvisible = page.evaluate(function() {
1208 return $(".pubkey:first span").hasClass("invisible");
1209 });
1210 if (!isInvisible) {
1211 console.log("Toggled public key is visible");
1212 fail();
1213 }
1214 next();
1215 });
1216});
1217},
1218
1169// Private key is shown 1219// Private key is shown
1170function() { 1220function() {
1171page.open(url, function(status) { 1221page.open(url, function(status) {