]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Add EOSIO test spec
authorJeeyong Um <conr2d@gmail.com>
Sun, 2 Jun 2019 02:51:52 +0000 (11:51 +0900)
committerJeeyong Um <conr2d@gmail.com>
Sun, 2 Jun 2019 02:51:52 +0000 (11:51 +0900)
tests/spec/tests.js

index e3f7e1c1a6469a7b1850a6207b3bf7afa7cd1409..3d72abd2cb7b14a5de9ce50c831e5d7ca434f0c3 100644 (file)
@@ -73,16 +73,23 @@ else if (browser == "chrome") {
 
 // Helper functions
 
-function testNetwork(done, params) {
+function testNetwork(done, params, comparePub = false) {
     var phrase = params.phrase || 'abandon abandon ability';
     driver.findElement(By.css('.phrase'))
         .sendKeys(phrase);
     selectNetwork(params.selectText);
     driver.sleep(generateDelay).then(function() {
-        getFirstAddress(function(address) {
-            expect(address).toBe(params.firstAddress);
-            done();
-        });
+        if (!comparePub) {
+            getFirstAddress(function(address) {
+                expect(address).toBe(params.firstAddress);
+                done();
+            });
+        } else {
+            getFirstPublicKey(function(pubkey) {
+                expect(pubkey).toBe(params.firstPubKey);
+                done();
+            });
+        }
     });
 }
 
@@ -98,6 +105,10 @@ function getFirstAddress(handler) {
     getFirstRowValue(handler, ".address");
 }
 
+function getFirstPublicKey(handler) {
+    getFirstRowValue(handler, ".pubkey");
+}
+
 function getFirstPath(handler) {
     getFirstRowValue(handler, ".index");
 }
@@ -853,6 +864,13 @@ it('Allows selection of Einsteinium', function(done) {
     };
     testNetwork(done, params);
 });
+it('Allows selection of EOSIO', function(done) {
+    var params = {
+        selectText: "EOS - EOSIO",
+        firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy",
+    };
+    testNetowrk(done, params, true);
+});
 it('Allows selection of Europecoin', function(done) {
     var params = {
         selectText: "ERC - Europecoin",