X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=c7a988944741acb70edec4422063e5febce71323;hb=f8ca25c3381d5071426497eb3bf34ff5cdf094ee;hp=7e0107037c2a8127f8346de4b6825edc04543c33;hpb=aaa82c097f2a3bee5800a232865cef56bbcd8a5f;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 7e01070..c7a9889 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -620,6 +620,13 @@ it('Allows selection of AXE', function(done) { }; testNetwork(done, params); }); +it('Allows selection of BlackCoin', function(done) { + var params = { + selectText: "BLK - BlackCoin", + firstAddress: "B5MznAKwj7uQ42vDz3w4onhBXPcqhTwJ9z", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) { @@ -2915,4 +2922,36 @@ it('Can encrypt private keys using BIP38', function(done) { }); }, bip38delay + 5000); +it('Shows the checksum for the entropy', function(done) { + driver.findElement(By.css('.use-entropy')) + .click(); + driver.findElement(By.css('.entropy')) + .sendKeys("00000000000000000000000000000000"); + driver.sleep(generateDelay).then(function() { + driver.findElement(By.css('.checksum')) + .getText() + .then(function(text) { + expect(text).toBe("1"); + done(); + }); + }); +}); + +it('Shows the checksum for the entropy with the correct groupings', function(done) { + driver.findElement(By.css('.use-entropy')) + .click(); + // create a checksum of 20 bits, which spans multiple words + driver.findElement(By.css('.entropy')) + .sendKeys("F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + driver.sleep(generateDelay).then(function() { + driver.findElement(By.css('.checksum')) + .getText() + .then(function(text) { + // first group is 9 bits, second group is 11 + expect(text).toBe("011010111 01110000110"); + done(); + }); + }); +}); + });