From 02f4a90ebb08b5b519c3f2cf8bf9616615820e45 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Mon, 3 Oct 2016 11:04:44 +1100 Subject: Test incorrect root key shows error --- tests.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests.js b/tests.js index 0176ba8..90dcab5 100644 --- a/tests.js +++ b/tests.js @@ -1478,6 +1478,27 @@ page.open(url, function(status) { }, // Incorrect BIP32 root key shows error +function() { +page.open(url, function(status) { + // set the root key + page.evaluate(function() { + $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpj").trigger("input"); + }); + // check there is an error shown + waitForFeedback(function() { + var feedback = page.evaluate(function() { + return $(".feedback").text(); + }); + if (feedback != "Invalid root key") { + console.log("Invalid root key does not show error"); + console.log("Error: " + error); + fail(); + } + next(); + }); +}); +}, + // Derivation path not starting with m shows error // Derivation path containing invalid characters shows useful error -- cgit v1.2.3