diff options
author | amougel <alix.mougel@gmail.com> | 2017-06-02 14:27:12 +0200 |
---|---|---|
committer | amougel <alix.mougel@gmail.com> | 2017-06-02 14:27:12 +0200 |
commit | a96cfdf3d3f170b00d0ef5a10f660f46b318af72 (patch) | |
tree | 9e9e19b3cb8d5bd266595401d30aca9eaf31e2d2 | |
parent | 8a1f452d03f81c917182d61895b68a1a5201ca31 (diff) | |
download | BIP39-a96cfdf3d3f170b00d0ef5a10f660f46b318af72.tar.gz BIP39-a96cfdf3d3f170b00d0ef5a10f660f46b318af72.tar.zst BIP39-a96cfdf3d3f170b00d0ef5a10f660f46b318af72.zip |
Added test
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -331,6 +331,36 @@ page.open(url, function(status) { | |||
331 | }); | 331 | }); |
332 | }, | 332 | }, |
333 | 333 | ||
334 | // Network can be set to ripple | ||
335 | function() { | ||
336 | page.open(url, function(status) { | ||
337 | // set the phrase and coin | ||
338 | var expected = "rLTFnqbmCVPGx6VfaygdtuKWJgcN4v1zRS"; | ||
339 | page.evaluate(function() { | ||
340 | $(".phrase").val("ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve"); | ||
341 | $(".phrase").trigger("input"); | ||
342 | $(".network option[selected]").removeAttr("selected"); | ||
343 | $(".network option").filter(function() { | ||
344 | return $(this).html() == "Ripple"; | ||
345 | }).prop("selected", true); | ||
346 | $(".network").trigger("change"); | ||
347 | }); | ||
348 | // check the address is generated correctly | ||
349 | waitForGenerate(function() { | ||
350 | var actual = page.evaluate(function() { | ||
351 | return $(".address:first").text(); | ||
352 | }); | ||
353 | if (actual != expected) { | ||
354 | console.log("Litecoin address is incorrect"); | ||
355 | console.log("Expected: " + expected); | ||
356 | console.log("Actual: " + actual); | ||
357 | fail(); | ||
358 | } | ||
359 | next(); | ||
360 | }); | ||
361 | }); | ||
362 | }, | ||
363 | |||
334 | // Network can be set to dogecoin | 364 | // Network can be set to dogecoin |
335 | function() { | 365 | function() { |
336 | page.open(url, function(status) { | 366 | page.open(url, function(status) { |