From f8ca25c3381d5071426497eb3bf34ff5cdf094ee Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Mon, 12 Mar 2018 10:33:07 +1100 Subject: Add spacing every 11 bits to the checksum --- tests/spec/tests.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') 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(); + }); + }); +}); + }); -- cgit v1.2.3