diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-10-03 11:04:44 +1100 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-10-03 11:04:44 +1100 |
commit | 02f4a90ebb08b5b519c3f2cf8bf9616615820e45 (patch) | |
tree | 5af23d958d3ecd1358397df2d1e96cdc90d448df | |
parent | 20f80cfa27452edfcc664e6fd514c474de02b2d4 (diff) | |
download | BIP39-02f4a90ebb08b5b519c3f2cf8bf9616615820e45.tar.gz BIP39-02f4a90ebb08b5b519c3f2cf8bf9616615820e45.tar.zst BIP39-02f4a90ebb08b5b519c3f2cf8bf9616615820e45.zip |
Test incorrect root key shows error
-rw-r--r-- | tests.js | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1478,6 +1478,27 @@ page.open(url, function(status) { | |||
1478 | }, | 1478 | }, |
1479 | 1479 | ||
1480 | // Incorrect BIP32 root key shows error | 1480 | // Incorrect BIP32 root key shows error |
1481 | function() { | ||
1482 | page.open(url, function(status) { | ||
1483 | // set the root key | ||
1484 | page.evaluate(function() { | ||
1485 | $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpj").trigger("input"); | ||
1486 | }); | ||
1487 | // check there is an error shown | ||
1488 | waitForFeedback(function() { | ||
1489 | var feedback = page.evaluate(function() { | ||
1490 | return $(".feedback").text(); | ||
1491 | }); | ||
1492 | if (feedback != "Invalid root key") { | ||
1493 | console.log("Invalid root key does not show error"); | ||
1494 | console.log("Error: " + error); | ||
1495 | fail(); | ||
1496 | } | ||
1497 | next(); | ||
1498 | }); | ||
1499 | }); | ||
1500 | }, | ||
1501 | |||
1481 | // Derivation path not starting with m shows error | 1502 | // Derivation path not starting with m shows error |
1482 | // Derivation path containing invalid characters shows useful error | 1503 | // Derivation path containing invalid characters shows useful error |
1483 | 1504 | ||