aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/tests.js28
1 files changed, 23 insertions, 5 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index b307f15..2685fa6 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
76function testNetwork(done, params) { 76function 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
108function getFirstPublicKey(handler) {
109 getFirstRowValue(handler, ".pubkey");
110}
111
101function getFirstPath(handler) { 112function getFirstPath(handler) {
102 getFirstRowValue(handler, ".index"); 113 getFirstRowValue(handler, ".index");
103} 114}
@@ -867,6 +878,13 @@ it('Allows selection of Einsteinium', function(done) {
867 }; 878 };
868 testNetwork(done, params); 879 testNetwork(done, params);
869}); 880});
881it('Allows selection of EOSIO', function(done) {
882 var params = {
883 selectText: "EOS - EOSIO",
884 firstPubKey: "EOS692VJTBK3Rmw93onNnpnZ8ZtmE9PdxjDStArvbyzoe11QUTNoy",
885 };
886 testNetowrk(done, params, true);
887});
870it('Allows selection of Europecoin', function(done) { 888it('Allows selection of Europecoin', function(done) {
871 var params = { 889 var params = {
872 selectText: "ERC - Europecoin", 890 selectText: "ERC - Europecoin",