X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=90cdc7afd84a66031ab15ee33ed6112475a62d20;hb=858c29e3be1697f9c53bcc65bf6bd6815f701bba;hp=b307f15031b88756088576ceafe86d555a2142f9;hpb=7f59c88dbceca330c6846f27c1423c8e7fe2009e;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests/spec/tests.js b/tests/spec/tests.js index b307f15..90cdc7a 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -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"); } @@ -867,6 +878,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", @@ -1094,7 +1112,7 @@ it('Allows selection of Omnicore', function(done) { it('Allows selection of DeepOnion', function(done) { var params = { selectText: "ONION - DeepOnion", - firstAddress: "DVioZ2Rjc9krDf5bbHuixznSDumzvGpzVw", + firstAddress: "DYREY7XCFXVqJ3x5UuN43k2JwD2s1kif48", }; testNetwork(done, params); });