diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 18:16:27 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 18:16:27 +1000 |
commit | cf7258fd4f822891f8906844177d2839f63e861b (patch) | |
tree | f32e19e5b516bcdeb48d41dc835bdc6b0cde1dff | |
parent | 3eef9d0d36adf3e1034fe7a11ccd4802505218ca (diff) | |
download | BIP39-cf7258fd4f822891f8906844177d2839f63e861b.tar.gz BIP39-cf7258fd4f822891f8906844177d2839f63e861b.tar.zst BIP39-cf7258fd4f822891f8906844177d2839f63e861b.zip |
Test changing tabs
-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 |