diff options
-rw-r--r-- | tests/spec/tests.js | 28 |
1 files 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") { | |||
73 | 73 | ||
74 | // Helper functions | 74 | // Helper functions |
75 | 75 | ||
76 | function testNetwork(done, params) { | 76 | function testNetwork(done, params, comparePub = false) { |
77 | var phrase = params.phrase || 'abandon abandon ability'; | 77 | var phrase = params.phrase || 'abandon abandon ability'; |
78 | driver.findElement(By.css('.phrase')) | 78 | driver.findElement(By.css('.phrase')) |
79 | .sendKeys(phrase); | 79 | .sendKeys(phrase); |
80 | selectNetwork(params.selectText); | 80 | selectNetwork(params.selectText); |
81 | driver.sleep(generateDelay).then(function() { | 81 | driver.sleep(generateDelay).then(function() { |
82 | getFirstAddress(function(address) { | 82 | if (!comparePub) { |
83 | expect(address).toBe(params.firstAddress); | 83 | getFirstAddress(function(address) { |
84 | done(); | 84 | expect(address).toBe(params.firstAddress); |
85 | }); | 85 | done(); |
86 | }); | ||
87 | } else { | ||
88 | getFirstPublicKey(function(pubkey) { | ||
89 | expect(pubkey).toBe(params.firstPubKey); | ||
90 | done(); | ||
91 | }); | ||
92 | } | ||
86 | }); | 93 | }); |
87 | } | 94 | } |
88 | 95 | ||
@@ -98,6 +105,10 @@ function getFirstAddress(handler) { | |||
98 | getFirstRowValue(handler, ".address"); | 105 | getFirstRowValue(handler, ".address"); |
99 | } | 106 | } |
100 | 107 | ||
108 | function getFirstPublicKey(handler) { | ||
109 | getFirstRowValue(handler, ".pubkey"); | ||
110 | } | ||
111 | |||
101 | function getFirstPath(handler) { | 112 | function getFirstPath(handler) { |
102 | getFirstRowValue(handler, ".index"); | 113 | getFirstRowValue(handler, ".index"); |
103 | } | 114 | } |
@@ -853,6 +864,13 @@ it('Allows selection of Einsteinium', function(done) { | |||
853 | }; | 864 | }; |
854 | testNetwork(done, params); | 865 | testNetwork(done, params); |
855 | }); | 866 | }); |
867 | it('Allows selection of EOSIO', function(done) { | ||
868 | var params = { | ||
869 | selectText: "EOS - EOSIO", | ||
870 | firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy", | ||
871 | }; | ||
872 | testNetowrk(done, params, true); | ||
873 | }); | ||
856 | it('Allows selection of Europecoin', function(done) { | 874 | it('Allows selection of Europecoin', function(done) { |
857 | var params = { | 875 | var params = { |
858 | selectText: "ERC - Europecoin", | 876 | selectText: "ERC - Europecoin", |