X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=c92689a78c247e3e3e82c0a63321a3dba9e262b1;hp=b307f15031b88756088576ceafe86d555a2142f9;hb=82e3938afe3e76000b58e6a49e204ffff10fbd5a;hpb=7f59c88dbceca330c6846f27c1423c8e7fe2009e diff --git a/tests/spec/tests.js b/tests/spec/tests.js index b307f15..c92689a 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); }); @@ -1224,6 +1242,20 @@ it('Allows selection of Toa', function(done) { }; testNetwork(done, params); }); +it('Allows selection of TWINS', function(done) { + var params = { + selectText: "TWINS - TWINS", + firstAddress: "WPpJnfLLubNmF7HLNxg8d8zH5haxn4wri8", + }; + testNetwork(done, params); +}); +it('Allows selection of TWINS testnet', function(done) { + var params = { + selectText: "TWINS - TWINS Testnet", + firstAddress: "XpnU1HHdNG5YxvG9Rez4wjmidchxqnZaNa", + }; + testNetwork(done, params); +}); it('Allows selection of Ultimatesecurecash', function(done) { var params = { selectText: "USC - Ultimatesecurecash",