From: Ian Coleman Date: Thu, 29 Sep 2016 08:53:09 +0000 (+1000) Subject: Test incorrect word shows suggested replacement X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=20f80cfa27452edfcc664e6fd514c474de02b2d4 Test incorrect word shows suggested replacement --- diff --git a/tests.js b/tests.js index f76baf8..0176ba8 100644 --- 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