}, name);
}
+function selectBip85Language(language) {
+ driver.executeScript(function() {
+ var selectText = arguments[0];
+ $(".bip85-mnemonic-language option[selected]").removeAttr("selected");
+ $(".bip85-mnemonic-language option").filter(function(i,e) {
+ return $(e).html() == selectText;
+ }).prop("selected", true);
+ $(".bip85-mnemonic-language").trigger("change");
+ }, language);
+}
+
function testEntropyType(done, entropyText, entropyTypeUnsafe) {
// entropy type is compiled into regexp so needs escaping
// see https://stackoverflow.com/a/2593661
};
testNetwork(done, params);
});
+it('Allows selection of Firo', function(done) {
+ var params = {
+ selectText: "FIRO - Firo (Zcoin rebrand)",
+ phrase: "abandon abandon ability",
+ firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
+ firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
+ firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
+ };
+ testNetwork(done, params);
+});
+it('Allows selection of Zcoin', function(done) {
+ var params = {
+ selectText: "XZC - Zcoin (rebranded to Firo)",
+ phrase: "abandon abandon ability",
+ firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
+ firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
+ firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
+ };
+ testNetwork(done, params);
+});
it('Allows selection of Firstcoin', function(done) {
var params = {
selectText: "FRST - Firstcoin",
};
testNetwork(done, params);
});
-it('Allows selection of Zcoin', function(done) {
- var params = {
- selectText: "XZC - Zcoin",
- phrase: "abandon abandon ability",
- firstAddress: "a6VcMdP4XgAA9Tr7xNszmPG5FZpfRf17Cq",
- firstPubKey: "0236f2348c32dc62d69488b01988ed1154df261723ec60461cb6e62189984c62db",
- firstPrivKey: "Y8k3XQRQrJoABEao4Sw45s744g6xth7yviNqFcN7zqPqKUJrrKTQ",
- };
- testNetwork(done, params);
-});
it('Allows selection of Zcash', function(done) {
var params = {
selectText: "ZEC - Zcash",
});
});
+// Pull Request 454 https://github.com/iancoleman/bip39/pull/454
+// Add BIP85 support
+it('Show BIP85', function(done) {
+ var originalPhrase = "install scatter logic circle pencil average fall shoe quantum disease suspect usage";
+ driver.findElement(By.css('.phrase'))
+ .sendKeys(originalPhrase);
+ driver.sleep(generateDelay).then(function() {
+ driver.findElement(By.css('.showBip85')).click();
+ driver.findElement(By.css('.showBip85')).isSelected().then(function(isSelected) {
+ expect(isSelected).toBe(true)
+ driver.findElement(By.css('#bip85Field')).getAttribute("value").then(function(childMnemonic) {
+ expect(childMnemonic).toBe('girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose')
+ done();
+ })
+ });
+ });
+});
+
+it('Show BIP85 in non-English languages', function(done) {
+ pending("BIP85 library update");
+ var originalPhrase = "install scatter logic circle pencil average fall shoe quantum disease suspect usage";
+ driver.findElement(By.css('.phrase'))
+ .sendKeys(originalPhrase);
+ driver.sleep(generateDelay).then(function() {
+ driver.findElement(By.css('.showBip85')).click();
+ selectBip85Language("3");
+ driver.findElement(By.css('.showBip85')).isSelected().then(function(isSelected) {
+ expect(isSelected).toBe(true)
+ driver.findElement(By.css('#bip85Field')).getAttribute("value").then(function(childMnemonic) {
+ expect(childMnemonic).not.toBe('girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose')
+ //expect(childMnemonic).toBe('Not sure yet, something Spanish')
+ done();
+ })
+ });
+ });
+});
+
// It allows manually specifying the entropy type
it('Allows entropy type to be manually selected', function(done) {
driver.findElement(By.css('.use-entropy'))