From: mikeyb Date: Mon, 24 Apr 2017 00:00:13 +0000 (-0700) Subject: add test for GAME X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=00fd1a035cce0ac56f07bc8aaafb85674a15d77a add test for GAME --- 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) {