diff options
author | iancoleman <coleman.ian@gmail.com> | 2017-04-28 09:16:29 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-28 09:16:29 +1000 |
commit | 0d1150545f04843a1fbe09f2e8f612a800aed7a8 (patch) | |
tree | c7173183f932c6e30e340a9a723cb0679bf30097 /tests.js | |
parent | 6e0f24b1bad48911d66355dc37e0676006c0071b (diff) | |
parent | 00fd1a035cce0ac56f07bc8aaafb85674a15d77a (diff) | |
download | BIP39-0d1150545f04843a1fbe09f2e8f612a800aed7a8.tar.gz BIP39-0d1150545f04843a1fbe09f2e8f612a800aed7a8.tar.zst BIP39-0d1150545f04843a1fbe09f2e8f612a800aed7a8.zip |
Merge pull request #65 from mikeyb/game
Add GAME support
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -571,6 +571,36 @@ page.open(url, function(status) { | |||
571 | }); | 571 | }); |
572 | }, | 572 | }, |
573 | 573 | ||
574 | // Network can be set to game | ||
575 | function() { | ||
576 | page.open(url, function(status) { | ||
577 | // set the phrase and coin | ||
578 | var expected = "GSMY9bAp36cMR4zyT4uGVS7GFjpdXbao5Q"; | ||
579 | page.evaluate(function() { | ||
580 | $(".phrase").val("abandon abandon ability"); | ||
581 | $(".phrase").trigger("input"); | ||
582 | $(".network option[selected]").removeAttr("selected"); | ||
583 | $(".network option").filter(function() { | ||
584 | return $(this).html() == "GAME"; | ||
585 | }).prop("selected", true); | ||
586 | $(".network").trigger("change"); | ||
587 | }); | ||
588 | // check the address is generated correctly | ||
589 | waitForGenerate(function() { | ||
590 | var actual = page.evaluate(function() { | ||
591 | return $(".address:first").text(); | ||
592 | }); | ||
593 | if (actual != expected) { | ||
594 | console.log("GAME address is incorrect"); | ||
595 | console.log("Expected: " + expected); | ||
596 | console.log("Actual: " + actual); | ||
597 | fail(); | ||
598 | } | ||
599 | next(); | ||
600 | }); | ||
601 | }); | ||
602 | }, | ||
603 | |||
574 | // Network can be set to namecoin | 604 | // Network can be set to namecoin |
575 | function() { | 605 | function() { |
576 | page.open(url, function(status) { | 606 | page.open(url, function(status) { |