diff options
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -723,6 +723,66 @@ page.open(url, function(status) { | |||
723 | }); | 723 | }); |
724 | }, | 724 | }, |
725 | 725 | ||
726 | // Network can be set to Slimcoin | ||
727 | function() { | ||
728 | page.open(url, function(status) { | ||
729 | // set the phrase and coin | ||
730 | var expected = "SNzPi1CafHFm3WWjRo43aMgiaEEj3ogjww"; | ||
731 | page.evaluate(function() { | ||
732 | $(".phrase").val("abandon abandon ability"); | ||
733 | $(".phrase").trigger("input"); | ||
734 | $(".network option[selected]").removeAttr("selected"); | ||
735 | $(".network option").filter(function() { | ||
736 | return $(this).html() == "Slimcoin"; | ||
737 | }).prop("selected", true); | ||
738 | $(".network").trigger("change"); | ||
739 | }); | ||
740 | // check the address is generated correctly | ||
741 | waitForGenerate(function() { | ||
742 | var actual = page.evaluate(function() { | ||
743 | return $(".address:first").text(); | ||
744 | }); | ||
745 | if (actual != expected) { | ||
746 | console.log("Slimcoin address is incorrect"); | ||
747 | console.log("Expected: " + expected); | ||
748 | console.log("Actual: " + actual); | ||
749 | fail(); | ||
750 | } | ||
751 | next(); | ||
752 | }); | ||
753 | }); | ||
754 | }, | ||
755 | |||
756 | // Network can be set to Slimcointn | ||
757 | function() { | ||
758 | page.open(url, function(status) { | ||
759 | // set the phrase and coin | ||
760 | var expected = "n3nMgWufTek5QQAr6uwMhg5xbzj8xqc4Dq"; | ||
761 | page.evaluate(function() { | ||
762 | $(".phrase").val("abandon abandon ability"); | ||
763 | $(".phrase").trigger("input"); | ||
764 | $(".network option[selected]").removeAttr("selected"); | ||
765 | $(".network option").filter(function() { | ||
766 | return $(this).html() == "Slimcoin Testnet"; | ||
767 | }).prop("selected", true); | ||
768 | $(".network").trigger("change"); | ||
769 | }); | ||
770 | // check the address is generated correctly | ||
771 | waitForGenerate(function() { | ||
772 | var actual = page.evaluate(function() { | ||
773 | return $(".address:first").text(); | ||
774 | }); | ||
775 | if (actual != expected) { | ||
776 | console.log("Slimcoin testnet address is incorrect"); | ||
777 | console.log("Expected: " + expected); | ||
778 | console.log("Actual: " + actual); | ||
779 | fail(); | ||
780 | } | ||
781 | next(); | ||
782 | }); | ||
783 | }); | ||
784 | }, | ||
785 | |||
726 | // BIP39 seed is set from phrase | 786 | // BIP39 seed is set from phrase |
727 | function() { | 787 | function() { |
728 | page.open(url, function(status) { | 788 | page.open(url, function(status) { |