Add EOSIO test spec

This commit is contained in:
Jeeyong Um
2019-06-02 11:51:52 +09:00
parent 3451d1a81b
commit 0ae59396f5
+23 -5
View File
@@ -73,16 +73,23 @@ else if (browser == "chrome") {
// Helper functions // Helper functions
function testNetwork(done, params) { function testNetwork(done, params, comparePub = false) {
var phrase = params.phrase || 'abandon abandon ability'; var phrase = params.phrase || 'abandon abandon ability';
driver.findElement(By.css('.phrase')) driver.findElement(By.css('.phrase'))
.sendKeys(phrase); .sendKeys(phrase);
selectNetwork(params.selectText); selectNetwork(params.selectText);
driver.sleep(generateDelay).then(function() { driver.sleep(generateDelay).then(function() {
getFirstAddress(function(address) { if (!comparePub) {
expect(address).toBe(params.firstAddress); getFirstAddress(function(address) {
done(); 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"); getFirstRowValue(handler, ".address");
} }
function getFirstPublicKey(handler) {
getFirstRowValue(handler, ".pubkey");
}
function getFirstPath(handler) { function getFirstPath(handler) {
getFirstRowValue(handler, ".index"); getFirstRowValue(handler, ".index");
} }
@@ -853,6 +864,13 @@ it('Allows selection of Einsteinium', function(done) {
}; };
testNetwork(done, params); 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) { it('Allows selection of Europecoin', function(done) {
var params = { var params = {
selectText: "ERC - Europecoin", selectText: "ERC - Europecoin",