mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Add EOSIO test spec
This commit is contained in:
@@ -73,16 +73,23 @@ else if (browser == "chrome") {
|
||||
|
||||
// Helper functions
|
||||
|
||||
function testNetwork(done, params) {
|
||||
function testNetwork(done, params, comparePub = false) {
|
||||
var phrase = params.phrase || 'abandon abandon ability';
|
||||
driver.findElement(By.css('.phrase'))
|
||||
.sendKeys(phrase);
|
||||
selectNetwork(params.selectText);
|
||||
driver.sleep(generateDelay).then(function() {
|
||||
getFirstAddress(function(address) {
|
||||
expect(address).toBe(params.firstAddress);
|
||||
done();
|
||||
});
|
||||
if (!comparePub) {
|
||||
getFirstAddress(function(address) {
|
||||
expect(address).toBe(params.firstAddress);
|
||||
done();
|
||||
});
|
||||
} else {
|
||||
getFirstPublicKey(function(pubkey) {
|
||||
expect(pubkey).toBe(params.firstPubKey);
|
||||
done();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -98,6 +105,10 @@ function getFirstAddress(handler) {
|
||||
getFirstRowValue(handler, ".address");
|
||||
}
|
||||
|
||||
function getFirstPublicKey(handler) {
|
||||
getFirstRowValue(handler, ".pubkey");
|
||||
}
|
||||
|
||||
function getFirstPath(handler) {
|
||||
getFirstRowValue(handler, ".index");
|
||||
}
|
||||
@@ -853,6 +864,13 @@ it('Allows selection of Einsteinium', function(done) {
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of EOSIO', function(done) {
|
||||
var params = {
|
||||
selectText: "EOS - EOSIO",
|
||||
firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy",
|
||||
};
|
||||
testNetowrk(done, params, true);
|
||||
});
|
||||
it('Allows selection of Europecoin', function(done) {
|
||||
var params = {
|
||||
selectText: "ERC - Europecoin",
|
||||
|
||||
Reference in New Issue
Block a user