X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=6718a0e99fcaa89dc717fed716b4e6c6ae8fd923;hb=1dafc30db4e65d9ef17db6ba884dc1603585599e;hp=f10f7a402a85e050fbffa74b47474aa9f527fd4b;hpb=9183f9f658222dc3a24c8b4794887b6ecd80ba1e;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index f10f7a4..6523ac5 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -30,9 +30,10 @@ var until = webdriver.until; var newDriver = null; var driver = null; // Delays in ms -var generateDelay = 1000; +var generateDelay = 1500; var feedbackDelay = 500; var entropyFeedbackDelay = 500; +var bip38delay = 15000; // url uses file:// scheme var path = require('path') @@ -78,10 +79,22 @@ function testNetwork(done, params) { .sendKeys(phrase); selectNetwork(params.selectText); driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe(params.firstAddress); - done(); - }); + getFirstAddress(function(address) { + getFirstPublicKey(function(pubkey) { + getFirstPrivateKey(function(privkey) { + if ("firstAddress" in params) { + expect(address).toBe(params.firstAddress); + } + if ("firstPubKey" in params) { + expect(pubkey).toBe(params.firstPubKey); + } + if ("firstPrivKey" in params) { + expect(privkey).toBe(params.firstPrivKey); + } + done(); + }); + }); + }); }); } @@ -97,6 +110,14 @@ function getFirstAddress(handler) { getFirstRowValue(handler, ".address"); } +function getFirstPublicKey(handler) { + getFirstRowValue(handler, ".pubkey"); +} + +function getFirstPrivateKey(handler) { + getFirstRowValue(handler, ".privkey"); +} + function getFirstPath(handler) { getFirstRowValue(handler, ".index"); } @@ -396,2227 +417,4502 @@ it('Allows a passphrase to be set', function(done) { it('Allows selection of bitcoin testnet', function(done) { var params = { selectText: "BTC - Bitcoin Testnet", + phrase: "abandon abandon ability", + firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx", + }; + testNetwork(done, params); +}); +it('Allows selection of bitcoin regtest', function(done) { + var params = { + selectText: "BTC - Bitcoin RegTest", + phrase: "abandon abandon ability", firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx", }; testNetwork(done, params); }); it('Allows selection of litecoin', function(done) { var params = { selectText: "LTC - Litecoin", + phrase: "abandon abandon ability", firstAddress: "LQ4XU8RX2ULPmPq9FcUHdVmPVchP9nwXdn", + firstPubKey: "028e27f074a8f4b85c07f944330bd59ec1b2dd7f88bb28182720cab6d2a5a5ff30", + firstPrivKey: "T9ShR6Z2vyEMHVgpeoif857LdMUZDKvzux3QMvD4EjpPYUV5TuEx", + }; + testNetwork(done, params); +}); +it('Allows selection of litecoin testnet', function(done) { + var params = { + selectText: "LTCt - Litecoin Testnet", + phrase: "abandon abandon ability", + firstAddress: "mucaU5iiDaJDb69BHLeDv8JFfGiyg2nJKi", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx", }; testNetwork(done, params); }); it('Allows selection of ripple', function(done) { var params = { selectText: "XRP - Ripple", + 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", firstAddress: "rLTFnqbmCVPGx6VfaygdtuKWJgcN4v1zRS", + firstPubKey: "0393ebfc2f75dd5757456a7ff7b907571693c9e3807ea386be68688b9c5fac072e", + firstPrivKey: "a869f16215c3cd7b6c5f448344bc8688cba70b734bbe189b2c48098a2c15dd53", + }; + testNetwork(done, params); +}); +it('Allows selection of casinocoin', function(done) { + var params = { + selectText: "CSC - CasinoCoin", 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", + firstAddress: "c3P5EUb27Pzk9dcGt4s7zQDQj4sC6Y81mT", + firstPubKey: "038ca5b4ff9d58059423b5a03deb2a9b755a311e97dc36ae8ab3d4ed93c808daf7", + firstPrivKey: "127fa93d8e4f434ce76faebc961df7ec081a68de19e96f36d38766e468b35920", }; testNetwork(done, params); }); it('Allows selection of dogecoin', function(done) { var params = { selectText: "DOGE - Dogecoin", + phrase: "abandon abandon ability", firstAddress: "DPQH2AtuzkVSG6ovjKk4jbUmZ6iXLpgbJA", + firstPubKey: "02d3d540cc62d5102887d26f2b129947f2bd2306dd9b76242c61ca65e5ca408899", + firstPrivKey: "QNv5TAoR6EodkN86FXaLDosy4Rau4sJ46JxE9NtUYtmKPLTuRmpc", + }; + testNetwork(done, params); +}); +it('Allows selection of dogecoin testnet', function(done) { + var params = { + selectText: "DOGEt - Dogecoin Testnet", + phrase: "abandon abandon ability", + firstAddress: "niHnSJKHdwDyDxRMLBJrtNqpvHEsAFWe6B", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cnCsx3G1NgXZGhijCRNupM1tts1aDNnQsr9e5jB5JnYv2yEDTwT5", + }; + testNetwork(done, params); +}); +it('Allows selection of denarius', function(done) { + var params = { + selectText: "DNR - Denarius", + phrase: "abandon abandon ability", + firstAddress: "DFdFMVUMzU9xX88EywXvAGwjiwpxyh9vKb", + firstPubKey: "0285cda45afbf0b8897a5cedf97cbb1e2b63b0ac28cd1e919ea60fb748bc61e8d5", + firstPrivKey: "QX3Dy3b7C3vNWYDBPk8Hewp3ii2NukAopsHFCCsLZ6Ss77vzdoMj", }; testNetwork(done, params); }); it('Allows selection of shadowcash', function(done) { var params = { selectText: "SDC - ShadowCash", + phrase: "abandon abandon ability", firstAddress: "SiSZtfYAXEFvMm3XM8hmtkGDyViRwErtCG", + firstPubKey: "024d48659b83ff20fc250e7f111742e652aa71b73f3ff8d41b5f3ea99cb8ef9e3c", + firstPrivKey: "VJzJ98j5pdjzpY9DVRvU2RiRcvQ4t2oYYd9w9WUdiUJjvPs9X83v", }; testNetwork(done, params); }); it('Allows selection of shadowcash testnet', function(done) { var params = { selectText: "SDC - ShadowCash Testnet", + phrase: "abandon abandon ability", firstAddress: "tM2EDpVKaTiEg2NZg3yKg8eqjLr55BErHe", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "erKhxJJbpqMUuwuUwUuQxnLiNwphuEabA2sTv62QBV6syc1coTeS", }; testNetwork(done, params); }); it('Allows selection of viacoin', function(done) { var params = { selectText: "VIA - Viacoin", + phrase: "abandon abandon ability", firstAddress: "Vq9Eq4N5SQnjqZvxtxzo7hZPW5XnyJsmXT", + firstPubKey: "0223abcae630e23afd7ce0dc399906ca00f984b3be475fbf3f3995e708b0b75392", + firstPrivKey: "WX5sbp26uyFDa4Bt5DgPqvQuRjrwc95DYzG7ZHXsdtooFAUhd3xV", }; testNetwork(done, params); }); it('Allows selection of viacoin testnet', function(done) { var params = { selectText: "VIA - Viacoin Testnet", + phrase: "abandon abandon ability", firstAddress: "tM2EDpVKaTiEg2NZg3yKg8eqjLr55BErHe", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "erKhxJJbpqMUuwuUwUuQxnLiNwphuEabA2sTv62QBV6syc1coTeS", }; testNetwork(done, params); }); it('Allows selection of jumbucks', function(done) { var params = { selectText: "JBS - Jumbucks", + phrase: "abandon abandon ability", firstAddress: "JLEXccwDXADK4RxBPkRez7mqsHVoJBEUew", + firstPubKey: "02e9e84c68e2247d87c863f5697676af9c0f2dacc3fe774a24188f37311b679059", + firstPrivKey: "SPcmbuyWp5ukQLbnDyaVr8WuPfmLUEVZN9e2r7X96i31twrn8BBQ", }; testNetwork(done, params); }); it('Allows selection of clam', function(done) { var params = { selectText: "CLAM - Clams", + phrase: "abandon abandon ability", firstAddress: "xCp4sakjVx4pUAZ6cBCtuin8Ddb6U1sk9y", + firstPubKey: "03f6189ef4ae7f15ead1a579201c63845cf3efc4745d6abf58aa5584163b2dd070", + firstPrivKey: "LoqdpeyYzFoGqQag6Ya4BkMT9KQJK1ygQFbKj3x2meaWe6Xzen15", }; testNetwork(done, params); }); it('Allows selection of crown', function(done) { var params = { - selectText: "CRW - Crown", + selectText: "CRW - Crown (Legacy)", + phrase: "abandon abandon ability", firstAddress: "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5", + firstPubKey: "034246d561c53eb1a2afbd9df6403d6fd8a70b36016e0307eae28095a465eaa602", + firstPrivKey: "L2oSEFimb9QJB38eGD1xL8zKZAa1cTYGFGXMi4yJBqKmYvpjcuJs", + }; + testNetwork(done, params); +}); +it('Allows selection of crown', function(done) { + var params = { + selectText: "CRW - Crown", + phrase: "abandon abandon ability", + firstAddress: "CRWKnVmVhvH1KWTYe6sq8xV4dFGcFpBEEkPQ", + firstPubKey: "034246d561c53eb1a2afbd9df6403d6fd8a70b36016e0307eae28095a465eaa602", + firstPrivKey: "L2oSEFimb9QJB38eGD1xL8zKZAa1cTYGFGXMi4yJBqKmYvpjcuJs", }; testNetwork(done, params); }); it('Allows selection of dash', function(done) { var params = { selectText: "DASH - Dash", + phrase: "abandon abandon ability", firstAddress: "XdbhtMuGsPSkE6bPdNTHoFSszQKmK4S5LT", + firstPubKey: "0270009f37337f15603103ce90111f32f44ddd87525017a93ec6170abb784be2ff", + firstPrivKey: "XGqEiiVo1w6Us3YN8KRthyLxdnBH1W6JpLkcxoX2w2zQMYFDKSua", }; testNetwork(done, params); }); it('Allows selection of dash testnet', function(done) { var params = { selectText: "DASH - Dash Testnet", + phrase: "abandon abandon ability", firstAddress: "yaR52EN4oojdJfBgzWJTymC4uuCLPT29Gw", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx", }; testNetwork(done, params); }); it('Allows selection of game', function(done) { var params = { selectText: "GAME - GameCredits", + phrase: "abandon abandon ability", firstAddress: "GSMY9bAp36cMR4zyT4uGVS7GFjpdXbao5Q", + firstPubKey: "03d173ea00b6688f7d7c2afdcbc720b227aa8b9b87e5f7145139acaa9f0a0dc447", + firstPrivKey: "Raixm9wAKFjw9rnPKcXkymQ5iEdMZBRdrvjm8zLpqacS7LUeXBwZ", + }; + testNetwork(done, params); +}); +it('Allows selection of komodo', function(done) { + var params = { + selectText: "KMD - Komodo", + phrase: "abandon abandon ability", + firstAddress: "RMPPzJwAjPVZZAwJvXivHJGGjdCx6WBD2t", + firstPubKey: "03bd652582a446ce9a697e74da9429eabe6e70bbe3d300b9ef227df7430e83b6fc", + firstPrivKey: "UxHzU8KCfSDrQgreujv1vGrqpbvx5jrjSz7bNWjWoT7D3V4uWo4i", }; testNetwork(done, params); }); it('Allows selection of namecoin', function(done) { var params = { selectText: "NMC - Namecoin", + phrase: "abandon abandon ability", firstAddress: "Mw2vK2Bvex1yYtYF6sfbEg2YGoUc98YUD2", + firstPubKey: "0398066486fe87cbcb9da8e29d180b44937b6c43ad1ec4d3bddd77b7905765937e", + firstPrivKey: "L4A8sSkrGndiXyZdj6Fnju8Wu76s96cdHHmPxV3C5M2R2w4GVNco", + }; + testNetwork(done, params); +}); +it('Allows selection of onixcoin', function(done) { + var params = { + selectText: "ONX - Onixcoin", + phrase: "abandon abandon ability", + firstAddress: "XGwMqddeKjT3ddgX73QokjVbCL3aK6Yxfk", + firstPubKey: "035349f2912e3290898d6e00807704254f256127e59a2930367c403b3b9ae5afbd", + firstPrivKey: "X8hzuyWvi2F6UQQ5MNiQo2taYwKwZvJRurTBV6smahx2ikLksLPm", + }; + testNetwork(done, params); +}); +it('Allows selection of lkrcoin', function(done) { + var params = { + selectText: "LKR - Lkrcoin", + phrase: "abandon abandon ability", + firstAddress: "LfbT296e7AEEnn4bYDbL535Nd8P9g98CdJ", + firstPubKey: "03328d3800456372224ec54b033ace88bfd4c19a684204147404063839a02ab7e8", + firstPrivKey: "TANp1xRA3qCdRfZc8THM8HMKZivevNz8BEXmA8YxemqXj1YzHmDS", + }; + testNetwork(done, params); +}); +it('Allows selection of bolivarcoin', function(done) { + var params = { + selectText: "BOLI - Bolivarcoin", + phrase: "abandon abandon ability", + firstAddress: "bbKzCAUR7hZ3nqfffy7VgrSz8LmAP3S5mK", + firstPubKey: "0328a72574c709cc183ffccb8f17c0383caf937ce67e7c3411cdf8ca2e5fc2bf8f", + firstPrivKey: "YYwA99QgwZu9zNJBxYbG43GzeE8kEREb7S1dpnFcBJG1W5sR1W9T", }; testNetwork(done, params); }); it('Allows selection of peercoin', function(done) { var params = { selectText: "PPC - Peercoin", + phrase: "abandon abandon ability", firstAddress: "PVAiioTaK2eDHSEo3tppT9AVdBYqxRTBAm", + firstPubKey: "02035b1d7f7683a03be1a6009c4572b24a3ba114afb8caff278881af77c4cba362", + firstPrivKey: "UCcQgeBjh7GpqukSRcXrx54Q41BJYkWY6PSdm6CtCUFYD5bS9qZS", }; testNetwork(done, params); }); it('Allows selection of ethereum', function(done) { var params = { selectText: "ETH - Ethereum", + phrase: "abandon abandon ability", firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772", + firstPubKey: "0x03e723e5b3aa7d72213f01139aa4783e1b34f74e1a04534e3fd8e29bfe2768af8a", + firstPrivKey: "0x8f253078b73d7498302bb78c171b23ce7a8fb511987d2b2702b731638a4a15e7", }; testNetwork(done, params); - // TODO test private key and public key }); it('Allows selection of slimcoin', function(done) { var params = { selectText: "SLM - Slimcoin", + phrase: "abandon abandon ability", firstAddress: "SNzPi1CafHFm3WWjRo43aMgiaEEj3ogjww", + firstPubKey: "020c3ab49a6de010d23ddf14dec67666d7ad46dafbae9841db7723bbb0044067cc", + firstPrivKey: "BTPTMvgoTgsAxpoQE4VCJAq5TYMnLbX5mDodFSaF7ceq6suK13pk", }; testNetwork(done, params); }); it('Allows selection of slimcoin testnet', function(done) { var params = { selectText: "SLM - Slimcoin Testnet", + phrase: "abandon abandon ability", firstAddress: "n3nMgWufTek5QQAr6uwMhg5xbzj8xqc4Dq", + firstPubKey: "024557a9693da0354c5f77e57a0b2aac9c20b15cc322bec85faa2ec45438415c90", + firstPrivKey: "DvJeEkHzJzysYFtUdgETgWHprG63ATFWRtG2R9xfBJ6bZ2fHcJSU", }; testNetwork(done, params); }); it('Allows selection of bitcoin cash', function(done) { var params = { selectText: "BCH - Bitcoin Cash", - firstAddress: "1JKvb6wKtsjNoCRxpZ4DGrbniML7z5U16A", + phrase: "abandon abandon ability", + firstAddress: "bitcoincash:qzlquk7w4hkudxypl4fgv8x279r754dkvur7jpcsps", + firstPubKey: "02b1cbe8aba996d77d4c33fa2e3bf1f6ae80576aa587aa74d87092b1dbdf2aa067", + firstPrivKey: "KxbCheZjSzF48zyka4QK1ToSYmz3REZiePU6FPc99qqFs8WuHyVY", + }; + testNetwork(done, params); +}); + +it('Allows selection of simpleledger(SLP)', function(done) { + var params = { + selectText: "SLP - Simple Ledger Protocol", + phrase: "abandon abandon ability", + firstAddress: "simpleledger:qrtffz6ajfsn74gpur7y3epjquz42pvww5acewqmre", + firstPubKey: "03c8310ef78a379ce91ed3d7998e1f356dbcb089869f9c9d8f8571b0d8414acbdc", + firstPrivKey: "L2q3Bvqe6kBRSqUaJpew7pLacnWjsJdUk7hwV1bTdDu665gXHDj6", }; testNetwork(done, params); }); + it('Allows selection of myriadcoin', function(done) { var params = { selectText: "XMY - Myriadcoin", + phrase: "abandon abandon ability", firstAddress: "MJEswvRR46wh9BoiVj9DzKYMBkCramhoBV", + firstPubKey: "037ad798b3173b0af46acddd1501ed53ce654840f29e4710c3081134b1193f811b", + firstPrivKey: "TMMUiQ3yqes7wjWvCro1Ghbu7eFXm8wQgX89v4Wgxm5qFZJAVEVD", }; testNetwork(done, params); }); it('Allows selection of pivx', function(done) { var params = { selectText: "PIVX - PIVX", + phrase: "abandon abandon ability", firstAddress: "DBxgT7faCuno7jmtKuu6KWCiwqsVPqh1tS", + firstPubKey: "022583478df6a5ac35380e7cdcd9f7ab0d43f5eb82452d4aa1f74f04c810fcde8c", + firstPrivKey: "YVdYDdkuTbra4EVRLWoBUCCm9WMLuXZy3ZpK6iDBCi13ttreZ4cD", }; testNetwork(done, params); }); it('Allows selection of pivx testnet', function(done) { var params = { selectText: "PIVX - PIVX Testnet", + phrase: "abandon abandon ability", firstAddress: "yB5U384n6dGkVE3by5y9VdvHHPwPg68fQj", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx", }; testNetwork(done, params); }); it('Allows selection of maza', function(done) { var params = { selectText: "MAZA - Maza", + phrase: "abandon abandon ability", firstAddress: "MGW4Bmi2NEm4PxSjgeFwhP9vg18JHoRnfw", + firstPubKey: "022b9d4376588a736d43301a659ef288302472aeff6344f5d8a5bfe376733e0da8", + firstPrivKey: "aH9R7KaHm6D3p44zDM2Vf6vY9x7bHVdaZGkBb2rHeXAZzEKnQ66G", + }; + testNetwork(done, params); +}); +it('Allows selection of FIX', function(done) { + var params = { + selectText: "FIX - FIX", + phrase: "abandon abandon ability", + firstAddress: "FS5MEU8fs5dUvsaSCSusV8RQtC8j2h3JEh", + firstPubKey: "026003e9a2bc6b9bd18bd7f8826cebbfd4d0554995141920eda2cb723ae53337ee", + firstPrivKey: "9uFsoZFuCUCMRF93aNKsLvYTX8jwYoKPbgENtdYURH1GCJvDNkps", + }; + testNetwork(done, params); +}); +it('Allows selection of FIX testnet', function(done) { + var params = { + selectText: "FIX - FIX Testnet", + phrase: "abandon abandon ability", + firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa", + firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0", + firstPrivKey: "cBtMfPpQg4s1Ndfez7oLdedwu8CxshhWE5f7qunhLsY4ueNvKKyM", }; testNetwork(done, params); }); it('Allows selection of fujicoin', function(done) { var params = { selectText: "FJC - Fujicoin", + phrase: "abandon abandon ability", firstAddress: "FgiaLpG7C99DyR4WnPxXedRVHXSfKzUDhF", + firstPubKey: "022b41c7ecbae94c0c926dda9304ccf6e6b22f6f6879e2fc52823b154d118a290e", + firstPrivKey: "RMFbyVXUF5Ndji4H75jXrnXi9KH6QFKgA6zDfuisa57BrHCN8MSG", }; testNetwork(done, params); }); it('Allows selection of nubits', function(done) { var params = { selectText: "USNBT - NuBits", + phrase: "abandon abandon ability", firstAddress: "BLxkabXuZSJSdesLD7KxZdqovd4YwyBTU6", + firstPubKey: "03a37da71e839af0e3fc7cef0f3a82fbff64e372eb7fd067dc452d13b7b269e858", + firstPrivKey: "PJ9vZVjQWXNQDbfZbmFiDTcUGpJHiWc923LcX7oKSYHuLRvWhdJ3", }; testNetwork(done, params); }); it('Allows selection of bitcoin gold', function(done) { var params = { selectText: "BTG - Bitcoin Gold", - firstAddress: "GWYxuwSqANWGV3WT7Gpr6HE91euYXBqtwQ", + phrase: "abandon abandon ability", + firstAddress: "GdDqug4WUsn5syNbSTHatNn4XnuwZtzedx", + firstPubKey: "02e48e4053db573bb74fb67a47c91443ec7c0ed5f3f25aa8a408bad798f0230086", + firstPrivKey: "KwxCxhXq72JzuDNEj2VzzjKr1XU4tvpuksdEKBhngFuSEK8XWCBa", }; testNetwork(done, params); }); it('Allows selection of monacoin', function(done) { var params = { selectText: "MONA - Monacoin", + phrase: "abandon abandon ability", firstAddress: "MKMiMr7MyjDKjJbCBzgF6u4ByqTS4NkRB1", + firstPubKey: "020b104320aaeb1ec921874e96cafd5add3c0de8d785cd01dc93e5f2b31fa352f4", + firstPrivKey: "T45jYrkbSutUvNF1cytpmbvyLR7qWWEXg5r7udj4mqrauzEsxHAG", }; testNetwork(done, params); }); - -// BIP39 seed is set from phrase -it('Sets the bip39 seed from the prhase', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.seed')) - .getAttribute("value") - .then(function(seed) { - expect(seed).toBe("20da140d3dd1df8713cefcc4d54ce0e445b4151027a1ab567b832f6da5fcc5afc1c3a3f199ab78b8e0ab4652efd7f414ac2c9a3b81bceb879a70f377aa0a58f3"); - done(); - }) - }); +it('Allows selection of AXE', function(done) { + var params = { + selectText: "AXE - Axe", + phrase: "abandon abandon ability", + firstAddress: "PScwtLUyPiGrqtKXrHF37DGETLXLZdw4up", + firstPubKey: "0288ea360af543ff72c79560f9f0ed8ed5386681fc3cc5edc84921c1118d989bce", + firstPrivKey: "XJKs1GN3sABamT6daKdRSjBgE2XPrnwBurWyBSVJht6zv5kS2dZd", + }; + testNetwork(done, params); }); - -// BIP32 root key is set from phrase -it('Sets the bip39 root key from the prhase', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.root-key')) - .getAttribute("value") - .then(function(seed) { - expect(seed).toBe("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi"); - done(); - }) - }); +it('Allows selection of BlackCoin', function(done) { + var params = { + selectText: "BLK - BlackCoin", + phrase: "abandon abandon ability", + firstAddress: "B5MznAKwj7uQ42vDz3w4onhBXPcqhTwJ9z", + firstPubKey: "03f500b73bad9955fbe26a27bbeefa4ec00119532449eeccfb1f021cafa638d046", + firstPrivKey: "Piyy1AGXZ9wRJdiUMPm97WAmN1DHvSxtjCpkYrtX2qyvc4huUxe9", + }; + testNetwork(done, params); }); - -// Tabs show correct addresses when changed -it('Shows the correct address when tab is changed', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("17uQ7s2izWPwBmEVFikTmZUjbBKWYdJchz"); - done(); - }); - }); - }); +it('Allows selection of Neblio', function(done) { + var params = { + selectText: "NEBL - Neblio", + phrase: "abandon abandon ability", + firstAddress: "NefkeEEvhusbHMmTRrxx7H9wFnUXd8qQsE", + firstPubKey: "0274d827c4aef5b009e0c5ddd3c852a9a0bd91cb37cfb72a5f07d570e4ce7e1569", + firstPrivKey: "TpEwnrinfiH7AMDJLvFzNoW1duU2rg7hox6tgF4wMmcnQSmNmQZM", + }; + testNetwork(done, params); }); - -// BIP44 derivation path is shown -it('Shows the derivation path for bip44 tab', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('#bip44 .path')) - .getAttribute("value") - .then(function(path) { - expect(path).toBe("m/44'/0'/0'/0"); - done(); - }) - }); +it('Allows selection of Beetlecoin', function(done) { + var params = { + selectText: "BEET - Beetlecoin", + phrase: "abandon abandon ability", + firstAddress: "BVmtbEsGrjpknprmpHFq26z4kYHJUFHE71", + firstPubKey: "03e8e78daa2d96e390b55426d6b4cad887bdc028a394847308ad4910d00875b04c", + firstPrivKey: "Pkb5yU9mK1CzSQuYKm6CYmaJxDEiycipm426F3EhYtHPJdBJxViG", + }; + testNetwork(done, params); }); - -// BIP44 extended private key is shown -it('Shows the extended private key for bip44 tab', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.extended-priv-key')) - .getAttribute("value") - .then(function(path) { - expect(path).toBe("xprvA2DxxvPZcyRvYgZMGS53nadR32mVDeCyqQYyFhrCVbJNjPoxMeVf7QT5g7mQASbTf9Kp4cryvcXnu2qurjWKcrdsr91jXymdCDNxKgLFKJG"); - done(); - }) - }); +it('Allows selection of Adcoin', function(done) { + var params = { + selectText: "ACC - Adcoin", + phrase: "abandon abandon ability", + firstAddress: "AcEDM6V5sF4kFHC76MJjjfProtS5Sw2qcd", + firstPubKey: "026625ec7d1b747bd361a57c593fd8384fcdc65696aed5b72f64e73dbf2b24e854", + firstPrivKey: "T4B9YVUonpM7tQQEkqv4QjMxWJqxyqcJt78H7XqsRXRvuvd2XGog", + }; + testNetwork(done, params); }); - -// BIP44 extended public key is shown -it('Shows the extended public key for bip44 tab', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.extended-pub-key')) - .getAttribute("value") - .then(function(path) { - expect(path).toBe("xpub6FDKNRvTTLzDmAdpNTc49ia9b4byd6vqCdUa46Fp3vqMcC96uBoufCmZXQLiN5AK3iSCJMhf9gT2sxkpyaPepRuA7W3MujV5tGmF5VfbueM"); - done(); - }) - }); +it('Allows selection of Asiacoin', function(done) { + var params = { + selectText: "AC - Asiacoin", + phrase: "abandon abandon ability", + firstAddress: "ALupuEEz7kJjQTAvmtcBMBVuEjPa7GqZzE", + firstPubKey: "0338b40a58e69c087f5092223555c1ce48988e5b2b6bb15f42d881109aa1499d39", + firstPrivKey: "PNRyYtznRQBbD3GNCt86uHdWEHyeFr7ZszqckXCt7ZXEcRF29Z4X", + }; + testNetwork(done, params); }); - -// BIP44 account field changes address list -it('Changes the address list if bip44 account is changed', function(done) { - driver.findElement(By.css('#bip44 .account')) - .sendKeys('1'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H"); - done(); - }); - }); +it('Allows selection of Aryacoin', function(done) { + var params = { + selectText: "ARYA - Aryacoin", + phrase: "abandon abandon ability", + firstAddress: "Abr6gX25KaU9BpwD34UfsL3A4n89NvYYSf", + firstPubKey: "03973c0669f332a69e8f0661ffddc7fd86dd7fdb768a40608fcbf0efceebf900e0", + firstPrivKey: "PNukdY6bBGJhFDnJGeRFrJ5ptj3WD1xZHbPv8ubjMknFz2L6sZFi", + }; + testNetwork(done, params); }); - -// BIP44 change field changes address list -it('Changes the address list if bip44 change is changed', function(done) { - driver.findElement(By.css('#bip44 .change')) - .sendKeys('1'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("1KAGfWgqfVbSSXY56fNQ7YnhyKuoskHtYo"); - done(); - }); - }); +it('Allows selection of Auroracoin', function(done) { + var params = { + selectText: "AUR - Auroracoin", + phrase: "abandon abandon ability", + firstAddress: "ANuraS6F4Jpi413FEnavjYkKYJJRHkgYCm", + firstPubKey: "03f843b9258aa001f24ebe3a77b6746a20ffda9f60934da8ed44f83d081977fe4b", + firstPrivKey: "PQyDA9ewjeMNvNy6ZaUEWVwTNHFPp2J3F131msPx4XFNgMuKMaXF", + }; + testNetwork(done, params); }); - -// BIP32 derivation path can be set -it('Can use a custom bip32 derivation path', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('#bip32 .path')) - .clear(); - driver.findElement(By.css('#bip32 .path')) - .sendKeys('m/1'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("16pYQQdLD1hH4hwTGLXBaZ9Teboi1AGL8L"); - done(); - }); - }); +it('Allows selection of Bata', function(done) { + var params = { + selectText: "BTA - Bata", + phrase: "abandon abandon ability", + firstAddress: "BGxBdNeYPtF3GCuTtZBPQdFxCkdBYSF3fj", + firstPubKey: "033f35cba191c80f5246113ef33cd8a1e2449d304ad25afbd25e86aff333f07472", + firstPrivKey: "RKbjo1gnyFsuEimVGGybBfbvcp6fCCY35D9SY38xLAwrSrQ3B5v9", + }; + testNetwork(done, params); }); - -// BIP32 can use hardened derivation paths -it('Can use a hardened derivation paths', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('#bip32 .path')) - .clear(); - driver.findElement(By.css('#bip32 .path')) - .sendKeys("m/0'"); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("14aXZeprXAE3UUKQc4ihvwBvww2LuEoHo4"); - done(); - }); - }); +it('Allows selection of Belacoin', function(done) { + var params = { + selectText: "BELA - Belacoin", + phrase: "abandon abandon ability", + firstAddress: "BEeetqpNffdzeknSpNmQp5KAFh2KK1Qx7S", + firstPubKey: "039d895165f9c8218c12499820b783d920b632b49b0ca70b9352171b2f4273bf0b", + firstPrivKey: "PeicG333UdMZ1t5PoHCt2Yepc7X15wHPawvsusWWspKCw99Dfqmx", + }; + testNetwork(done, params); }); - -// BIP32 extended private key is shown -it('Shows the BIP32 extended private key', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.extended-priv-key')) - .getAttribute("value") - .then(function(privKey) { - expect(privKey).toBe("xprv9va99uTVE5aLiutUVLTyfxfe8v8aaXjSQ1XxZbK6SezYVuikA9MnjQVTA8rQHpNA5LKvyQBpLiHbBQiiccKiBDs7eRmBogsvq3THFeLHYbe"); - done(); - }); - }); +it('Allows selection of Bitcoin Atom', function(done) { + var params = { + selectText: "BCA - Bitcoin Atom", + phrase: "abandon abandon ability", + firstAddress: "AMy6qMbJeC4zsGRL6iWszmeCdQH65fgfih", + firstPubKey: "02efe1e4f85342c8c57c4d6e6f48758f7be4e059d61586f769e33dd5bf0aa78a04", + firstPrivKey: "Ky4hiMBLXZEj3TFknsuvceh16ttBfw9U7ReMgGWBtoYg1LPuxxUq", + }; + testNetwork(done, params); }); - -// BIP32 extended public key is shown -it('Shows the BIP32 extended public key', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.extended-pub-key')) - .getAttribute("value") - .then(function(pubKey) { - expect(pubKey).toBe("xpub69ZVZQzP4T8dwPxwbMzz36cNgwy4yzTHmETZMyihzzXXNi3thgg3HCow1RtY252wdw5rS8369xKnraN5Q93y3FkFfJp2XEHWUrkyXsjS93P"); - done(); - }); - }); +it('Allows selection of Bitcoinplus', function(done) { + var params = { + selectText: "XBC - Bitcoinplus", + phrase: "abandon abandon ability", + firstAddress: "B7FSynZoDbEwTCSgsXq9nJ5ue8owYLVL8r", + firstPubKey: "03ca81fbc766f6a38c7d122facd68c87ceeb57a0ee7d58927132a77704dfe88f92", + firstPrivKey: "Pjjssfh7oJnFZfcxxooUvUqqxtb35oiurrDm3rEHCGpyCW1tPEG2", + }; + testNetwork(done, params); }); - -// Derivation path is shown in table -it('Shows the derivation path in the table', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstPath(function(path) { - expect(path).toBe("m/44'/0'/0'/0/0"); - done(); - }); - }); +it('Allows selection of Bitcoin Private', function(done) { + var params = { + selectText: "BTCP - Bitcoin Private", + phrase: "abandon abandon ability", + firstAddress: "b1M3PbiXXyN6Hdivdw5rJv5VKpLjPzhm4jM", + firstPubKey: "03b4dae910c8563ae77e4c665022f8afbf8bcc659ce3bc790a74956e5ebba932af", + firstPrivKey: "L5U3Rfy7otN5JQP9iveYkT1pB9va71uebx7VE8reBbiAofKCiCxk", + }; + testNetwork(done, params); }); - -// Derivation path for address can be hardened -it('Can derive hardened addresses', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.executeScript(function() { - $(".hardened-addresses").prop("checked", true); - }); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("18exLzUv7kfpiXRzmCjFDoC9qwNLFyvwyd"); - done(); - }); - }); +it('Allows selection of Bitcoin SV', function(done) { + var params = { + selectText: "BSV - BitcoinSV", + phrase: "abandon abandon ability", + firstAddress: "1N4mgtE5yxifch9jWs7Sds6oVqxdy2t576", + firstPubKey: "0280bbf3fd6f1c7ab4b04cca0ab6e23487fafa9c5edea3d1882d8e967111ee8b38", + firstPrivKey: "L3oBCYKNpT6uc5qeYGN9NFNyvQsTUGBV7v2cqeB76GfWzuGJDYeY", + }; + testNetwork(done, params); }); - -// Derivation path visibility can be toggled -it('Can toggle visibility of the derivation path column', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.index-toggle')) - .click(); - testColumnValuesAreInvisible(done, "index"); - }); +it('Allows selection of Bitcoinz', function(done) { + var params = { + selectText: "BTCZ - Bitcoinz", + phrase: "abandon abandon ability", + firstAddress: "t1X2YQoxs8cYRo2oaBYgVEwW5QNjCC59NYc", + firstPubKey: "033eb18e80984fa3fbaeee1096977d6b169399123641dc97ceba00910c8ad211d4", + firstPrivKey: "L1qcDeAXPxMSgnXvquJo5Dd4myFxxxrWNgi99Ns26GPNyRW7eVuZ", + }; + testNetwork(done, params); }); - -// Address is shown -it('Shows the address in the table', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug"); - done(); - }); - }); +it('Allows selection of BitCloud', function(done) { + var params = { + selectText: "BTDX - BitCloud", + phrase: "abandon abandon ability", + firstAddress: "BHbWitXCNgTf1BhsRDNMP186EeibuzmrBi", + firstPubKey: "032ca47d6a35bd01ba3832791bcb0ee5676b1a63a491b42c39a4b214d78bf64fd3", + firstPrivKey: "PgTZBt9exdzZSWfhdwXKVmz5WBFjAJFjNLa9552FCx1X6mnztNSL", + }; + testNetwork(done, params); }); - -// Addresses are shown in order of derivation path -it('Shows the address in order of derivation path', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - testRowsAreInCorrectOrder(done); - }); +it('Allows selection of Bitcore', function(done) { + var params = { + selectText: "BTX - Bitcore", + phrase: "abandon abandon ability", + firstAddress: "2Rgp5Znhpy34TK4QmPkfCiYs9r4KovfTH9", + firstPubKey: "02caa73ee839b074c8d353f6869222bafd8ce5ad3bcb1c0bd404d108390b2a6438", + firstPrivKey: "L4286qDXUJfVq4ebbHHUVDoFpEudJj81FUWkjwNeQ132gFCDGUBj", + }; + testNetwork(done, params); }); - -// Address visibility can be toggled -it('Can toggle visibility of the address column', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.address-toggle')) - .click(); - testColumnValuesAreInvisible(done, "address"); - }); +it('Allows selection of Bitsend', function(done) { + var params = { + selectText: "BSD - Bitsend", + phrase: "abandon abandon ability", + firstAddress: "iBPk7LYjDun3EPk7CRR8UUmnPoceVc1bp2", + firstPubKey: "03e6b12ed885225302fc126980e42abfee1c3350b77b61b01abcf200b5e9a9fee5", + firstPrivKey: "XCTxjfV68KfXKySGJyZTYvYMBDFKSPJu41W3SN1bRpJch5R498mC", + }; + testNetwork(done, params); }); - -// Public key is shown in table -it('Shows the public key in the table', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElements(By.css('.pubkey')) - .then(function(els) { - els[0].getText() - .then(function(pubkey) { - expect(pubkey).toBe("033f5aed5f6cfbafaf223188095b5980814897295f723815fea5d3f4b648d0d0b3"); - done(); - }); - }); - }); +it('Allows selection of Britcoin', function(done) { + var params = { + selectText: "BRIT - Britcoin", + phrase: "abandon abandon ability", + firstAddress: "B6Aue4J2XLs1f1dtD4H1SHYFfh4XrmEbrw", + firstPubKey: "035dee3aad6f635aeffe61a28e82a58271b984d20cc3766f63d9acb29ecee91d3f", + firstPrivKey: "PdyPdAngoD42Pe5qCd2en6nS1j4rqVyH6cFGkCDEu2nEMt8DHsoz", + }; + testNetwork(done, params); }); - -// Public key visibility can be toggled -it('Can toggle visibility of the public key column', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.public-key-toggle')) - .click(); - testColumnValuesAreInvisible(done, "pubkey"); - }); +it('Allows selection of Canadaecoin', function(done) { + var params = { + selectText: "CDN - Canadaecoin", + phrase: "abandon abandon ability", + firstAddress: "CanAyCfd5Rj2CQVfaoAmvDUZunPM5W1AEQ", + firstPubKey: "03124e22733a75beba1e4f2635d08e034772bf6cbe8102404226a9402e135ff7f6", + firstPrivKey: "QCEMYNRcKqGgYXhxDNZfrF9m8sqd28NujXpjDNuN7r525rrXPnLm", + }; + testNetwork(done, params); }); - -// Private key is shown in table -it('Shows the private key in the table', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElements(By.css('.privkey')) - .then(function(els) { - els[0].getText() - .then(function(pubkey) { - expect(pubkey).toBe("L26cVSpWFkJ6aQkPkKmTzLqTdLJ923e6CzrVh9cmx21QHsoUmrEE"); - done(); - }); - }); - }); +it('Allows selection of Cannacoin', function(done) { + var params = { + selectText: "CCN - Cannacoin", + phrase: "abandon abandon ability", + firstAddress: "CYjW8xWB43g6krLJTmmrPk1PonoQX7h9Qd", + firstPubKey: "03bd05a584f418aa8d65a05c7bcc301eb552f67aa380f15e4b29c0b8eec698b443", + firstPrivKey: "QAM1aUWMGEDdcDsgaPQKXcMe8Z3vEfDaPSds3wTFz8USQ3yht7Kk", + }; + testNetwork(done, params); }); - -// Private key visibility can be toggled -it('Can toggle visibility of the private key column', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.private-key-toggle')) - .click(); - testColumnValuesAreInvisible(done, "privkey"); - }); +it('Allows selection of Clubcoin', function(done) { + var params = { + selectText: "CLUB - Clubcoin", + phrase: "abandon abandon ability", + firstAddress: "CHMDEXN4sihpSVX4GyAa2hZ62shnby7uyN", + firstPubKey: "0356187f1336ac2e340145478f02024ce1c318e3648cbba38262afbde7f2dc0055", + firstPrivKey: "PeJx6v8h1N6GvTj7VkK7vWqjdWJb4QXzfrDgJjFao8bkpRrDiymm", + }; + testNetwork(done, params); }); - -// More addresses can be generated -it('Can generate more rows in the table', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.more')) - .click(); - driver.sleep(generateDelay).then(function() { - driver.findElements(By.css('.address')) - .then(function(els) { - expect(els.length).toBe(40); - done(); - }); - }); - }); +it('Allows selection of Compcoin', function(done) { + var params = { + selectText: "CMP - Compcoin", + phrase: "abandon abandon ability", + firstAddress: "CLshtw3zhxkseBJS46UF12v3AFy9Dx7JVv", + firstPubKey: "027d1b4f1798882b8978eb3ab0e8b503aa1fb4cf058e0086cf25326fb6a8751aae", + firstPrivKey: "QDq6KKEdmrzHbZHmgzsGcweUFwYA7mVvvfeAKsPSxfxHNv73ETr7", + }; + testNetwork(done, params); }); - -// A custom number of additional addresses can be generated -it('Can generate more rows in the table', function(done) { - driver.findElement(By.css('.rows-to-add')) - .clear(); - driver.findElement(By.css('.rows-to-add')) - .sendKeys('1'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.more')) - .click(); - driver.sleep(generateDelay).then(function() { - driver.findElements(By.css('.address')) - .then(function(els) { - expect(els.length).toBe(21); - done(); - }); - }); - }); +it('Allows selection of CPUchain', function(done) { + var params = { + selectText: "CPU - CPUchain", + phrase: "abandon abandon ability", + firstAddress: "CWSpLpW7jS4mBHJnkz3mmL5s3yQMg93zK8", + firstPubKey: "0390845eef5c5993069211f94d9f3990c27c380700bb92ae629d2a5afae1c08806", + firstPrivKey: "L378gxzvUEX9JUFnfXBik2H4gV7XM4dzXWKM9rvR8UZr2rBphL1t", + }; + testNetwork(done, params); }); - -// Additional addresses are shown in order of derivation path -it('Shows additional addresses in order of derivation path', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.more')) - .click(); - driver.sleep(generateDelay).then(function() { - testRowsAreInCorrectOrder(done); - }); - }); +it('Allows selection of Crave', function(done) { + var params = { + selectText: "CRAVE - Crave", + phrase: "abandon abandon ability", + firstAddress: "VCYJeti6uKMNBFKCL7eP96UwuFWYHM7c85", + firstPubKey: "02c8938f30cc46013706586753d6dca3e4ac6b7d6924dfc35d444c3605f35da4c7", + firstPrivKey: "PjRdEuhRZ6rufXAdU6amoaPDRZamWmxN46qbmSPyqUKsJzChCjZT", + }; + testNetwork(done, params); }); - -// BIP32 root key can be set by the user -it('Allows the user to set the BIP32 root key', function(done) { - driver.findElement(By.css('.root-key')) - .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug"); - done(); - }); - }); +it('Allows selection of Defcoin', function(done) { + var params = { + selectText: "DFC - Defcoin", + phrase: "abandon abandon ability", + firstAddress: "D8swcgyaaFUrXZU3ATwbgy16buCpWqbG1M", + firstPubKey: "02d02cc83ddfaa5aed4fb9b611b504cccbfa8397485411f16816fc28dccb51e609", + firstPrivKey: "QSRhMr1B4tt7DEcgxji6NrEfS51wQ6GypfMkqgNDHuWVKo2RzTac", + }; + testNetwork(done, params); }); - -// Setting BIP32 root key clears the existing phrase, passphrase and seed -// TODO this doesn't work in selenium with chrome -it('Confirms the existing phrase should be cleared', function(done) { - if (browser == "chrome") { - pending("Selenium + Chrome headless bug for alert, see https://stackoverflow.com/q/45242264"); - } - driver.findElement(By.css('.phrase')) - .sendKeys('A non-blank but invalid value'); - driver.findElement(By.css('.root-key')) - .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi'); - driver.switchTo().alert().accept(); - driver.findElement(By.css('.phrase')) - .getAttribute("value").then(function(value) { - expect(value).toBe(""); - done(); - }); +it('Allows selection of Diamond', function(done) { + var params = { + selectText: "DMD - Diamond", + phrase: "abandon abandon ability", + firstAddress: "dJnrVbLL9UPjdaVRz2C8VpqHZknqAqjLek", + firstPubKey: "03750645ffc120a0ffda07f01b0cc0d321bccf02eaedc98907672d78f2b2ef20d6", + firstPrivKey: "ZKnjDNkhgCwRs8KV5Mf33k1USiiiP8AuXKM2xR4zhd3PAhtVmkEg", + }; + testNetwork(done, params); }); - -// Clearing of phrase, passphrase and seed can be cancelled by user -// TODO this doesn't work in selenium with chrome -it('Allows the clearing of the phrase to be cancelled', function(done) { - if (browser == "chrome") { - pending("Selenium + Chrome headless bug for alert, see https://stackoverflow.com/q/45242264"); - } - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.root-key')) - .clear(); - driver.findElement(By.css('.root-key')) - .sendKeys('x'); - driver.switchTo().alert().dismiss(); - driver.findElement(By.css('.phrase')) - .getAttribute("value").then(function(value) { - expect(value).toBe("abandon abandon ability"); - done(); - }); - }); +it('Allows selection of Digibyte', function(done) { + var params = { + selectText: "DGB - Digibyte", + phrase: "abandon abandon ability", + firstAddress: "D85Rp9jwLtMdmP6wGjTiqHBdVQLST3YCEq", + firstPubKey: "02f86cc0afd113956e995fb9cbe33b68e59e9175c0c89419efc4031f2e3c128288", + firstPrivKey: "L1w9pD4XodykLEJxiK1R9SVELpftD9x1QtGjHEb1nWviAvYVZbwv", + }; + testNetwork(done, params); }); - -// Custom BIP32 root key is used when changing the derivation path -it('Can set derivation path for root key instead of phrase', function(done) { - driver.findElement(By.css('#bip44 .account')) - .sendKeys('1'); - driver.findElement(By.css('.root-key')) - .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi'); - driver.sleep(generateDelay).then(function() { - getFirstAddress(function(address) { - expect(address).toBe("1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H"); - done(); - }); - }); +it('Allows selection of Digitalcoin', function(done) { + var params = { + selectText: "DGC - Digitalcoin", + phrase: "abandon abandon ability", + firstAddress: "DKw4UGKEAZWweDNEbBFNQx4EM8x1mpUdia", + firstPubKey: "02148710e3f09fa9e108bd90a3d53e0eeea9b6ee929c4668a7d64732e3fc839ff7", + firstPrivKey: "QVBstKEkSbT4M9aDbBTkqJkpLCaGjL5zYSiiufHwMxGCn2dunbYL", + }; + testNetwork(done, params); }); - -// Incorrect mnemonic shows error -it('Shows an error for incorrect mnemonic', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon abandon'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - expect(feedback).toBe("Invalid mnemonic"); - done(); - }); - }); +it('Allows selection of Ecoin', function(done) { + var params = { + selectText: "ECN - Ecoin", + phrase: "abandon abandon ability", + firstAddress: "e6WFPLG5gcXyF7cESFteH1hE2XSmowW5yB", + firstPubKey: "03a74536710cba6aa02b543f1ac4a76d241b47a96e38cfd002eb975cdef4b9ec19", + firstPrivKey: "ZZPUTdAqpJ3s6S6xe2RpZD3jyEqwGk5MRkJHSpar1rESp4BFEqLV", + }; + testNetwork(done, params); }); - -// Incorrect word shows suggested replacement -it('Shows word suggestion for incorrect word', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon abiliti'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "abiliti not in wordlist, did you mean ability?"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of Edrcoin', function(done) { + var params = { + selectText: "EDRC - Edrcoin", + phrase: "abandon abandon ability", + firstAddress: "eh1nUJsvgKPFv6ebMBfcwJ299GMCpjeZUG", + firstPubKey: "02b541bdd9ff6ffc03ec4749dbe1a8a4ac8b02dc528758acac43eb1f38b5f48f27", + firstPrivKey: "ZjZir6LUrg6A8WqcCeCeM249TGCxJcgGkEL6VefJJV1mGsGb7MEb", + }; + testNetwork(done, params); }); - -// Github pull request 48 -// First four letters of word shows that word, not closest -// since first four letters gives unique word in BIP39 wordlist -// eg ille should show illegal, not idle -it('Shows word suggestion based on first four chars', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('ille'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "ille not in wordlist, did you mean illegal?"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of Egulden', function(done) { + var params = { + selectText: "EFL - Egulden", + phrase: "abandon abandon ability", + firstAddress: "Lg66yt55R7edRM58cDhKzXik2kFme3viX7", + firstPubKey: "02d8d54be535836e70b9feed7a2502c026d714894342746f15d21c6bc80e1f97e4", + firstPrivKey: "T7NPtpaVXs7SBfsCzp3ooadkctNqcZW6HpNHeT3U8EAXc6NtDJ4c", + }; + testNetwork(done, params); }); - -// Incorrect BIP32 root key shows error -it('Shows error for incorrect root key', function(done) { - driver.findElement(By.css('.root-key')) - .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpj'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "Invalid root key"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of Einsteinium', function(done) { + var params = { + selectText: "EMC2 - Einsteinium", + phrase: "abandon abandon ability", + firstAddress: "EVAABm9hXKHk2MpVMbwNakRubFnNha5m8m", + firstPubKey: "02826e69c802fbf71ca8e7daf9fdac2e371b86847b5397422997785cefb973269b", + firstPrivKey: "QwySA5DiFKbvMcm7H3xXfsDUdq1Q5RPYjBAcLjZKkESxmJMXBvL2", + }; + testNetwork(done, params); }); - -// Derivation path not starting with m shows error -it('Shows error for derivation path not starting with m', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('#bip32 .path')) - .clear(); - driver.findElement(By.css('#bip32 .path')) - .sendKeys('n/0'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "First character must be 'm'"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of EOSIO', function(done) { + var params = { + selectText: "EOS - EOSIO", + phrase: "abandon abandon ability", + firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy", + firstPrivKey: "5Jef4qXr3nF8cjudHNQBaComNB653dnQX4pWec32xXRVThBLiCM", + }; + testNetwork(done, params); }); - -// Derivation path containing invalid characters shows useful error -it('Shows error for derivation path not starting with m', function(done) { - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.findElement(By.css('#bip32 .path')) - .clear(); - driver.findElement(By.css('#bip32 .path')) - .sendKeys('m/1/0wrong1/1'); - driver.findElement(By.css('.phrase')) - .sendKeys('abandon abandon ability'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "Invalid characters 0wrong1 found at depth 2"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of Europecoin', function(done) { + var params = { + selectText: "ERC - Europecoin", + phrase: "abandon abandon ability", + firstAddress: "ESA2YwPYntAoaPrE8Fm5qkKRtkcwLcwD6R", + firstPubKey: "038f16d567cdefac2813b64d465f5cd8d6d59df9dfe4d16302a19b5e0b7179d685", + firstPrivKey: "RzXndDAzJ4Wft6HXkpopV7vRnRBeVw2o6dKp44FYQgriYWngseBu", + }; + testNetwork(done, params); }); - -// Github Issue 11: Default word length is 15 -// https://github.com/iancoleman/bip39/issues/11 -it('Sets the default word length to 15', function(done) { - driver.findElement(By.css('.strength')) - .getAttribute("value") - .then(function(strength) { - expect(strength).toBe("15"); - done(); - }); +it('Allows selection of Exclusivecoin', function(done) { + var params = { + selectText: "EXCL - Exclusivecoin", + phrase: "abandon abandon ability", + firstAddress: "EbUa6m8UZW6nTxsYZD2FsDjkadKbp5M6JT", + firstPubKey: "0291a6b82197e13aa2fd65bd1f2a6e905a9a2baaa36dfb5da10690022f7f9e998d", + firstPrivKey: "Qu6pr1srXmEFzWSa4Ry1sjV6qDj4TEf4q2CxHBSRByiSBLsm967z", + }; + testNetwork(done, params); }); - -// Github Issue 12: Generate more rows with private keys hidden -// https://github.com/iancoleman/bip39/issues/12 -it('Sets the correct hidden column state on new rows', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys("abandon abandon ability"); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.private-key-toggle')) - .click(); - driver.findElement(By.css('.more')) - .click(); - driver.sleep(generateDelay).then(function() { - driver.findElements(By.css('.privkey')) - .then(function(els) { - expect(els.length).toBe(40); - }); - testColumnValuesAreInvisible(done, "privkey"); - }); - }); +it('Allows selection of Feathercoin', function(done) { + var params = { + selectText: "FTC - Feathercoin", + phrase: "abandon abandon ability", + firstAddress: "6gDdjAMoSgQaW8UhqK3oboHs6ftGAroKkM", + firstPubKey: "02e9f5c37fba2b6457f3c59de5bf5be2efe524751a682a47765825cb9d82d339f3", + firstPrivKey: "N5487NUGCd1JnWzZzhjX1uu6SNGnpQKjeWuK6Y1NzNHjGaLysCdi", + }; + testNetwork(done, params); }); - -// Github Issue 19: Mnemonic is not sensitive to whitespace -// https://github.com/iancoleman/bip39/issues/19 -it('Ignores excess whitespace in the mnemonic', function(done) { - var doublespace = " "; - var mnemonic = "urge cat" + doublespace + "bid"; - driver.findElement(By.css('.phrase')) - .sendKeys(mnemonic); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css('.root-key')) - .getAttribute("value") - .then(function(seed) { - expect(seed).toBe("xprv9s21ZrQH143K3isaZsWbKVoTtbvd34Y1ZGRugGdMeBGbM3AgBVzTH159mj1cbbtYSJtQr65w6L5xy5L9SFC7c9VJZWHxgAzpj4mun5LhrbC"); - done(); - }); - }); +it('Allows selection of Firstcoin', function(done) { + var params = { + selectText: "FRST - Firstcoin", + phrase: "abandon abandon ability", + firstAddress: "FJN9GzfMm7Q8R4DJwK1H9F6A1GTghvFiMJ", + firstPubKey: "029300108c006d1dc75847fece915138747b7bc17b515eae7458da98d2f14d7178", + firstPrivKey: "RDxAN3n3k2dEZ4Ln3bbozzZ3Jgg7CQdgzYDCURmPghKQdzctX7ck", + }; + testNetwork(done, params); }); - -// Github Issue 23: Part 1: Use correct derivation path when changing tabs -// https://github.com/iancoleman/bip39/issues/23 -it('Uses the correct derivation path when changing tabs', function(done) { - // 1) and 2) set the phrase - driver.findElement(By.css('.phrase')) - .sendKeys("abandon abandon ability"); - driver.sleep(generateDelay).then(function() { - // 3) select bip32 tab - driver.findElement(By.css('#bip32-tab a')) - .click(); - driver.sleep(generateDelay).then(function() { - // 4) switch from bitcoin to litecoin - selectNetwork("LTC - Litecoin"); - driver.sleep(generateDelay).then(function() { - // 5) Check address is displayed correctly - getFirstAddress(function(address) { - expect(address).toBe("LS8MP5LZ5AdzSZveRrjm3aYVoPgnfFh5T5"); - // 5) Check derivation path is displayed correctly - getFirstPath(function(path) { - expect(path).toBe("m/0/0"); - done(); - }); - }); - }); - }); - }); +it('Allows selection of Flashcoin', function(done) { + var params = { + selectText: "FLASH - Flashcoin", + phrase: "abandon abandon ability", + firstAddress: "UWfpf5LfMmLxZYooEb2EyvWhZ8NG7EZDRt", + firstPubKey: "032d55eae8073e75f02e9674b0ac3f69190ad359ad37ee4c4c11d12bcfee13d439", + firstPrivKey: "W6pedhBW35Twq8ZmgTQi7sHx6wczQanSk2FUpcFWtgEW29jowsvi", + }; + testNetwork(done, params); }); - -// Github Issue 23 Part 2: Coin selection in derivation path -// https://github.com/iancoleman/bip39/issues/23#issuecomment-238011920 -it('Uses the correct derivation path when changing coins', function(done) { - // set the phrase - driver.findElement(By.css('.phrase')) - .sendKeys("abandon abandon ability"); - driver.sleep(generateDelay).then(function() { - // switch from bitcoin to clam - selectNetwork("CLAM - Clams"); - driver.sleep(generateDelay).then(function() { - // check derivation path is displayed correctly - getFirstPath(function(path) { - expect(path).toBe("m/44'/23'/0'/0/0"); - done(); - }); - }); - }); +it('Allows selection of GCRCoin', function(done) { + var params = { + selectText: "GCR - GCRCoin", + phrase: "abandon abandon ability", + firstAddress: "GJjF5cLwyXLacpuvXAVksxGxKvHDjx58d6", + firstPubKey: "0356187f1336ac2e340145478f02024ce1c318e3648cbba38262afbde7f2dc0055", + firstPrivKey: "Pntag5VbBX1Qtyjt3pi1igwDswWEtpoiqHqosBbgHcMU6m2e7t9J", + }; + testNetwork(done, params); }); - -// Github Issue 26: When using a Root key derrived altcoins are incorrect -// https://github.com/iancoleman/bip39/issues/26 -it('Uses the correct derivation for altcoins with root keys', function(done) { - // 1) 2) and 3) set the root key - driver.findElement(By.css('.root-key')) - .sendKeys("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi"); - driver.sleep(generateDelay).then(function() { - // 4) switch from bitcoin to viacoin - selectNetwork("VIA - Viacoin"); - driver.sleep(generateDelay).then(function() { - // 5) ensure the derived address is correct - getFirstAddress(function(address) { - expect(address).toBe("Vq9Eq4N5SQnjqZvxtxzo7hZPW5XnyJsmXT"); - done(); - }); - }); - }); +it('Allows selection of Gobyte', function(done) { + var params = { + selectText: "GBX - Gobyte", + phrase: "abandon abandon ability", + firstAddress: "GS813Ys2brkmvSUw1rUqGPm2HqQVDHJRyA", + firstPubKey: "036f84f44e4c8bffe039c2d9da087b006ebbfcdcf24b32a6434b2fad708ef00ae0", + firstPrivKey: "WLiSrhfqRwgNmw7rhGHFoXLEuNGXxQYuKb9PK84AZmTfiHN9dz22", + }; + testNetwork(done, params); }); - -// Selecting a language with no existing phrase should generate a phrase in -// that language. -it('Generate a random phrase when language is selected and no current phrase', function(done) { - driver.findElement(By.css("a[href='#japanese']")) - .click(); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css(".phrase")) - .getAttribute("value").then(function(phrase) { - expect(phrase.search(/[a-z]/)).toBe(-1); - expect(phrase.length).toBeGreaterThan(0); - done(); - }); - }); +it('Allows selection of Gridcoin', function(done) { + var params = { + selectText: "GRC - Gridcoin", + phrase: "abandon abandon ability", + firstAddress: "SGrWbBPvobgqKRF8td1Kdc9vbRY7MJ78Y9", + firstPubKey: "0377436f8c4c4d96d5ddfe6875abeb589deec595331b9a915b7e8d81a4134926ce", + firstPrivKey: "V7h5EhRuWGM8uqAouxHr9uNt8ZLCQ7kmpA27tvKDbUE3zBarH81n", + }; + testNetwork(done, params); }); - -// Selecting a language with existing phrase should update the phrase to use -// that language. -it('Updates existing phrases when the language is changed', function(done) { - driver.findElement(By.css(".phrase")) - .sendKeys("abandon abandon ability"); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css("a[href='#italian']")) - .click(); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css(".phrase")) - .getAttribute("value").then(function(phrase) { - // Check only the language changes, not the phrase - expect(phrase).toBe("abaco abaco abbaglio"); - getFirstAddress(function(address) { - // Check the address is correct - expect(address).toBe("1Dz5TgDhdki9spa6xbPFbBqv5sjMrx3xgV"); - done(); - }); - }); - }); - }); +it('Allows selection of Gulden', function(done) { + var params = { + selectText: "NLG - Gulden", + phrase: "abandon abandon ability", + firstAddress: "GcDP7cNEc33MPPdTFNJ8pZc6VMZJ2CbKxY", + firstPubKey: "03ff51002146450eb68f294dbe34f3e208f8694b51079f81e3f7dbd403cc10df41", + firstPrivKey: "Fc6gU4tscBk3pybMWU1ajS1tLvNerXC24hQJ1F944QqdgSSrr3XW", + }; + testNetwork(done, params); }); - -// Suggested replacement for erroneous word in non-English language -it('Shows word suggestion for incorrect word in non-English language', function(done) { - driver.findElement(By.css('.phrase')) - .sendKeys('abaco abaco zbbaglio'); - driver.sleep(feedbackDelay).then(function() { - driver.findElement(By.css('.feedback')) - .getText() - .then(function(feedback) { - var msg = "zbbaglio not in wordlist, did you mean abbaglio?"; - expect(feedback).toBe(msg); - done(); - }); - }); +it('Allows selection of Helleniccoin', function(done) { + var params = { + selectText: "HNC - Helleniccoin", + phrase: "abandon abandon ability", + firstAddress: "LbHEKe5H72zp9G1fuWNiiNePTUfJb88915", + firstPubKey: "02e602000d65b969ac27172297ee907684bfc606f457ef0bad62c229edb17d5cb2", + firstPrivKey: "T6JEq9jKLvztjhg4tJMezy1L4NjnMfLDZJe1egVzPBU3Q5XPBFrz", + }; + testNetwork(done, params); }); - -// Japanese word does not break across lines. -// Point 2 from -// https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md#japanese -it('Does not break Japanese words across lines', function(done) { - driver.findElement(By.css('.phrase')) - .getCssValue("word-break") - .then(function(value) { - expect(value).toBe("keep-all"); - done(); - }); +it('Allows selection of Hempcoin', function(done) { + var params = { + selectText: "THC - Hempcoin", + phrase: "abandon abandon ability", + firstAddress: "H8sdWbZyJV4gyXyHtLXDaNnAuUDhK5mfTV", + firstPubKey: "02e40aaa6bf20e32d9f5976f57e9bf7a8f75db36b96a9033c20b681c9d9454b617", + firstPrivKey: "Ry5Dg2yR32uhbrPLdNmsK1TRbZ1bHLvFp7kcPgeMzVPN6ycu9Jj5", + }; + testNetwork(done, params); }); - -// Language can be specified at page load using hash value in url -it('Can set the language from the url hash', function(done) { - driver.get(url + "#japanese").then(function() { - driver.findElement(By.css('.generate')).click(); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css(".phrase")) - .getAttribute("value").then(function(phrase) { - expect(phrase.search(/[a-z]/)).toBe(-1); - expect(phrase.length).toBeGreaterThan(0); - done(); - }); - }); - }); +it('Allows selection of Insane', function(done) { + var params = { + selectText: "INSN - Insane", + phrase: "abandon abandon ability", + firstAddress: "iMPqEJMiXWuxC9U2NVinCCMr4t72h58EWx", + firstPubKey: "036ec4cf4b92300f12ff824b1eca775b27b1a728f6b57c6354ce791fd8ea0f3497", + firstPrivKey: "9HA4X5kXWKxLjybjko8Z5wDo19UUJKroRrZ1BuKCtsfcfNB48K61", + }; + testNetwork(done, params); }); - -// Entropy can be entered by the user -it('Allows entropy to be entered', function(done) { - driver.findElement(By.css('.use-entropy')) - .click(); - driver.findElement(By.css('.entropy')) - .sendKeys('00000000 00000000 00000000 00000000'); - driver.sleep(generateDelay).then(function() { - driver.findElement(By.css(".phrase")) - .getAttribute("value").then(function(phrase) { - expect(phrase).toBe("abandon abandon ability"); - getFirstAddress(function(address) { - expect(address).toBe("1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug"); - done(); - }) - }); - }); +it('Allows selection of Iop', function(done) { + var params = { + selectText: "IOP - Iop", + phrase: "abandon abandon ability", + firstAddress: "pGKQmcaPf95Ur5o6oHK4qdiZ52p1yaTvq1", + firstPubKey: "02bbaa07f154d04b04dec0978a1655952e1a09a3c0e7798085902273965d93c2f6", + firstPrivKey: "8MDnKDhVSp84AqzYN5g18MhMvHk3UMYnP51EVjidSas1pT62Sdpc", + }; + testNetwork(done, params); }); - -// A warning about entropy is shown to the user, with additional information -it('Shows a warning about using entropy', function(done) { - driver.findElement(By.css('.use-entropy')) - .click(); - driver.findElement(By.css('.entropy-container')) - .getText() - .then(function(containerText) { - var warning = "mnemonic may be insecure"; - expect(containerText).toContain(warning); - driver.findElement(By.css('#entropy-notes')) - .findElement(By.xpath("parent::*")) - .getText() - .then(function(notesText) { - var detail = "flipping a fair coin, rolling a fair dice, noise measurements etc"; - expect(notesText).toContain(detail); - done(); - }); - }); +it('Allows selection of Ixcoin', function(done) { + var params = { + selectText: "IXC - Ixcoin", + phrase: "abandon abandon ability", + firstAddress: "xgE9bTZ6YypT3E6ByzkTt31Hq68E9BqywH", + firstPubKey: "0257766cea209cf52ba08776b6dfa263a4759e1e148f25d0cab3a91a60b6a52062", + firstPrivKey: "KxdDep6zGCWoRt6arat5DVR5s6a8vmZtuekwHafEwRc7VGxfeD4Y", + }; + testNetwork(done, params); }); - -// The types of entropy available are described to the user -it('Shows the types of entropy available', function(done) { - driver.findElement(By.css('.entropy')) - .getAttribute("placeholder") - .then(function(placeholderText) { - var options = [ - "binary", - "base 6", - "dice", - "base 10", - "hexadecimal", - "cards", - ]; - for (var i=0; i