X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=c7a988944741acb70edec4422063e5febce71323;hb=f8ca25c3381d5071426497eb3bf34ff5cdf094ee;hp=f56b18d0aea1192785b540c21ee31641a38e4613;hpb=09d63290a45066e4bef3bdb31e81c50ff70f7b85;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index f56b18d..c7a9889 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -2937,4 +2937,21 @@ it('Shows the checksum for the entropy', function(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(); + }); + }); +}); + });