aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authoriancoleman <1281387+iancoleman@users.noreply.github.com>2019-06-11 09:39:00 +1000
committerGitHub <noreply@github.com>2019-06-11 09:39:00 +1000
commit5a085aed79e93c3c716a3aa0b541d0728b485340 (patch)
treef8eb851f8ed190c7d4b8628d67253d0dff5be802 /tests/spec
parent21e2e6c95158c720ce816f1df3a758217a8c2034 (diff)
parent7d68d5474e9354699b05637a8645a0b749e52c81 (diff)
downloadBIP39-5a085aed79e93c3c716a3aa0b541d0728b485340.tar.gz
BIP39-5a085aed79e93c3c716a3aa0b541d0728b485340.tar.zst
BIP39-5a085aed79e93c3c716a3aa0b541d0728b485340.zip
Merge pull request #333 from conr2d/eosio-support
Add support EOSIO
Diffstat (limited to 'tests/spec')
-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",