aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/tests.js')
-rw-r--r--tests/spec/tests.js295
1 files changed, 285 insertions, 10 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 56c259c..2add419 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -73,16 +73,23 @@ else if (browser == "chrome") {
73 73
74// Helper functions 74// Helper functions
75 75
76function testNetwork(done, params) { 76function testNetwork(done, params, comparePub = false) {
77 var phrase = params.phrase || 'abandon abandon ability'; 77 var phrase = params.phrase || 'abandon abandon ability';
78 driver.findElement(By.css('.phrase')) 78 driver.findElement(By.css('.phrase'))
79 .sendKeys(phrase); 79 .sendKeys(phrase);
80 selectNetwork(params.selectText); 80 selectNetwork(params.selectText);
81 driver.sleep(generateDelay).then(function() { 81 driver.sleep(generateDelay).then(function() {
82 getFirstAddress(function(address) { 82 if (!comparePub) {
83 expect(address).toBe(params.firstAddress); 83 getFirstAddress(function(address) {
84 done(); 84 expect(address).toBe(params.firstAddress);
85 }); 85 done();
86 });
87 } else {
88 getFirstPublicKey(function(pubkey) {
89 expect(pubkey).toBe(params.firstPubKey);
90 done();
91 });
92 }
86 }); 93 });
87} 94}
88 95
@@ -98,6 +105,10 @@ function getFirstAddress(handler) {
98 getFirstRowValue(handler, ".address"); 105 getFirstRowValue(handler, ".address");
99} 106}
100 107
108function getFirstPublicKey(handler) {
109 getFirstRowValue(handler, ".pubkey");
110}
111
101function getFirstPath(handler) { 112function getFirstPath(handler) {
102 getFirstRowValue(handler, ".index"); 113 getFirstRowValue(handler, ".index");
103} 114}
@@ -408,6 +419,13 @@ it('Allows selection of litecoin', function(done) {
408 }; 419 };
409 testNetwork(done, params); 420 testNetwork(done, params);
410}); 421});
422it('Allows selection of litecoin testnet', function(done) {
423 var params = {
424 selectText: "LTCt - Litecoin Testnet",
425 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi",
426 };
427 testNetwork(done, params);
428});
411it('Allows selection of ripple', function(done) { 429it('Allows selection of ripple', function(done) {
412 var params = { 430 var params = {
413 selectText: "XRP - Ripple", 431 selectText: "XRP - Ripple",
@@ -416,6 +434,14 @@ it('Allows selection of ripple', function(done) {
416 }; 434 };
417 testNetwork(done, params); 435 testNetwork(done, params);
418}); 436});
437it('Allows selection of casinocoin', function(done) {
438 var params = {
439 selectText: "CSC - CasinoCoin",
440 firstAddress: "c3P5EUb27Pzk9dcGt4s7zQDQj4sC6Y81mT",
441 phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
442 };
443 testNetwork(done, params);
444});
419it('Allows selection of dogecoin', function(done) { 445it('Allows selection of dogecoin', function(done) {
420 var params = { 446 var params = {
421 selectText: "DOGE - Dogecoin", 447 selectText: "DOGE - Dogecoin",
@@ -423,6 +449,13 @@ it('Allows selection of dogecoin', function(done) {
423 }; 449 };
424 testNetwork(done, params); 450 testNetwork(done, params);
425}); 451});
452it('Allows selection of dogecoin testnet', function(done) {
453 var params = {
454 selectText: "DOGEt - Dogecoin Testnet",
455 firstAddress: "niHnSJKHdwDyDxRMLBJrtNqpvHEsAFWe6B",
456 };
457 testNetwork(done, params);
458});
426it('Allows selection of denarius', function(done) { 459it('Allows selection of denarius', function(done) {
427 var params = { 460 var params = {
428 selectText: "DNR - Denarius", 461 selectText: "DNR - Denarius",
@@ -474,11 +507,18 @@ it('Allows selection of clam', function(done) {
474}); 507});
475it('Allows selection of crown', function(done) { 508it('Allows selection of crown', function(done) {
476 var params = { 509 var params = {
477 selectText: "CRW - Crown", 510 selectText: "CRW - Crown (Legacy)",
478 firstAddress: "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5", 511 firstAddress: "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5",
479 }; 512 };
480 testNetwork(done, params); 513 testNetwork(done, params);
481}); 514});
515it('Allows selection of crown', function(done) {
516 var params = {
517 selectText: "CRW - Crown",
518 firstAddress: "CRWKnVmVhvH1KWTYe6sq8xV4dFGcFpBEEkPQ",
519 };
520 testNetwork(done, params);
521});
482it('Allows selection of dash', function(done) { 522it('Allows selection of dash', function(done) {
483 var params = { 523 var params = {
484 selectText: "DASH - Dash", 524 selectText: "DASH - Dash",
@@ -521,6 +561,20 @@ it('Allows selection of onixcoin', function(done) {
521 }; 561 };
522 testNetwork(done, params); 562 testNetwork(done, params);
523}); 563});
564it('Allows selection of lkrcoin', function(done) {
565 var params = {
566 selectText: "LKR - Lkrcoin",
567 firstAddress: "LfbT296e7AEEnn4bYDbL535Nd8P9g98CdJ",
568 };
569 testNetwork(done, params);
570});
571it('Allows selection of bolivarcoin', function(done) {
572 var params = {
573 selectText: "BOLI - Bolivarcoin",
574 firstAddress: "bbKzCAUR7hZ3nqfffy7VgrSz8LmAP3S5mK",
575 };
576 testNetwork(done, params);
577});
524it('Allows selection of peercoin', function(done) { 578it('Allows selection of peercoin', function(done) {
525 var params = { 579 var params = {
526 selectText: "PPC - Peercoin", 580 selectText: "PPC - Peercoin",
@@ -557,6 +611,15 @@ it('Allows selection of bitcoin cash', function(done) {
557 }; 611 };
558 testNetwork(done, params); 612 testNetwork(done, params);
559}); 613});
614
615it('Allows selection of simpleledger(SLP)', function(done) {
616 var params = {
617 selectText: "SLP - Simple Ledger Protocol",
618 firstAddress: "simpleledger:qrtffz6ajfsn74gpur7y3epjquz42pvww5acewqmre",
619 };
620 testNetwork(done, params);
621});
622
560it('Allows selection of myriadcoin', function(done) { 623it('Allows selection of myriadcoin', function(done) {
561 var params = { 624 var params = {
562 selectText: "XMY - Myriadcoin", 625 selectText: "XMY - Myriadcoin",
@@ -585,6 +648,20 @@ it('Allows selection of maza', function(done) {
585 }; 648 };
586 testNetwork(done, params); 649 testNetwork(done, params);
587}); 650});
651it('Allows selection of FIX', function(done) {
652 var params = {
653 selectText: "FIX - FIX",
654 firstAddress: "FS5MEU8fs5dUvsaSCSusV8RQtC8j2h3JEh",
655 };
656 testNetwork(done, params);
657});
658it('Allows selection of FIX testnet', function(done) {
659 var params = {
660 selectText: "FIX - FIX Testnet",
661 firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
662 };
663 testNetwork(done, params);
664});
588it('Allows selection of fujicoin', function(done) { 665it('Allows selection of fujicoin', function(done) {
589 var params = { 666 var params = {
590 selectText: "FJC - Fujicoin", 667 selectText: "FJC - Fujicoin",
@@ -655,6 +732,13 @@ it('Allows selection of Asiacoin', function(done) {
655 }; 732 };
656 testNetwork(done, params); 733 testNetwork(done, params);
657}); 734});
735it('Allows selection of Aryacoin', function(done) {
736 var params = {
737 selectText: "ARYA - Aryacoin",
738 firstAddress: "Abr6gX25KaU9BpwD34UfsL3A4n89NvYYSf",
739 };
740 testNetwork(done, params);
741});
658it('Allows selection of Auroracoin', function(done) { 742it('Allows selection of Auroracoin', function(done) {
659 var params = { 743 var params = {
660 selectText: "AUR - Auroracoin", 744 selectText: "AUR - Auroracoin",
@@ -697,6 +781,13 @@ it('Allows selection of Bitcoin Private', function(done) {
697 }; 781 };
698 testNetwork(done, params); 782 testNetwork(done, params);
699}); 783});
784it('Allows selection of Bitcoin SV', function(done) {
785 var params = {
786 selectText: "BSV - BitcoinSV",
787 firstAddress: "1N4mgtE5yxifch9jWs7Sds6oVqxdy2t576",
788 };
789 testNetwork(done, params);
790});
700it('Allows selection of Bitcoinz', function(done) { 791it('Allows selection of Bitcoinz', function(done) {
701 var params = { 792 var params = {
702 selectText: "BTCZ - Bitcoinz", 793 selectText: "BTCZ - Bitcoinz",
@@ -760,6 +851,13 @@ it('Allows selection of Compcoin', function(done) {
760 }; 851 };
761 testNetwork(done, params); 852 testNetwork(done, params);
762}); 853});
854it('Allows selection of CPUchain', function(done) {
855 var params = {
856 selectText: "CPU - CPUchain",
857 firstAddress: "CWSpLpW7jS4mBHJnkz3mmL5s3yQMg93zK8",
858 };
859 testNetwork(done, params);
860});
763it('Allows selection of Crave', function(done) { 861it('Allows selection of Crave', function(done) {
764 var params = { 862 var params = {
765 selectText: "CRAVE - Crave", 863 selectText: "CRAVE - Crave",
@@ -823,6 +921,13 @@ it('Allows selection of Einsteinium', function(done) {
823 }; 921 };
824 testNetwork(done, params); 922 testNetwork(done, params);
825}); 923});
924it('Allows selection of EOSIO', function(done) {
925 var params = {
926 selectText: "EOS - EOSIO",
927 firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy",
928 };
929 testNetwork(done, params, true);
930});
826it('Allows selection of Europecoin', function(done) { 931it('Allows selection of Europecoin', function(done) {
827 var params = { 932 var params = {
828 selectText: "ERC - Europecoin", 933 selectText: "ERC - Europecoin",
@@ -984,6 +1089,13 @@ it('Allows selection of Navcoin', function(done) {
984 }; 1089 };
985 testNetwork(done, params); 1090 testNetwork(done, params);
986}); 1091});
1092it('Allows selection of Nebulas', function(done) {
1093 var params = {
1094 selectText: "NAS - Nebulas",
1095 firstAddress: "n1PbK61DGBfDoDusLw621G6sVSMfLLHdfnm",
1096 };
1097 testNetwork(done, params);
1098});
987it('Allows selection of Neoscoin', function(done) { 1099it('Allows selection of Neoscoin', function(done) {
988 var params = { 1100 var params = {
989 selectText: "NEOS - Neoscoin", 1101 selectText: "NEOS - Neoscoin",
@@ -991,6 +1103,13 @@ it('Allows selection of Neoscoin', function(done) {
991 }; 1103 };
992 testNetwork(done, params); 1104 testNetwork(done, params);
993}); 1105});
1106it('Allows selection of Nix', function(done) {
1107 var params = {
1108 selectText: "NIX - NIX Platform",
1109 firstAddress: "GgcNW2SQQXB4LWHRQTHKkQF3GzXNSLqS8u",
1110 };
1111 testNetwork(done, params);
1112});
994it('Allows selection of Neurocoin', function(done) { 1113it('Allows selection of Neurocoin', function(done) {
995 var params = { 1114 var params = {
996 selectText: "NRO - Neurocoin", 1115 selectText: "NRO - Neurocoin",
@@ -1033,6 +1152,13 @@ it('Allows selection of Omnicore', function(done) {
1033 }; 1152 };
1034 testNetwork(done, params); 1153 testNetwork(done, params);
1035}); 1154});
1155it('Allows selection of DeepOnion', function(done) {
1156 var params = {
1157 selectText: "ONION - DeepOnion",
1158 firstAddress: "DYREY7XCFXVqJ3x5UuN43k2JwD2s1kif48",
1159 };
1160 testNetwork(done, params);
1161});
1036it('Allows selection of Pesobit', function(done) { 1162it('Allows selection of Pesobit', function(done) {
1037 var params = { 1163 var params = {
1038 selectText: "PSB - Pesobit", 1164 selectText: "PSB - Pesobit",
@@ -1068,6 +1194,13 @@ it('Allows selection of Putincoin', function(done) {
1068 }; 1194 };
1069 testNetwork(done, params); 1195 testNetwork(done, params);
1070}); 1196});
1197it('Allows selection of Rapids', function(done) {
1198 var params = {
1199 selectText: "RPD - Rapids",
1200 firstAddress: "Ri8XxUdZaXS5LqxmFJcFEjFinkaMbmhSUp",
1201 };
1202 testNetwork(done, params);
1203});
1071it('Allows selection of Ravencoin', function(done) { 1204it('Allows selection of Ravencoin', function(done) {
1072 var params = { 1205 var params = {
1073 selectText: "RVN - Ravencoin", 1206 selectText: "RVN - Ravencoin",
@@ -1159,6 +1292,20 @@ it('Allows selection of Toa', function(done) {
1159 }; 1292 };
1160 testNetwork(done, params); 1293 testNetwork(done, params);
1161}); 1294});
1295it('Allows selection of TWINS', function(done) {
1296 var params = {
1297 selectText: "TWINS - TWINS",
1298 firstAddress: "WPpJnfLLubNmF7HLNxg8d8zH5haxn4wri8",
1299 };
1300 testNetwork(done, params);
1301});
1302it('Allows selection of TWINS testnet', function(done) {
1303 var params = {
1304 selectText: "TWINS - TWINS Testnet",
1305 firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa",
1306 };
1307 testNetwork(done, params);
1308});
1162it('Allows selection of Ultimatesecurecash', function(done) { 1309it('Allows selection of Ultimatesecurecash', function(done) {
1163 var params = { 1310 var params = {
1164 selectText: "USC - Ultimatesecurecash", 1311 selectText: "USC - Ultimatesecurecash",
@@ -1208,6 +1355,13 @@ it('Allows selection of Vpncoin', function(done) {
1208 }; 1355 };
1209 testNetwork(done, params); 1356 testNetwork(done, params);
1210}); 1357});
1358it('Allows selection of VeChain', function(done) {
1359 var params = {
1360 selectText: "VET - VeChain",
1361 firstAddress: "0xdba55B1B6070f3a733D5eDFf35F0da4A00E455F2",
1362 };
1363 testNetwork(done, params);
1364});
1211it('Allows selection of Whitecoin', function(done) { 1365it('Allows selection of Whitecoin', function(done) {
1212 var params = { 1366 var params = {
1213 selectText: "XWC - Whitecoin", 1367 selectText: "XWC - Whitecoin",
@@ -1243,9 +1397,9 @@ it('Allows selection of Zclassic', function(done) {
1243 }; 1397 };
1244 testNetwork(done, params); 1398 testNetwork(done, params);
1245}); 1399});
1246it('Allows selection of Zencash', function(done) { 1400it('Allows selection of Horizen', function(done) {
1247 var params = { 1401 var params = {
1248 selectText: "ZEN - Zencash", 1402 selectText: "ZEN - Horizen",
1249 firstAddress: "znWh9XASyW2dZq5tck84wFjiwuqVysi7q3p", 1403 firstAddress: "znWh9XASyW2dZq5tck84wFjiwuqVysi7q3p",
1250 }; 1404 };
1251 testNetwork(done, params); 1405 testNetwork(done, params);
@@ -1278,6 +1432,14 @@ it('Allows selection of MIX', function(done) {
1278 }; 1432 };
1279 testNetwork(done, params); 1433 testNetwork(done, params);
1280}); 1434});
1435it('Allows selection of Monkey Project', function(done) {
1436 var params = {
1437 selectText: "MONK - Monkey Project",
1438 firstAddress: "MnLrcnnUzKnf7TzufjRe5DLZqQJz18oYyu",
1439 };
1440 testNetwork(done, params);
1441});
1442
1281it('Allows selection of Musicoin', function(done) { 1443it('Allows selection of Musicoin', function(done) {
1282 var params = { 1444 var params = {
1283 selectText: "MUSIC - Musicoin", 1445 selectText: "MUSIC - Musicoin",
@@ -1308,11 +1470,18 @@ it('Allows selection of Callisto', function(done) {
1308}); 1470});
1309it('Allows selection of HUSH', function(done) { 1471it('Allows selection of HUSH', function(done) {
1310 var params = { 1472 var params = {
1311 selectText: "HUSH - Hush", 1473 selectText: "HUSH - Hush (Legacy)",
1312 firstAddress: "t1g6rLXUnJaiJuu4q4zmJjoa9Gk4fwKpiuA", 1474 firstAddress: "t1g6rLXUnJaiJuu4q4zmJjoa9Gk4fwKpiuA",
1313 }; 1475 };
1314 testNetwork(done, params); 1476 testNetwork(done, params);
1315}); 1477});
1478it('Allows selection of HUSH3', function(done) {
1479 var params = {
1480 selectText: "HUSH - Hush3",
1481 firstAddress: "RXWSQhwvw5jHPGP8bjwJhWoRnMLBnuPDKD",
1482 };
1483 testNetwork(done, params);
1484});
1316it('Allows selection of ExchangeCoin', function(done) { 1485it('Allows selection of ExchangeCoin', function(done) {
1317 var params = { 1486 var params = {
1318 selectText: "EXCC - ExchangeCoin", 1487 selectText: "EXCC - ExchangeCoin",
@@ -1355,6 +1524,90 @@ it('Allows selection of Phore', function(done) {
1355 }; 1524 };
1356 testNetwork(done, params); 1525 testNetwork(done, params);
1357}); 1526});
1527it('Allows selection of Safecoin', function(done) {
1528 var params = {
1529 selectText: "SAFE - Safecoin",
1530 firstAddress: "RtxHpnhJz6RY8k9owP3ua5QWraunmewB1G",
1531 };
1532 testNetwork(done, params);
1533 });
1534it('Allows selection of Blocknode', function(done) {
1535 var params = {
1536 selectText: "BND - Blocknode",
1537 firstAddress: "BG8xZSAur2jYLG9VXt8dYfkKxxeR7w9bSe",
1538 };
1539 testNetwork(done, params);
1540});
1541it('Allows selection of Blocknode Testnet', function(done) {
1542 var params = {
1543 selectText: "tBND - Blocknode Testnet",
1544 firstAddress: "bSptsFyDktFSKpWveRywJsDoJA2TC6qfHv",
1545 };
1546 testNetwork(done, params);
1547});
1548it('Allows selection of LitecoinZ', function(done) {
1549 var params = {
1550 selectText: "LTZ - LitecoinZ",
1551 firstAddress: "L1VTXju7hLgKV4T7fGXS9sKsnm2gmtRCmyw",
1552 };
1553 testNetwork(done, params);
1554});
1555it('Allows selection of BlockStamp', function(done) {
1556 var params = {
1557 selectText: "BST - BlockStamp",
1558 firstAddress: "15gypKtim4cVTj137ApfryG17RkvSbPazZ",
1559 };
1560 testNetwork(done, params);
1561});
1562it('Allows selection of DEXON', function(done) {
1563 var params = {
1564 selectText: "DXN - DEXON",
1565 firstAddress: "0x136a58788033E028CCd740FbDec6734358DB56Ec",
1566 };
1567 testNetwork(done, params);
1568});
1569it('Allows selection of Ellaism', function(done) {
1570 var params = {
1571 selectText: "ELLA - Ellaism",
1572 firstAddress: "0xa8B0BeA09eeBc41062308546a01d6E544277e2Ca",
1573 };
1574 testNetwork(done, params);
1575});
1576it('Allows selection of Ethersocial Network', function(done) {
1577 var params = {
1578 selectText: "ESN - Ethersocial Network",
1579 firstAddress: "0x6EE99Be2A0C7F887a71e21C8608ACF0aa0D2b767",
1580 };
1581 testNetwork(done, params);
1582});
1583it('Allows selection of Stellar', function(done) {
1584 var params = {
1585 selectText: "XLM - Stellar",
1586 firstAddress: "GCUK3NYYUXA2QGN6KU5RR36WAKN3Y5EANZV65XNAWN4XM4CHQ3G4DMO2",
1587 };
1588 testNetwork(done, params);
1589});
1590it('Allows selection of Wagerr', function(done) {
1591 var params = {
1592 selectText: "WGR - Wagerr",
1593 firstAddress: "WYiVgQU39VcQxcnacoCiaZHZZLjDCJoS95",
1594 };
1595 testNetwork(done, params);
1596});
1597it('Allows selection of Groestlcoin', function(done) {
1598 var params = {
1599 selectText: "GRS - Groestlcoin",
1600 firstAddress: "FZycsFvZ1eH1hbtyjBpAgJSukVw1bN6PBN",
1601 };
1602 testNetwork(done, params);
1603});
1604it('Allows selection of Groestlcoin Testnet', function(done) {
1605 var params = {
1606 selectText: "GRS - Groestlcoin Testnet",
1607 firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiygRPne9",
1608 };
1609 testNetwork(done, params);
1610});
1358 1611
1359// BIP39 seed is set from phrase 1612// BIP39 seed is set from phrase
1360it('Sets the bip39 seed from the prhase', function(done) { 1613it('Sets the bip39 seed from the prhase', function(done) {
@@ -1935,6 +2188,7 @@ it('Ignores excess whitespace in the mnemonic', function(done) {
1935 2188
1936// Github Issue 23: Part 1: Use correct derivation path when changing tabs 2189// Github Issue 23: Part 1: Use correct derivation path when changing tabs
1937// https://github.com/iancoleman/bip39/issues/23 2190// https://github.com/iancoleman/bip39/issues/23
2191// This test was failing for default timeout of 5000ms so changed it to +10s
1938it('Uses the correct derivation path when changing tabs', function(done) { 2192it('Uses the correct derivation path when changing tabs', function(done) {
1939 // 1) and 2) set the phrase 2193 // 1) and 2) set the phrase
1940 driver.findElement(By.css('.phrase')) 2194 driver.findElement(By.css('.phrase'))
@@ -1959,7 +2213,7 @@ it('Uses the correct derivation path when changing tabs', function(done) {
1959 }); 2213 });
1960 }); 2214 });
1961 }); 2215 });
1962}); 2216}, generateDelay + 10000);
1963 2217
1964// Github Issue 23 Part 2: Coin selection in derivation path 2218// Github Issue 23 Part 2: Coin selection in derivation path
1965// https://github.com/iancoleman/bip39/issues/23#issuecomment-238011920 2219// https://github.com/iancoleman/bip39/issues/23#issuecomment-238011920
@@ -3817,6 +4071,27 @@ it('Shows litecoin BIP49 addresses', function(done) {
3817 }); 4071 });
3818}); 4072});
3819 4073
4074it('Shows Groestlcoin BIP49 addresses', function(done) {
4075 driver.findElement(By.css('.phrase'))
4076 .sendKeys('abandon abandon ability');
4077 selectNetwork("GRS - Groestlcoin");
4078 driver.findElement(By.css('#bip49-tab a'))
4079 .click()
4080 // bip49 addresses are shown
4081 driver.sleep(generateDelay).then(function() {
4082 driver.findElement(By.css('#bip49 .available'))
4083 .getAttribute("class")
4084 .then(function(classes) {
4085 expect(classes).not.toContain("hidden");
4086 // check first address
4087 getFirstAddress(function(address) {
4088 expect(address).toBe("3HXSCZwCypLyixMsF4Z1sN49noJtrm8gnX");
4089 done();
4090 });
4091 });
4092 });
4093});
4094
3820it('Can use root keys to generate segwit table rows', function(done) { 4095it('Can use root keys to generate segwit table rows', function(done) {
3821 // segwit uses ypub / zpub instead of xpub but the root key should still 4096 // segwit uses ypub / zpub instead of xpub but the root key should still
3822 // be valid regardless of the encoding used to import that key. 4097 // be valid regardless of the encoding used to import that key.