X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests.js;h=49d42c3e049fc24bc500b1a7caac75a949e08ca2;hb=9504fb93936ea7022709f67e84133de940dc06a6;hp=d55b8f4730379bb34a9591362939427a282266ce;hpb=d2d98ef7a6b859ea173d044677e0b1abf1dceb41;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests.js b/tests.js index d55b8f4..49d42c3 100644 --- a/tests.js +++ b/tests.js @@ -571,6 +571,36 @@ page.open(url, function(status) { }); }, +// Network can be set to game +function() { +page.open(url, function(status) { + // set the phrase and coin + var expected = "GSMY9bAp36cMR4zyT4uGVS7GFjpdXbao5Q"; + page.evaluate(function() { + $(".phrase").val("abandon abandon ability"); + $(".phrase").trigger("input"); + $(".network option[selected]").removeAttr("selected"); + $(".network option").filter(function() { + return $(this).html() == "GAME"; + }).prop("selected", true); + $(".network").trigger("change"); + }); + // check the address is generated correctly + waitForGenerate(function() { + var actual = page.evaluate(function() { + return $(".address:first").text(); + }); + if (actual != expected) { + console.log("GAME address is incorrect"); + console.log("Expected: " + expected); + console.log("Actual: " + actual); + fail(); + } + next(); + }); +}); +}, + // Network can be set to namecoin function() { page.open(url, function(status) {