X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=blobdiff_plain;f=tests%2Fspec%2Ftests.js;h=0e85eccf8ac96736e9fb7bcc558dcfaa56d3cc6e;hp=7710b7a6ac3dcf71ff330909e66e68eb1ee689f3;hb=dfb4fd1be5343674f4ca2222d685a9f8b83c34d9;hpb=aa793f572f26ad20740f28040de13431c973dfb8 diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 7710b7a..0e85ecc 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -595,7 +595,6 @@ it('Allows selection of ethereum', function(done) { firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772", }; testNetwork(done, params); - // TODO test private key and public key }); it('Allows selection of slimcoin', function(done) { var params = { @@ -4341,4 +4340,20 @@ it('Generates addresses when seed is set', function(done) { }); }); +// https://github.com/iancoleman/bip39/issues/169 +it('Generates ethereum addresses from a public key', function(done) { + var pubkey = "xpub68UK3hrMEp2jLPxPASgXSiqiUsQsUWZHCeuu6NqcJLt259LMeWzwDyufXLN1QmjLeLRY5he4QfArDDLbsXiw3xN3kFcYtyDy74BY73RPhhW"; + driver.findElement(By.css('.root-key')) + .sendKeys(pubkey); + driver.findElement(By.css('#bip32-tab a')) + .click() + selectNetwork('ETH - Ethereum'); + driver.sleep(generateDelay).then(function() { + getFirstAddress(function(address) { + expect(address).toBe("0x1Bd54748903438C7E386b4a3fCbe16237A316a98"); + done(); + }); + }); +}); + });