]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test incorrect root key shows error
authorIan Coleman <coleman.ian@gmail.com>
Mon, 3 Oct 2016 00:04:44 +0000 (11:04 +1100)
committerIan Coleman <coleman.ian@gmail.com>
Mon, 3 Oct 2016 00:04:44 +0000 (11:04 +1100)
tests.js

index 0176ba8a7eef7c34d28af2982b4b5aac4a94336a..90dcab5e580856093cb2334fedafa9fb14ac9da0 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -1478,6 +1478,27 @@ page.open(url, function(status) {
 },
 
 // Incorrect BIP32 root key shows error
+function() {
+page.open(url, function(status) {
+    // set the root key
+    page.evaluate(function() {
+        $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpj").trigger("input");
+    });
+    // check there is an error shown
+    waitForFeedback(function() {
+        var feedback = page.evaluate(function() {
+            return $(".feedback").text();
+        });
+        if (feedback != "Invalid root key") {
+            console.log("Invalid root key does not show error");
+            console.log("Error: " + error);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Derivation path not starting with m shows error
 // Derivation path containing invalid characters shows useful error