aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-10-05 12:20:35 +1100
committerIan Coleman <coleman.ian@gmail.com>2016-10-05 12:20:35 +1100
commite3001539194016bb90790491a480e892152ac0e8 (patch)
tree686cd30ab913c3f8b6fb365ba904779d2006a5a7 /tests.js
parenta7becc4305fd0f0a35370a79870803afe7b34639 (diff)
downloadBIP39-e3001539194016bb90790491a480e892152ac0e8.tar.gz
BIP39-e3001539194016bb90790491a480e892152ac0e8.tar.zst
BIP39-e3001539194016bb90790491a480e892152ac0e8.zip
Test github issue 23: derivation path on bip32 tab
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js50
1 files changed, 49 insertions, 1 deletions
diff --git a/tests.js b/tests.js
index c09a8fd..557eaa7 100644
--- a/tests.js
+++ b/tests.js
@@ -1652,8 +1652,56 @@ page.open(url, function(status) {
1652}); 1652});
1653}, 1653},
1654 1654
1655// Github Issue 23: Use correct derivation path when changing tabs 1655// Github Issue 23: Part 1: Use correct derivation path when changing tabs
1656// https://github.com/dcpos/bip39/issues/23 1656// https://github.com/dcpos/bip39/issues/23
1657function() {
1658page.open(url, function(status) {
1659 // 1) and 2) set the phrase
1660 page.evaluate(function() {
1661 $(".phrase").val("abandon abandon ability").trigger("input");
1662 });
1663 waitForGenerate(function() {
1664 // 3) select bip32 tab
1665 page.evaluate(function() {
1666 $("#bip32-tab a").click();
1667 });
1668 waitForGenerate(function() {
1669 // 4) switch from bitcoin to litecoin
1670 page.evaluate(function() {
1671 $(".network").val("2").trigger("change");
1672 });
1673 waitForGenerate(function() {
1674 // 5) Check derivation path is displayed correctly
1675 var expected = "m/0/0";
1676 var actual = page.evaluate(function() {
1677 return $(".index:first").text();
1678 });
1679 if (actual != expected) {
1680 console.log("Github Issue 23 Part 1: derivation path display error");
1681 console.log("Expected: " + expected);
1682 console.log("Actual: " + actual);
1683 fail();
1684 }
1685 // 5) Check address is displayed correctly
1686 var expected = "LS8MP5LZ5AdzSZveRrjm3aYVoPgnfFh5T5";
1687 var actual = page.evaluate(function() {
1688 return $(".address:first").text();
1689 });
1690 if (actual != expected) {
1691 console.log("Github Issue 23 Part 1: address display error");
1692 console.log("Expected: " + expected);
1693 console.log("Actual: " + actual);
1694 fail();
1695 }
1696 next();
1697 });
1698 });
1699 });
1700});
1701},
1702
1703// Github Issue 23 Part 2: Coin selection in derivation path
1704// https://github.com/dcpos/bip39/issues/23#issuecomment-238011920
1657 1705
1658// Github Issue 26: When using a Root key derrived altcoins are incorrect 1706// Github Issue 26: When using a Root key derrived altcoins are incorrect
1659// https://github.com/dcpos/bip39/issues/26 1707// https://github.com/dcpos/bip39/issues/26