mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-17 16:02:16 +00:00
Test github issue 23: derivation path on bip32 tab
This commit is contained in:
50
tests.js
50
tests.js
@@ -1652,8 +1652,56 @@ page.open(url, function(status) {
|
||||
});
|
||||
},
|
||||
|
||||
// Github Issue 23: Use correct derivation path when changing tabs
|
||||
// Github Issue 23: Part 1: Use correct derivation path when changing tabs
|
||||
// https://github.com/dcpos/bip39/issues/23
|
||||
function() {
|
||||
page.open(url, function(status) {
|
||||
// 1) and 2) set the phrase
|
||||
page.evaluate(function() {
|
||||
$(".phrase").val("abandon abandon ability").trigger("input");
|
||||
});
|
||||
waitForGenerate(function() {
|
||||
// 3) select bip32 tab
|
||||
page.evaluate(function() {
|
||||
$("#bip32-tab a").click();
|
||||
});
|
||||
waitForGenerate(function() {
|
||||
// 4) switch from bitcoin to litecoin
|
||||
page.evaluate(function() {
|
||||
$(".network").val("2").trigger("change");
|
||||
});
|
||||
waitForGenerate(function() {
|
||||
// 5) Check derivation path is displayed correctly
|
||||
var expected = "m/0/0";
|
||||
var actual = page.evaluate(function() {
|
||||
return $(".index:first").text();
|
||||
});
|
||||
if (actual != expected) {
|
||||
console.log("Github Issue 23 Part 1: derivation path display error");
|
||||
console.log("Expected: " + expected);
|
||||
console.log("Actual: " + actual);
|
||||
fail();
|
||||
}
|
||||
// 5) Check address is displayed correctly
|
||||
var expected = "LS8MP5LZ5AdzSZveRrjm3aYVoPgnfFh5T5";
|
||||
var actual = page.evaluate(function() {
|
||||
return $(".address:first").text();
|
||||
});
|
||||
if (actual != expected) {
|
||||
console.log("Github Issue 23 Part 1: address display error");
|
||||
console.log("Expected: " + expected);
|
||||
console.log("Actual: " + actual);
|
||||
fail();
|
||||
}
|
||||
next();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// Github Issue 23 Part 2: Coin selection in derivation path
|
||||
// https://github.com/dcpos/bip39/issues/23#issuecomment-238011920
|
||||
|
||||
// Github Issue 26: When using a Root key derrived altcoins are incorrect
|
||||
// https://github.com/dcpos/bip39/issues/26
|
||||
|
||||
Reference in New Issue
Block a user