aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/tests.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index bbc1f57..bdc5909 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -4285,4 +4285,48 @@ it('Shows split prase cards', function(done) {
4285 }); 4285 });
4286}); 4286});
4287 4287
4288// It allows manually specifying the entropy type
4289it('Allows entropy type to be manually selected', function(done) {
4290 driver.findElement(By.css('.use-entropy'))
4291 .click();
4292 // use decimal entropy
4293 driver.findElement(By.css('.entropy'))
4294 .sendKeys("91");
4295 // manually change to binary entropy
4296 driver.executeScript(function() {
4297 $(".entropy-container input[value='binary']").click();
4298 });
4299 driver.sleep(entropyFeedbackDelay).then(function() {
4300 driver.findElement(By.css('.entropy-container'))
4301 .getText()
4302 .then(function(text) {
4303 // overide 91 to be just 1
4304 var key = "Filtered Entropy";
4305 var value = "1";
4306 var reText = key + "\\s+" + value;
4307 var re = new RegExp(reText);
4308 expect(text).toMatch(re);
4309 // overide automatic decimal to binary
4310 var key = "Entropy Type";
4311 var value = "binary";
4312 var reText = key + "\\s+" + value;
4313 var re = new RegExp(reText);
4314 expect(text).toMatch(re);
4315 // overide 2 events to 1
4316 var key = "Event Count";
4317 var value = 1;
4318 var reText = key + "\\s+" + value;
4319 var re = new RegExp(reText);
4320 expect(text).toMatch(re);
4321 // overide log2(10)*2 bits to 1 bit
4322 var key = "Total Bits";
4323 var value = 1;
4324 var reText = key + "\\s+" + value;
4325 var re = new RegExp(reText);
4326 expect(text).toMatch(re);
4327 done();
4328 });
4329 });
4330});
4331
4288}); 4332});