aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-09-15 12:16:02 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-09-15 12:16:02 +1000
commitabfbe45086a2f1c3cd3e3ab5708812fdc26e1447 (patch)
tree65a56bad1722283eebf1cbeda15eacf78f2d0c3f
parentbc324fd228ded49d85d66604728fbd23de542e51 (diff)
downloadBIP39-abfbe45086a2f1c3cd3e3ab5708812fdc26e1447.tar.gz
BIP39-abfbe45086a2f1c3cd3e3ab5708812fdc26e1447.tar.zst
BIP39-abfbe45086a2f1c3cd3e3ab5708812fdc26e1447.zip
Test phrase is retained unless user confirms
-rw-r--r--tests.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 97cb646..7c67b02 100644
--- a/tests.js
+++ b/tests.js
@@ -1345,6 +1345,33 @@ page.open(url, function(status) {
1345}, 1345},
1346 1346
1347// Clearing of phrase, passphrase and seed can be cancelled by user 1347// Clearing of phrase, passphrase and seed can be cancelled by user
1348function() {
1349page.open(url, function(status) {
1350 var expected = "abandon abandon ability";
1351 // set a mnemonic
1352 page.evaluate(function() {
1353 $(".phrase").val("abandon abandon ability");
1354 });
1355 // Cancel any confirm dialogs
1356 page.onConfirm = function() {
1357 return false;
1358 };
1359 // set the root key
1360 page.evaluate(function() {
1361 $(".root-key").val("xprv9s21ZrQH143K3d3vzEDD3KpSKmxsZ3y7CqhAL1tinwtP6wqK4TKEKjpBuo6P2hUhB6ZENo7TTSRytiP857hBZVpBdk8PooFuRspE1eywwNZ").trigger("input");
1362 });
1363 var actual = page.evaluate(function() {
1364 return $(".phrase").val();
1365 });
1366 if (actual != expected) {
1367 console.log("Phrase not retained when cancelling changes to BIP32 root key");
1368 console.log("Expected: " + expected);
1369 console.log("Actual: " + actual);
1370 fail();
1371 }
1372 next();
1373});
1374},
1348// Custom BIP32 root key is used when changing the derivation path 1375// Custom BIP32 root key is used when changing the derivation path
1349 1376
1350// Incorrect mnemonic shows error 1377// Incorrect mnemonic shows error