aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorxarakas <harilakas@gmail.com>2018-06-18 17:17:49 +0300
committerGitHub <noreply@github.com>2018-06-18 17:17:49 +0300
commit0f1cfea04ce101cd42213e621e41e17c3063f3d2 (patch)
tree8638e0cf4853ef7ec4e23f025a8aa742e2667218 /tests/spec
parentbb381a72ab07817e1216d5e12e2d4c5fc622d79b (diff)
parent9369eaa6d56500061c952927691e31cd503ae11c (diff)
downloadBIP39-0f1cfea04ce101cd42213e621e41e17c3063f3d2.tar.gz
BIP39-0f1cfea04ce101cd42213e621e41e17c3063f3d2.tar.zst
BIP39-0f1cfea04ce101cd42213e621e41e17c3063f3d2.zip
Merge branch 'master' into ethereum-like
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/tests.js61
1 files changed, 59 insertions, 2 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 250a720..0ffc73b 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -616,7 +616,7 @@ it('Allows selection of monacoin', function(done) {
616it('Allows selection of AXE', function(done) { 616it('Allows selection of AXE', function(done) {
617 var params = { 617 var params = {
618 selectText: "AXE - Axe", 618 selectText: "AXE - Axe",
619 firstAddress: "XQ4HLxUVS3egk5ff1o9e2vJFJKSSsUH3B7", 619 firstAddress: "PScwtLUyPiGrqtKXrHF37DGETLXLZdw4up",
620 }; 620 };
621 testNetwork(done, params); 621 testNetwork(done, params);
622}); 622});
@@ -1057,7 +1057,7 @@ it('Allows selection of Putincoin', function(done) {
1057it('Allows selection of Reddcoin', function(done) { 1057it('Allows selection of Reddcoin', function(done) {
1058 var params = { 1058 var params = {
1059 selectText: "RDD - Reddcoin", 1059 selectText: "RDD - Reddcoin",
1060 firstAddress: "1M4druAcUfkXBaAcQ4cCgCLPHChiaib6kL", 1060 firstAddress: "RtgRvXMBng1y51ftteveFqwNfyRG18HpxQ",
1061 }; 1061 };
1062 testNetwork(done, params); 1062 testNetwork(done, params);
1063}); 1063});
@@ -3692,4 +3692,61 @@ it('Does not show a warning if entropy is stronger than mnemonic length', functi
3692 }); 3692 });
3693}); 3693});
3694 3694
3695it('Shows a warning for litecoin BIP84 (which does not have p2wpkh params)', function(done) {
3696 driver.findElement(By.css('.phrase'))
3697 .sendKeys('abandon abandon ability');
3698 selectNetwork("LTC - Litecoin");
3699 driver.findElement(By.css('#bip84-tab a'))
3700 .click()
3701 // bip84 unavailable is shown
3702 driver.sleep(feedbackDelay).then(function() {
3703 driver.findElement(By.css('#bip84 .unavailable'))
3704 .getAttribute("class")
3705 .then(function(classes) {
3706 expect(classes).not.toContain("hidden");
3707 done();
3708 });
3709 });
3710});
3711
3712it('Shows litecoin BIP49 addresses', function(done) {
3713 driver.findElement(By.css('.phrase'))
3714 .sendKeys('abandon abandon ability');
3715 selectNetwork("LTC - Litecoin");
3716 driver.findElement(By.css('#bip49-tab a'))
3717 .click()
3718 // bip49 addresses are shown
3719 driver.sleep(generateDelay).then(function() {
3720 driver.findElement(By.css('#bip49 .available'))
3721 .getAttribute("class")
3722 .then(function(classes) {
3723 expect(classes).not.toContain("hidden");
3724 // check first address
3725 getFirstAddress(function(address) {
3726 expect(address).toBe("MFwLPhsXoBuSLL8cLmW9uK6tChkzduV8qN");
3727 done();
3728 });
3729 });
3730 });
3731});
3732
3733it('Can use root keys to generate segwit table rows', function(done) {
3734 // segwit uses ypub / zpub instead of xpub but the root key should still
3735 // be valid regardless of the encoding used to import that key.
3736 // Maybe this breaks the reason for the different extended key prefixes, but
3737 // since the parsed root key is used behind the scenes anyhow this should be
3738 // allowed.
3739 driver.findElement(By.css('#root-key'))
3740 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
3741 driver.findElement(By.css('#bip49-tab a'))
3742 .click()
3743 // bip49 addresses are shown
3744 driver.sleep(generateDelay).then(function() {
3745 getFirstAddress(function(address) {
3746 expect(address).toBe("3QG2Y9AA4xZ846gKHZqNf7mvVKbLqMKxr2");
3747 done();
3748 });
3749 });
3750});
3751
3695}); 3752});