]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - tests.js
Test address table shows derivation path
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / tests.js
index 2c304f37d4dec0eb53d59a9a26c3d90efc28bcc7..83c99d9a0c3729d88692c9e0c548161e35efe18d 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -881,6 +881,30 @@ page.open(url, function(status) {
 },
 
 // Derivation path is shown in table
+function() {
+page.open(url, function(status) {
+    // set the phrase
+    var expected = "m/44'/0'/0'/0/0";
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+    });
+    // check for derivation path in table
+    waitForGenerate(function() {
+        var actual = page.evaluate(function() {
+            return $(".index:first").text();
+        });
+        if (actual != expected) {
+            console.log("Derivation path shown incorrectly in table");
+            console.log("Expected: " + expected);
+            console.log("Actual: " + actual);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Derivation path for address can be hardened
 // Derivation path visibility can be toggled
 // Address is shown