diff options
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -872,6 +872,36 @@ page.open(url, function(status) { | |||
872 | }); | 872 | }); |
873 | }, | 873 | }, |
874 | 874 | ||
875 | // Network can be set to bitcoin cash | ||
876 | function() { | ||
877 | page.open(url, function(status) { | ||
878 | // set the phrase and coin | ||
879 | var expected = "1JKvb6wKtsjNoCRxpZ4DGrbniML7z5U16A"; | ||
880 | page.evaluate(function() { | ||
881 | $(".phrase").val("abandon abandon ability"); | ||
882 | $(".phrase").trigger("input"); | ||
883 | $(".network option[selected]").removeAttr("selected"); | ||
884 | $(".network option").filter(function() { | ||
885 | return $(this).html() == "BCH - Bitcoin Cash"; | ||
886 | }).prop("selected", true); | ||
887 | $(".network").trigger("change"); | ||
888 | }); | ||
889 | // check the address is generated correctly | ||
890 | waitForGenerate(function() { | ||
891 | var actual = page.evaluate(function() { | ||
892 | return $(".address:first").text(); | ||
893 | }); | ||
894 | if (actual != expected) { | ||
895 | console.log("Bitcoin Cash address is incorrect"); | ||
896 | console.log("Expected: " + expected); | ||
897 | console.log("Actual: " + actual); | ||
898 | fail(); | ||
899 | } | ||
900 | next(); | ||
901 | }); | ||
902 | }); | ||
903 | }, | ||
904 | |||
875 | // BIP39 seed is set from phrase | 905 | // BIP39 seed is set from phrase |
876 | function() { | 906 | function() { |
877 | page.open(url, function(status) { | 907 | page.open(url, function(status) { |