aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index b0e7ef8..c7d92e4 100644
--- a/tests.js
+++ b/tests.js
@@ -3089,6 +3089,7 @@ page.open(url, function(status) {
3089 // use entropy 3089 // use entropy
3090 page.evaluate(function() { 3090 page.evaluate(function() {
3091 $(".use-entropy").prop("checked", true).trigger("change"); 3091 $(".use-entropy").prop("checked", true).trigger("change");
3092 $(".mnemonic-length").val("raw");
3092 $(".entropy").val("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-6C TS TH 4H KC 5H 2H AH 2C 8D 3H 5D").trigger("input"); 3093 $(".entropy").val("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-6C TS TH 4H KC 5H 2H AH 2C 8D 3H 5D").trigger("input");
3093 }); 3094 });
3094 // get the mnemonic 3095 // get the mnemonic
@@ -3106,6 +3107,19 @@ page.open(url, function(status) {
3106 var newPhrase = page.evaluate(function() { 3107 var newPhrase = page.evaluate(function() {
3107 return $(".phrase").val(); 3108 return $(".phrase").val();
3108 }); 3109 });
3110 // check raw entropy is in use, ie the first bits should remain the same
3111 var startLength = 20;
3112 var originalPhraseStart = originalPhrase.substring(0,startLength);
3113 var newPhraseStart = newPhrase.substring(0,startLength);
3114 if (newPhraseStart != originalPhraseStart) {
3115 console.log("Changing last 12 cards changed first portion of mnemonic");
3116 console.log("Original:");
3117 console.log(originalPhrase);
3118 console.log("New:");
3119 console.log(newPhrase);
3120 fail();
3121 }
3122 // check the phrase has changed
3109 if (newPhrase == originalPhrase) { 3123 if (newPhrase == originalPhrase) {
3110 console.log("Changing last 12 cards does not change mnemonic"); 3124 console.log("Changing last 12 cards does not change mnemonic");
3111 console.log("Original:"); 3125 console.log("Original:");