X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests.js;h=48e863b5f91759b7cb7b520e38bffc65d54011ed;hb=6ea15134a4ff5a443d96de5882bcddbe7300fc6f;hp=4d229abe2ff56ad7152cefe9c2010ce723ceb931;hpb=fef188cd1ed85b78e5f78d71e9c71f14e9e26448;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests.js b/tests.js index 4d229ab..48e863b 100644 --- a/tests.js +++ b/tests.js @@ -1562,6 +1562,31 @@ page.open(url, function(status) { }); }, +// Github pull request 48 +// First four letters of word shows that word, not closest +// since first four letters gives unique word in BIP39 wordlist +// eg ille should show illegal, not idle +function() { +page.open(url, function(status) { + // set the incomplete word + page.evaluate(function() { + $(".phrase").val("ille").trigger("input"); + }); + // check there is a suggestion shown + waitForFeedback(function() { + var feedback = page.evaluate(function() { + return $(".feedback").text(); + }); + if (feedback.indexOf("did you mean illegal?") < 0) { + console.log("Start of word does not show correct suggestion"); + console.log("Error: " + error); + fail(); + } + next(); + }); +}); +}, + // Incorrect BIP32 root key shows error function() { page.open(url, function(status) {