diff options
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 33 |
1 files changed, 31 insertions, 2 deletions
@@ -493,11 +493,40 @@ page.open(url, function(status) { | |||
493 | }); | 493 | }); |
494 | }, | 494 | }, |
495 | 495 | ||
496 | // TODO finish these tests | ||
497 | |||
498 | // Tabs show correct addresses when changed | 496 | // Tabs show correct addresses when changed |
497 | function() { | ||
498 | page.open(url, function(status) { | ||
499 | // set the phrase | ||
500 | var expected = "17uQ7s2izWPwBmEVFikTmZUjbBKWYdJchz"; | ||
501 | page.evaluate(function() { | ||
502 | $(".phrase").val("abandon abandon ability"); | ||
503 | $(".phrase").trigger("input"); | ||
504 | }); | ||
505 | // change tabs | ||
506 | waitForGenerate(function() { | ||
507 | page.evaluate(function() { | ||
508 | $("#bip32-tab a").click(); | ||
509 | }); | ||
510 | // check the address is generated correctly | ||
511 | waitForGenerate(function() { | ||
512 | var actual = page.evaluate(function() { | ||
513 | return $(".address:first").text(); | ||
514 | }); | ||
515 | if (actual != expected) { | ||
516 | console.log("Clicking tab generates incorrect address"); | ||
517 | console.log("Expected: " + expected); | ||
518 | console.log("Actual: " + actual); | ||
519 | fail(); | ||
520 | } | ||
521 | next(); | ||
522 | }); | ||
523 | }); | ||
524 | }); | ||
525 | }, | ||
499 | 526 | ||
500 | // BIP44 derivation path is shown | 527 | // BIP44 derivation path is shown |
528 | // TODO finish these tests | ||
529 | |||
501 | // BIP44 extended private key is shown | 530 | // BIP44 extended private key is shown |
502 | // BIP44 extended public key is shown | 531 | // BIP44 extended public key is shown |
503 | // BIP44 purpose field changes address list | 532 | // BIP44 purpose field changes address list |