diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-09-29 18:53:09 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-09-29 18:53:09 +1000 |
commit | 20f80cfa27452edfcc664e6fd514c474de02b2d4 (patch) | |
tree | 59518db6f42c72aa82b5809ff235cb034239f38c | |
parent | c3719b00d0d2d3295e18f3635166eded1c5a4328 (diff) | |
download | BIP39-20f80cfa27452edfcc664e6fd514c474de02b2d4.tar.gz BIP39-20f80cfa27452edfcc664e6fd514c474de02b2d4.tar.zst BIP39-20f80cfa27452edfcc664e6fd514c474de02b2d4.zip |
Test incorrect word shows suggested replacement
-rw-r--r-- | tests.js | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1456,6 +1456,27 @@ page.open(url, function(status) { | |||
1456 | }, | 1456 | }, |
1457 | 1457 | ||
1458 | // Incorrect word shows suggested replacement | 1458 | // Incorrect word shows suggested replacement |
1459 | function() { | ||
1460 | page.open(url, function(status) { | ||
1461 | // set the root key | ||
1462 | page.evaluate(function() { | ||
1463 | $(".phrase").val("abandon abandon abiliti").trigger("input"); | ||
1464 | }); | ||
1465 | // check there is a suggestion shown | ||
1466 | waitForFeedback(function() { | ||
1467 | var feedback = page.evaluate(function() { | ||
1468 | return $(".feedback").text(); | ||
1469 | }); | ||
1470 | if (feedback.indexOf("did you mean ability?") < 0) { | ||
1471 | console.log("Incorrect word does not show suggested replacement"); | ||
1472 | console.log("Error: " + error); | ||
1473 | fail(); | ||
1474 | } | ||
1475 | next(); | ||
1476 | }); | ||
1477 | }); | ||
1478 | }, | ||
1479 | |||
1459 | // Incorrect BIP32 root key shows error | 1480 | // Incorrect BIP32 root key shows error |
1460 | // Derivation path not starting with m shows error | 1481 | // Derivation path not starting with m shows error |
1461 | // Derivation path containing invalid characters shows useful error | 1482 | // Derivation path containing invalid characters shows useful error |