diff options
-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) { |