X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=fe8344728df264add221d84ed75596daac87f264;hb=0702ecd3520c44cb8016f80329dcb5a3c8df88fc;hp=945a9232adfffb91d514ed0f1befad6a1e3b2969;hpb=85c906727a24ab97a3c2908c72ad37ad988ecb01;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 945a923..fe83447 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -900,6 +900,13 @@ it('Allows selection of Ixcoin', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Kobocoin', function(done) { + var params = { + selectText: "KOBO - Kobocoin", + firstAddress: "FTVoNJETXDAM8x7MnmdE8RwWndSr9PQWhy", + }; + testNetwork(done, params); +}); it('Allows selection of Landcoin', function(done) { var params = { selectText: "LDCN - Landcoin", @@ -1159,6 +1166,13 @@ it('Allows selection of Zcoin', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Zcash', function(done) { + var params = { + selectText: "ZEC - Zcash", + firstAddress: "t1Sz8AneMcVuzUg3tPJ8et5AS5LFJ7K2EF9", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase @@ -3530,4 +3544,36 @@ it('Does not show a warning if generating strong mnemonics', function(done) { }); }); +it('Shows a warning if overriding weak entropy with longer mnemonics', function(done) { + driver.findElement(By.css('.use-entropy')) + .click(); + driver.findElement(By.css('.entropy')) + .sendKeys("0123456789abcdef"); // 6 words + driver.executeScript(function() { + $(".mnemonic-length").val("12").trigger("change"); + }); + driver.findElement(By.css(".weak-entropy-override-warning")) + .getAttribute("class") + .then(function(classes) { + expect(classes).not.toContain("hidden"); + done(); + }); +}); + +it('Does not show a warning if entropy is stronger than mnemonic length', function(done) { + driver.findElement(By.css('.use-entropy')) + .click(); + driver.findElement(By.css('.entropy')) + .sendKeys("0123456789abcdef0123456789abcdef0123456789abcdef"); // 18 words + driver.executeScript(function() { + $(".mnemonic-length").val("12").trigger("change"); + }); + driver.findElement(By.css(".weak-entropy-override-warning")) + .getAttribute("class") + .then(function(classes) { + expect(classes).toContain("hidden"); + done(); + }); +}); + });