diff options
author | Jeeyong Um <conr2d@gmail.com> | 2019-06-02 11:51:52 +0900 |
---|---|---|
committer | Jeeyong Um <conr2d@gmail.com> | 2019-06-02 11:51:52 +0900 |
commit | 0ae59396f5407f269206c58392b2638ea37455a8 (patch) | |
tree | 414769f8877e1481066811509b449e4515060d28 /tests | |
parent | 3451d1a81bf3a25d85e4919916772c5bd4b6cd05 (diff) | |
download | BIP39-0ae59396f5407f269206c58392b2638ea37455a8.tar.gz BIP39-0ae59396f5407f269206c58392b2638ea37455a8.tar.zst BIP39-0ae59396f5407f269206c58392b2638ea37455a8.zip |
Add EOSIO test spec
Diffstat (limited to 'tests')
-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", |