X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests.js;h=a3c3f57956e3e810498fb22baa51a57a65687557;hb=b4fd763cebfb7f9497e12ca09b6271e1b39ac145;hp=4d229abe2ff56ad7152cefe9c2010ce723ceb931;hpb=9d33c8925dc07783e2cd819c91eee1144598fcf2;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests.js b/tests.js index 4d229ab..a3c3f57 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) { @@ -3266,6 +3291,79 @@ page.open(url, function(status) { }); }, +// Github issue 44 +// display error switching tabs while addresses are generating +function() { +page.open(url, function(status) { + // set the phrase + page.evaluate(function() { + $(".phrase").val("abandon abandon ability").trigger("input"); + }); + waitForGenerate(function() { + // set to generate 500 more addresses + // generate more addresses + // change tabs which should cancel the previous generating + page.evaluate(function() { + $(".rows-to-add").val("100"); + $(".more").click(); + $("#bip32-tab a").click(); + }); + // check the derivation paths are in order and of the right quantity + waitForGenerate(function() { + var paths = page.evaluate(function() { + return $(".index").map(function(i, e) { + return $(e).text(); + }); + }); + for (var i=0; i