]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test incorrect word shows suggested replacement
authorIan Coleman <coleman.ian@gmail.com>
Thu, 29 Sep 2016 08:53:09 +0000 (18:53 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Thu, 29 Sep 2016 08:53:09 +0000 (18:53 +1000)
tests.js

index f76baf85adec70f5fdaf4f2a045aab96a81f7934..0176ba8a7eef7c34d28af2982b4b5aac4a94336a 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -1456,6 +1456,27 @@ page.open(url, function(status) {
 },
 
 // Incorrect word shows suggested replacement
+function() {
+page.open(url, function(status) {
+    // set the root key
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon abiliti").trigger("input");
+    });
+    // check there is a suggestion shown
+    waitForFeedback(function() {
+        var feedback = page.evaluate(function() {
+            return $(".feedback").text();
+        });
+        if (feedback.indexOf("did you mean ability?") < 0) {
+            console.log("Incorrect word does not show suggested replacement");
+            console.log("Error: " + error);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Incorrect BIP32 root key shows error
 // Derivation path not starting with m shows error
 // Derivation path containing invalid characters shows useful error