X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=6b52e2c715d407fcc8aca12456121854a8b98857;hb=c394ec3c4f77f9063f5de975b81423efc9c61e48;hp=1725a2d12a7ddaa54f583328f5fdaf37a27fe311;hpb=1ba5816184350df014247c9f508fa05b951ca313;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 1725a2d..6b52e2c 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -1615,6 +1615,20 @@ it('Allows selection of Elastos', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Energyweb', function(done) { + var params = { + selectText: "EWT - EnergyWeb", + firstAddress: "0x190aCfa6dA6Ff2D0a28Fbd0e02Aec493bCa5D7f7", + }; + testNetwork(done, params); +}); +it('Allows selection of Thought', function(done) { + var params = { + selectText: "THT - Thought", + firstAddress: "4B1Bh9GibDarFQrhtYU8krpc7WSjgGfYvo", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) { @@ -4118,4 +4132,57 @@ it('Can use root keys to generate segwit table rows', function(done) { }); }); +// Pull Request 271 +// Allow converting mnemonic back to raw entropy value +it('Converts mnemonics into raw entropy', function(done) { + driver.findElement(By.css('.phrase')) + .sendKeys('abandon abandon about'); + driver.sleep(generateDelay).then(function() { + driver.findElement(By.css('.use-entropy')) + .click(); + driver.findElement(By.css('.entropy')) + .getAttribute("value") + .then(function(entropy) { + expect(entropy).toBe("00000000000000000000000000000001"); + driver.findElement(By.css('.phrase')) + .getAttribute("value") + .then(function(phrase) { + expect(phrase).toBe("abandon abandon about"); + done(); + }); + }); + }); +}); + +// Pull Request 279 +// Added Split Phrase Card Output +it('Shows split prase cards', function(done) { + var originalPhrase = "ugly charge strong giant once anchor capable october thumb inject dwarf legal alley mixture shoot"; + var originalWords = originalPhrase.split(' '); + driver.findElement(By.css('.phrase')) + .sendKeys(originalPhrase); + driver.sleep(generateDelay).then(function() { + driver.findElement(By.css('.phraseSplit')) + .getAttribute("value") + .then(function(cardsStr) { + var cards = cardsStr.split("\n"); + expect(cards.length).toBe(3); + // test all 2-of-3 combos can be used to form full phrase + var combos = [[0,1],[0,2],[1,2]]; + for (var i=0; i