aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/tests.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 571047f..945a923 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -3503,4 +3503,31 @@ it('Uses vprv for bitcoin testnet p2wpkh', function(done) {
3503 }); 3503 });
3504}); 3504});
3505 3505
3506it('Shows a warning if generating weak mnemonics', function(done) {
3507 driver.executeScript(function() {
3508 $(".strength option[selected]").removeAttr("selected");
3509 $(".strength option[value=6]").prop("selected", true);
3510 $(".strength").trigger("change");
3511 });
3512 driver.findElement(By.css(".generate-container .warning"))
3513 .getAttribute("class")
3514 .then(function(classes) {
3515 expect(classes).not.toContain("hidden");
3516 done();
3517 });
3518});
3519
3520it('Does not show a warning if generating strong mnemonics', function(done) {
3521 driver.executeScript(function() {
3522 $(".strength option[selected]").removeAttr("selected");
3523 $(".strength option[value=12]").prop("selected", true);
3524 });
3525 driver.findElement(By.css(".generate-container .warning"))
3526 .getAttribute("class")
3527 .then(function(classes) {
3528 expect(classes).toContain("hidden");
3529 done();
3530 });
3531});
3532
3506}); 3533});