]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - tests/spec/tests.js
Add test for Onixcoin
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / tests / spec / tests.js
index 2b28d739eb354beaa2e5b20ab3897097e9e10445..6c8da325582f64faaf0d5542a11fc92f76e356cb 100644 (file)
@@ -492,6 +492,13 @@ it('Allows selection of game', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of game', function(done) {
+    var params = {
+        selectText: "KMD - Komodo",
+        firstAddress: "RJL777dmaB3PYqHEJGMJKWWkLPdu1ypGi4",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of namecoin', function(done) {
     var params = {
         selectText: "NMC - Namecoin",
@@ -499,6 +506,13 @@ it('Allows selection of namecoin', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of onixcoin', function(done) {
+    var params = {
+        selectText: "ONX - Onixcoin",
+        firstAddress: "XGwMqddeKjT3ddgX73QokjVbCL3aK6Yxfk",
+    };
+    testNetwork(done, params);
+});
 it('Allows selection of peercoin', function(done) {
     var params = {
         selectText: "PPC - Peercoin",
@@ -2643,4 +2657,31 @@ it('Can generate BIP141 addresses with P2WPKH semanitcs', function(done) {
     });
 });
 
+it('Shows the entropy used by the PRNG when clicking generate', function(done) {
+    driver.findElement(By.css('.generate')).click();
+    driver.sleep(generateDelay).then(function() {
+        driver.findElement(By.css('.entropy'))
+            .getAttribute("value")
+            .then(function(entropy) {
+                expect(entropy).not.toBe("");
+                done();
+            });
+    });
+});
+
+it('Shows the index of each word in the mnemonic', function(done) {
+    driver.findElement(By.css('.phrase'))
+        .sendKeys("abandon abandon ability");
+    driver.sleep(generateDelay).then(function() {
+        driver.findElement(By.css('.use-entropy'))
+            .click();
+        driver.findElement(By.css('.word-indexes'))
+            .getText()
+            .then(function(indexes) {
+                expect(indexes).toBe("0, 0, 1");
+                done();
+            });
+    });
+});
+
 });