From 0ae59396f5407f269206c58392b2638ea37455a8 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Sun, 2 Jun 2019 11:51:52 +0900 Subject: [PATCH] Add EOSIO test spec --- tests/spec/tests.js | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/tests/spec/tests.js b/tests/spec/tests.js index e3f7e1c..3d72abd 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -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", -- 2.41.0