mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Remove non-English BIP85 languages
This commit is contained in:
@@ -302,14 +302,14 @@
|
|||||||
<div class="col-sm-10 languages">
|
<div class="col-sm-10 languages">
|
||||||
<select id="bip85-mnemonic-language" class="strength form-control">
|
<select id="bip85-mnemonic-language" class="strength form-control">
|
||||||
<option value="0" selected>English</option>
|
<option value="0" selected>English</option>
|
||||||
<option value="1">日本語</option>
|
<!--<option value="1">日本語</option>
|
||||||
<option value="2">한국어</option>
|
<option value="2">한국어</option>
|
||||||
<option value="3">Español</option>
|
<option value="3">Español</option>
|
||||||
<option value="4">中文(简体)</option>
|
<option value="4">中文(简体)</option>
|
||||||
<option value="5">中文(繁體)</option>
|
<option value="5">中文(繁體)</option>
|
||||||
<option value="6">Français</option>
|
<option value="6">Français</option>
|
||||||
<option value="7">Italiano</option>
|
<option value="7">Italiano</option>
|
||||||
<option value="8">Čeština</option>
|
<option value="8">Čeština</option>-->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -168,6 +168,17 @@ function selectNetwork(name) {
|
|||||||
}, name);
|
}, 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) {
|
function testEntropyType(done, entropyText, entropyTypeUnsafe) {
|
||||||
// entropy type is compiled into regexp so needs escaping
|
// entropy type is compiled into regexp so needs escaping
|
||||||
// see https://stackoverflow.com/a/2593661
|
// see https://stackoverflow.com/a/2593661
|
||||||
@@ -4988,6 +4999,25 @@ it('Show BIP85', function(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 manually specifying the entropy type
|
||||||
it('Allows entropy type to be manually selected', function(done) {
|
it('Allows entropy type to be manually selected', function(done) {
|
||||||
driver.findElement(By.css('.use-entropy'))
|
driver.findElement(By.css('.use-entropy'))
|
||||||
|
|||||||
Reference in New Issue
Block a user