From 4b316b561f0b59dc17291792ee852cbbe5e7f672 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 29 May 2019 23:14:05 -0230 Subject: [PATCH 1/2] e2e: Add a test for simple sends from one account to another --- ...476930e1a7f018de329c8e2073080f4fb1f320bc36 | 1 - ...62912d55c53c26a0fef5c23336741baf46933401f9 | 1 - e2e/fixtures/onboarded/state.json | 1 - e2e/fixtures/{onboarded => simple-send}/db.js | 1 + ...b3b20868a8b8555825ef6fc8fac6a397cc833ff9e} | 0 .../db/!blockLogs!0 | 0 .../db/!blockLogs!length | 0 .../{onboarded => simple-send}/db/!blocks!0 | 2 +- .../db/!blocks!length | 0 ...fa7481601253172b63d77e80278ab3d4895b20001b | 0 ...a6b70fab3c29d545df173e5798da1a3bef0efeb5d9 | 0 ...35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 | 0 ...68b20e31952619100e01a31e619f91393e34d80ab5 | 0 ...97c2d34d5d10e136757bf4cfff5fa41bfca219554a | 0 ...092e2b6133f6826e045c391501e80374760de69320 | 0 ...7c88c00e44733094250664cbfc9d9bbf9eda3ca745 | 0 ...fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 | 0 ...60ae2cacf0992cee785262027924cc9707fa0b65ad | 1 + ...0976490ab2c71a0643e9f16e16807811b7112ed032 | 0 ...5ac468fc88ab99335759bb47d22b0947229f0b170a | 0 ...0018ded196413ef989c0062341ff886889f39ab41b | 0 ...8e2ba8671e8ce23d8b8a8086d8367a65e923432e16 | 1 + ...126fd0b2eb33764bdb3ec5763b93968f205314944c | 0 ...2ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f | 0 ...4f69c7ba5d543b1e88b2479b7e040db4c9f3998197 | 1 + ...d7314112e1711cb73a4c80b6ede7fedceafdb5b5b1 | 1 + ...eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 | 0 ...41752157c205a391ec9a1b730031bccc77a9276b02 | 0 e2e/fixtures/simple-send/state.json | 1 + e2e/ganache/index.js | 2 +- e2e/index.js | 4 +++- e2e/tests/example.spec.js | 19 --------------- e2e/tests/simple-send/index.spec.js | 18 ++++++++++++++ e2e/webdriver/driver.js | 24 ++++++++++++++++++- 34 files changed, 52 insertions(+), 26 deletions(-) delete mode 100644 e2e/fixtures/onboarded/db/!trie_db!0x0f349783484ca73cad640a476930e1a7f018de329c8e2073080f4fb1f320bc36 delete mode 100644 e2e/fixtures/onboarded/db/!trie_db!0xa74e8ea594400a537aec9f62912d55c53c26a0fef5c23336741baf46933401f9 delete mode 100644 e2e/fixtures/onboarded/state.json rename e2e/fixtures/{onboarded => simple-send}/db.js (92%) rename e2e/fixtures/{onboarded/db/!blockHashes!0xaa6a17db3172fcabf66bf483c92772182d3e0800743e693140daa9343f0cdd14 => simple-send/db/!blockHashes!0x3ad963196f614689bd66146b3b20868a8b8555825ef6fc8fac6a397cc833ff9e} (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!blockLogs!0 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!blockLogs!length (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!blocks!0 (84%) rename e2e/fixtures/{onboarded => simple-send}/db/!blocks!length (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x372afacecb5d397370430cfa7481601253172b63d77e80278ab3d4895b20001b (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x4ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x5072a6c1e2e016ff4e5b6b35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x5e287c9213b0dcabfdf484092e2b6133f6826e045c391501e80374760de69320 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x67bcaf1d60f75a22d49b037c88c00e44733094250664cbfc9d9bbf9eda3ca745 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x77ecddca419c697a6aae21fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 (100%) create mode 100644 e2e/fixtures/simple-send/db/!trie_db!0x8180082a4ae6ecc7ef893160ae2cacf0992cee785262027924cc9707fa0b65ad rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x83097864ebee0be81925b10976490ab2c71a0643e9f16e16807811b7112ed032 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x8a083a05cf77f2f36f6c055ac468fc88ab99335759bb47d22b0947229f0b170a (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0x98ad39fb8468cbcb93a0990018ded196413ef989c0062341ff886889f39ab41b (100%) create mode 100644 e2e/fixtures/simple-send/db/!trie_db!0xb8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e16 rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0xc4f6a1f0b681632674246c126fd0b2eb33764bdb3ec5763b93968f205314944c (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0xc74b55ae25b522915216f62ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f (100%) create mode 100644 e2e/fixtures/simple-send/db/!trie_db!0xc8daf0efa1269a6ee5d5464f69c7ba5d543b1e88b2479b7e040db4c9f3998197 create mode 100644 e2e/fixtures/simple-send/db/!trie_db!0xd51801c3e9234174ee59ccd7314112e1711cb73a4c80b6ede7fedceafdb5b5b1 rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0xed57d93087e1a79ee9e3f6eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 (100%) rename e2e/fixtures/{onboarded => simple-send}/db/!trie_db!0xfe3d828c2803bd586bc34641752157c205a391ec9a1b730031bccc77a9276b02 (100%) create mode 100644 e2e/fixtures/simple-send/state.json delete mode 100644 e2e/tests/example.spec.js create mode 100644 e2e/tests/simple-send/index.spec.js diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x0f349783484ca73cad640a476930e1a7f018de329c8e2073080f4fb1f320bc36 b/e2e/fixtures/onboarded/db/!trie_db!0x0f349783484ca73cad640a476930e1a7f018de329c8e2073080f4fb1f320bc36 deleted file mode 100644 index e538512142c1..000000000000 --- a/e2e/fixtures/onboarded/db/!trie_db!0x0f349783484ca73cad640a476930e1a7f018de329c8e2073080f4fb1f320bc36 +++ /dev/null @@ -1 +0,0 @@ -"0xf851a04ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d980808080808080a0a74e8ea594400a537aec9f62912d55c53c26a0fef5c23336741baf46933401f98080808080808080" \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db/!trie_db!0xa74e8ea594400a537aec9f62912d55c53c26a0fef5c23336741baf46933401f9 b/e2e/fixtures/onboarded/db/!trie_db!0xa74e8ea594400a537aec9f62912d55c53c26a0fef5c23336741baf46933401f9 deleted file mode 100644 index d31effd0f39d..000000000000 --- a/e2e/fixtures/onboarded/db/!trie_db!0xa74e8ea594400a537aec9f62912d55c53c26a0fef5c23336741baf46933401f9 +++ /dev/null @@ -1 +0,0 @@ -"0xf85f943f9ddf6a7fa914d85c0038d911d3a74a7c5e556bb848f84680823039a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" \ No newline at end of file diff --git a/e2e/fixtures/onboarded/state.json b/e2e/fixtures/onboarded/state.json deleted file mode 100644 index 232837ce8202..000000000000 --- a/e2e/fixtures/onboarded/state.json +++ /dev/null @@ -1 +0,0 @@ -{"meta":{"version":31},"data":{"config":{},"firstTimeInfo":{"version":"6.1.0","date":1550768244136},"NoticeController":{"noticesList":[{"id":0,"read":true,"date":"Thu Feb 09 2017","title":"Terms of Use","body":""},{"id":2,"read":true,"date":"Mon May 08 2017","title":"Privacy Notice","body":""},{"id":4,"read":true,"date":"Wed Jun 13 2018","title":"Phishing Warning","body":""}]},"NetworkController":{"provider":{"type":"kovan"},"network":"42","settings":{"ticker":"ETH"}},"CurrencyController":{"currentCurrency":"usd","conversionRate":143.969,"conversionDate":1550768754,"nativeCurrency":"ETH","ticker":"ETH"},"CachedBalancesController":{"cachedBalances":{"1":{"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5":"0x0"},"42":{"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5":"0x0"}}},"PreferencesController":{"frequentRpcListDetail":[],"currentAccountTab":"history","accountTokens":{"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5":{"mainnet":[],"kovan":[]}},"assetImages":{},"tokens":[],"suggestedTokens":{},"useBlockie":false,"featureFlags":{"privacyMode":true},"knownMethodData":{},"currentLocale":"en","identities":{"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5":{"name":"Account 1","address":"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5"}},"lostIdentities":{},"seedWords":null,"forgottenPassword":false,"preferences":{"useNativeCurrencyAsPrimaryCurrency":true},"completedOnboarding":true,"completedUiMigration":true,"selectedAddress":"0x8e5d75d60224ea0c33d0041e75de68b1c3cb6dd5"},"KeyringController":{"vault":"{\"data\":\"w2shrODFq4CbC/1u1Oq95tw65fDKJOGwfHwTDWocFKYvsvmBkBDgbsQcEKKO9Q/xTDYjVXTr6eRgbT/TpjHhQCjANMksnp0etf81cHBNCFH3CCJu3juAEm/C0MNAXBJ03Sm5KimXhhvqLbog5AIfvCbWTtNlcnK7PhEZZHA/b+Q7bbgmteooWyyxqgs6xMmb24uBjtT3eaxmbGuJcXdQCvV7iQlob8Tg4r0NIseu2NScL6jw2PO83g==\",\"iv\":\"Ss5BfGRXZ6tr0fEVY4Qxnw==\",\"salt\":\"JaRdbATi9qXpEAeiSmCllJisE5zBAtWXJ0E5HmHalG0=\"}"}}} \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db.js b/e2e/fixtures/simple-send/db.js similarity index 92% rename from e2e/fixtures/onboarded/db.js rename to e2e/fixtures/simple-send/db.js index 3ba47494fd1e..553e99ccce2e 100644 --- a/e2e/fixtures/onboarded/db.js +++ b/e2e/fixtures/simple-send/db.js @@ -1,6 +1,7 @@ const path = require('path') module.exports = { + port: 8545, accounts: [{ balance: 12345, }], diff --git a/e2e/fixtures/onboarded/db/!blockHashes!0xaa6a17db3172fcabf66bf483c92772182d3e0800743e693140daa9343f0cdd14 b/e2e/fixtures/simple-send/db/!blockHashes!0x3ad963196f614689bd66146b3b20868a8b8555825ef6fc8fac6a397cc833ff9e similarity index 100% rename from e2e/fixtures/onboarded/db/!blockHashes!0xaa6a17db3172fcabf66bf483c92772182d3e0800743e693140daa9343f0cdd14 rename to e2e/fixtures/simple-send/db/!blockHashes!0x3ad963196f614689bd66146b3b20868a8b8555825ef6fc8fac6a397cc833ff9e diff --git a/e2e/fixtures/onboarded/db/!blockLogs!0 b/e2e/fixtures/simple-send/db/!blockLogs!0 similarity index 100% rename from e2e/fixtures/onboarded/db/!blockLogs!0 rename to e2e/fixtures/simple-send/db/!blockLogs!0 diff --git a/e2e/fixtures/onboarded/db/!blockLogs!length b/e2e/fixtures/simple-send/db/!blockLogs!length similarity index 100% rename from e2e/fixtures/onboarded/db/!blockLogs!length rename to e2e/fixtures/simple-send/db/!blockLogs!length diff --git a/e2e/fixtures/onboarded/db/!blocks!0 b/e2e/fixtures/simple-send/db/!blocks!0 similarity index 84% rename from e2e/fixtures/onboarded/db/!blocks!0 rename to e2e/fixtures/simple-send/db/!blocks!0 index 8f2ee5718492..3f5334989e09 100644 --- a/e2e/fixtures/onboarded/db/!blocks!0 +++ b/e2e/fixtures/simple-send/db/!blocks!0 @@ -1 +1 @@ -{"header":{"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","uncleHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","coinbase":"0x0000000000000000000000000000000000000000","stateRoot":"0x0f349783484ca73cad640a476930e1a7f018de329c8e2073080f4fb1f320bc36","transactionsTrie":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptTrie":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","bloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x","number":"0x","gasLimit":"0x6691b7","gasUsed":"0x","timestamp":"0x5c89b962","extraData":"0x","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x"},"transactions":[],"uncleHeaders":[]} \ No newline at end of file +{"header":{"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","uncleHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","coinbase":"0x0000000000000000000000000000000000000000","stateRoot":"0xd51801c3e9234174ee59ccd7314112e1711cb73a4c80b6ede7fedceafdb5b5b1","transactionsTrie":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptTrie":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","bloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x","number":"0x","gasLimit":"0x6691b7","gasUsed":"0x","timestamp":"0x5ceead06","extraData":"0x","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x"},"transactions":[],"uncleHeaders":[]} \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db/!blocks!length b/e2e/fixtures/simple-send/db/!blocks!length similarity index 100% rename from e2e/fixtures/onboarded/db/!blocks!length rename to e2e/fixtures/simple-send/db/!blocks!length diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x372afacecb5d397370430cfa7481601253172b63d77e80278ab3d4895b20001b b/e2e/fixtures/simple-send/db/!trie_db!0x372afacecb5d397370430cfa7481601253172b63d77e80278ab3d4895b20001b similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x372afacecb5d397370430cfa7481601253172b63d77e80278ab3d4895b20001b rename to e2e/fixtures/simple-send/db/!trie_db!0x372afacecb5d397370430cfa7481601253172b63d77e80278ab3d4895b20001b diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x4ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9 b/e2e/fixtures/simple-send/db/!trie_db!0x4ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x4ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9 rename to e2e/fixtures/simple-send/db/!trie_db!0x4ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x5072a6c1e2e016ff4e5b6b35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 b/e2e/fixtures/simple-send/db/!trie_db!0x5072a6c1e2e016ff4e5b6b35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x5072a6c1e2e016ff4e5b6b35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 rename to e2e/fixtures/simple-send/db/!trie_db!0x5072a6c1e2e016ff4e5b6b35caf68673a43b7a13bb1fa82f2643bad3e4d1c253 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 b/e2e/fixtures/simple-send/db/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 rename to e2e/fixtures/simple-send/db/!trie_db!0x54350d30b48d6984395cf168b20e31952619100e01a31e619f91393e34d80ab5 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a b/e2e/fixtures/simple-send/db/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a rename to e2e/fixtures/simple-send/db/!trie_db!0x5911f24d96912350de50f297c2d34d5d10e136757bf4cfff5fa41bfca219554a diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x5e287c9213b0dcabfdf484092e2b6133f6826e045c391501e80374760de69320 b/e2e/fixtures/simple-send/db/!trie_db!0x5e287c9213b0dcabfdf484092e2b6133f6826e045c391501e80374760de69320 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x5e287c9213b0dcabfdf484092e2b6133f6826e045c391501e80374760de69320 rename to e2e/fixtures/simple-send/db/!trie_db!0x5e287c9213b0dcabfdf484092e2b6133f6826e045c391501e80374760de69320 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x67bcaf1d60f75a22d49b037c88c00e44733094250664cbfc9d9bbf9eda3ca745 b/e2e/fixtures/simple-send/db/!trie_db!0x67bcaf1d60f75a22d49b037c88c00e44733094250664cbfc9d9bbf9eda3ca745 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x67bcaf1d60f75a22d49b037c88c00e44733094250664cbfc9d9bbf9eda3ca745 rename to e2e/fixtures/simple-send/db/!trie_db!0x67bcaf1d60f75a22d49b037c88c00e44733094250664cbfc9d9bbf9eda3ca745 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x77ecddca419c697a6aae21fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 b/e2e/fixtures/simple-send/db/!trie_db!0x77ecddca419c697a6aae21fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x77ecddca419c697a6aae21fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 rename to e2e/fixtures/simple-send/db/!trie_db!0x77ecddca419c697a6aae21fa9a02f85475aaa5b109d41dc35f1893dc5bb3cf72 diff --git a/e2e/fixtures/simple-send/db/!trie_db!0x8180082a4ae6ecc7ef893160ae2cacf0992cee785262027924cc9707fa0b65ad b/e2e/fixtures/simple-send/db/!trie_db!0x8180082a4ae6ecc7ef893160ae2cacf0992cee785262027924cc9707fa0b65ad new file mode 100644 index 000000000000..7f586bcacdf8 --- /dev/null +++ b/e2e/fixtures/simple-send/db/!trie_db!0x8180082a4ae6ecc7ef893160ae2cacf0992cee785262027924cc9707fa0b65ad @@ -0,0 +1 @@ +"0xf866943ecf4659ab223cf48a9b082eba8041c5f4b1d45eb84ff84d80890246ddf97976680000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x83097864ebee0be81925b10976490ab2c71a0643e9f16e16807811b7112ed032 b/e2e/fixtures/simple-send/db/!trie_db!0x83097864ebee0be81925b10976490ab2c71a0643e9f16e16807811b7112ed032 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x83097864ebee0be81925b10976490ab2c71a0643e9f16e16807811b7112ed032 rename to e2e/fixtures/simple-send/db/!trie_db!0x83097864ebee0be81925b10976490ab2c71a0643e9f16e16807811b7112ed032 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x8a083a05cf77f2f36f6c055ac468fc88ab99335759bb47d22b0947229f0b170a b/e2e/fixtures/simple-send/db/!trie_db!0x8a083a05cf77f2f36f6c055ac468fc88ab99335759bb47d22b0947229f0b170a similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x8a083a05cf77f2f36f6c055ac468fc88ab99335759bb47d22b0947229f0b170a rename to e2e/fixtures/simple-send/db/!trie_db!0x8a083a05cf77f2f36f6c055ac468fc88ab99335759bb47d22b0947229f0b170a diff --git a/e2e/fixtures/onboarded/db/!trie_db!0x98ad39fb8468cbcb93a0990018ded196413ef989c0062341ff886889f39ab41b b/e2e/fixtures/simple-send/db/!trie_db!0x98ad39fb8468cbcb93a0990018ded196413ef989c0062341ff886889f39ab41b similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0x98ad39fb8468cbcb93a0990018ded196413ef989c0062341ff886889f39ab41b rename to e2e/fixtures/simple-send/db/!trie_db!0x98ad39fb8468cbcb93a0990018ded196413ef989c0062341ff886889f39ab41b diff --git a/e2e/fixtures/simple-send/db/!trie_db!0xb8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e16 b/e2e/fixtures/simple-send/db/!trie_db!0xb8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e16 new file mode 100644 index 000000000000..20ed38a4a21f --- /dev/null +++ b/e2e/fixtures/simple-send/db/!trie_db!0xb8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e16 @@ -0,0 +1 @@ +"0xf86694385c30949c92df7a0bd42e0f3e3d539ece98db24b84ff84d80890246ddf97976680000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db/!trie_db!0xc4f6a1f0b681632674246c126fd0b2eb33764bdb3ec5763b93968f205314944c b/e2e/fixtures/simple-send/db/!trie_db!0xc4f6a1f0b681632674246c126fd0b2eb33764bdb3ec5763b93968f205314944c similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0xc4f6a1f0b681632674246c126fd0b2eb33764bdb3ec5763b93968f205314944c rename to e2e/fixtures/simple-send/db/!trie_db!0xc4f6a1f0b681632674246c126fd0b2eb33764bdb3ec5763b93968f205314944c diff --git a/e2e/fixtures/onboarded/db/!trie_db!0xc74b55ae25b522915216f62ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f b/e2e/fixtures/simple-send/db/!trie_db!0xc74b55ae25b522915216f62ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0xc74b55ae25b522915216f62ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f rename to e2e/fixtures/simple-send/db/!trie_db!0xc74b55ae25b522915216f62ea6ffcd436f6c6d4fe14a771042f7d4cea5cfa92f diff --git a/e2e/fixtures/simple-send/db/!trie_db!0xc8daf0efa1269a6ee5d5464f69c7ba5d543b1e88b2479b7e040db4c9f3998197 b/e2e/fixtures/simple-send/db/!trie_db!0xc8daf0efa1269a6ee5d5464f69c7ba5d543b1e88b2479b7e040db4c9f3998197 new file mode 100644 index 000000000000..44c3ee41ba61 --- /dev/null +++ b/e2e/fixtures/simple-send/db/!trie_db!0xc8daf0efa1269a6ee5d5464f69c7ba5d543b1e88b2479b7e040db4c9f3998197 @@ -0,0 +1 @@ +"0xf851a04ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d98080808080808080a0b8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e1680808080808080" \ No newline at end of file diff --git a/e2e/fixtures/simple-send/db/!trie_db!0xd51801c3e9234174ee59ccd7314112e1711cb73a4c80b6ede7fedceafdb5b5b1 b/e2e/fixtures/simple-send/db/!trie_db!0xd51801c3e9234174ee59ccd7314112e1711cb73a4c80b6ede7fedceafdb5b5b1 new file mode 100644 index 000000000000..1ae707821522 --- /dev/null +++ b/e2e/fixtures/simple-send/db/!trie_db!0xd51801c3e9234174ee59ccd7314112e1711cb73a4c80b6ede7fedceafdb5b5b1 @@ -0,0 +1 @@ +"0xf871a04ef305cd67b97b743669faa6b70fab3c29d545df173e5798da1a3bef0efeb5d9808080808080a08180082a4ae6ecc7ef893160ae2cacf0992cee785262027924cc9707fa0b65ad80a0b8624db45edd70931d98cc8e2ba8671e8ce23d8b8a8086d8367a65e923432e1680808080808080" \ No newline at end of file diff --git a/e2e/fixtures/onboarded/db/!trie_db!0xed57d93087e1a79ee9e3f6eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 b/e2e/fixtures/simple-send/db/!trie_db!0xed57d93087e1a79ee9e3f6eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0xed57d93087e1a79ee9e3f6eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 rename to e2e/fixtures/simple-send/db/!trie_db!0xed57d93087e1a79ee9e3f6eadfc3d2affdb420d73dc4ecf07c5a21b22a221a98 diff --git a/e2e/fixtures/onboarded/db/!trie_db!0xfe3d828c2803bd586bc34641752157c205a391ec9a1b730031bccc77a9276b02 b/e2e/fixtures/simple-send/db/!trie_db!0xfe3d828c2803bd586bc34641752157c205a391ec9a1b730031bccc77a9276b02 similarity index 100% rename from e2e/fixtures/onboarded/db/!trie_db!0xfe3d828c2803bd586bc34641752157c205a391ec9a1b730031bccc77a9276b02 rename to e2e/fixtures/simple-send/db/!trie_db!0xfe3d828c2803bd586bc34641752157c205a391ec9a1b730031bccc77a9276b02 diff --git a/e2e/fixtures/simple-send/state.json b/e2e/fixtures/simple-send/state.json new file mode 100644 index 000000000000..b59d887f4f5a --- /dev/null +++ b/e2e/fixtures/simple-send/state.json @@ -0,0 +1 @@ +{"data":{"CachedBalancesController":{"cachedBalances":{"1":{"0x985c30949c92df7a0bd42e0f3e3d539ece98db24":"0x0"},"1559145733815":{"0x7ecf4659ab223cf48a9b082eba8041c5f4b1d45e":"0x246ddf97976680000","0x985c30949c92df7a0bd42e0f3e3d539ece98db24":"0x246ddf97976680000"}}},"CurrencyController":{"conversionDate":1559147563,"conversionRate":271.661,"currentCurrency":"usd","nativeCurrency":"ETH","ticker":"ETH"},"InfuraController":{"infuraNetworkStatus":{"kovan":"ok","mainnet":"ok","rinkeby":"ok","ropsten":"ok"}},"KeyringController":{"vault":"{\"data\":\"L6Amyerk1fokKPr9wac4lkfn3WNCmbi3q5THA3sO7MkAxK2HzQ/TxvDflr6nWOK5WJPfImv8RmlCCKnDIVTMMcpyFb1i9gOdWUQLUZvGeeh25ddz9LBIwg/ToKqdOLGTWGirTOpmvMNnaFDIQ1IrXfp/NEXDBaqesxagmNcfpquBWEPfxwVg7UnP1YrwdottVArkWIq03C3RtDcv6efnX7SxU1rcSXmQoRgdp9YnXWYWd6UYf3K7uq/t6QGP\",\"iv\":\"znLFfy+/BW+thpL2MaT8kA==\",\"salt\":\"7uq6KiEznKnyQRQyze3BXS8RTR7SleMFw42GDIrXadA=\"}"},"NetworkController":{"network":"1559145733815","provider":{"type":"localhost"},"settings":{"ticker":"ETH"}},"NoticeController":{"noticesList":[{"body":"# Terms of Use #\n\n**THIS AGREEMENT IS SUBJECT TO BINDING ARBITRATION AND A WAIVER OF CLASS ACTION RIGHTS AS DETAILED IN SECTION 13. PLEASE READ THE AGREEMENT CAREFULLY.**\n\n_Our Terms of Use have been updated as of September 5, 2016_\n\n## 1. Acceptance of Terms ##\n\nMetaMask provides a platform for managing Ethereum (or \"ETH\") accounts, and allowing ordinary websites to interact with the Ethereum blockchain, while keeping the user in control over what transactions they approve, through our website located at[ ](http://metamask.io)[https://metamask.io/](https://metamask.io/) and browser plugin (the \"Site\") — which includes text, images, audio, code and other materials (collectively, the “Content”) and all of the features, and services provided. The Site, and any other features, tools, materials, or other services offered from time to time by MetaMask are referred to here as the “Service.” Please read these Terms of Use (the “Terms” or “Terms of Use”) carefully before using the Service. By using or otherwise accessing the Services, or clicking to accept or agree to these Terms where that option is made available, you (1) accept and agree to these Terms (2) consent to the collection, use, disclosure and other handling of information as described in our Privacy Policy and (3) any additional terms, rules and conditions of participation issued by MetaMask from time to time. If you do not agree to the Terms, then you may not access or use the Content or Services.\n\n## 2. Modification of Terms of Use ##\n\nExcept for Section 13, providing for binding arbitration and waiver of class action rights, MetaMask reserves the right, at its sole discretion, to modify or replace the Terms of Use at any time. The most current version of these Terms will be posted on our Site. You shall be responsible for reviewing and becoming familiar with any such modifications. Use of the Services by you after any modification to the Terms constitutes your acceptance of the Terms of Use as modified.\n\n\n\n## 3. Eligibility ##\n\nYou hereby represent and warrant that you are fully able and competent to enter into the terms, conditions, obligations, affirmations, representations and warranties set forth in these Terms and to abide by and comply with these Terms.\n\nMetaMask is a global platform and by accessing the Content or Services, you are representing and warranting that, you are of the legal age of majority in your jurisdiction as is required to access such Services and Content and enter into arrangements as provided by the Service. You further represent that you are otherwise legally permitted to use the service in your jurisdiction including owning cryptographic tokens of value, and interacting with the Services or Content in any way. You further represent you are responsible for ensuring compliance with the laws of your jurisdiction and acknowledge that MetaMask is not liable for your compliance with such laws.\n\n## 4 Account Password and Security ##\n\nWhen setting up an account within MetaMask, you will be responsible for keeping your own account secrets, which may be a twelve-word seed phrase, an account file, or other locally stored secret information. MetaMask encrypts this information locally with a password you provide, that we never send to our servers. You agree to (a) never use the same password for MetaMask that you have ever used outside of this service; (b) keep your secret information and password confidential and do not share them with anyone else; (c) immediately notify MetaMask of any unauthorized use of your account or breach of security. MetaMask cannot and will not be liable for any loss or damage arising from your failure to comply with this section.\n\n## 5. Representations, Warranties, and Risks ##\n\n### 5.1. Warranty Disclaimer ###\n\nYou expressly understand and agree that your use of the Service is at your sole risk. The Service (including the Service and the Content) are provided on an \"AS IS\" and \"as available\" basis, without warranties of any kind, either express or implied, including, without limitation, implied warranties of merchantability, fitness for a particular purpose or non-infringement. You acknowledge that MetaMask has no control over, and no duty to take any action regarding: which users gain access to or use the Service; what effects the Content may have on you; how you may interpret or use the Content; or what actions you may take as a result of having been exposed to the Content. You release MetaMask from all liability for you having acquired or not acquired Content through the Service. MetaMask makes no representations concerning any Content contained in or accessed through the Service, and MetaMask will not be responsible or liable for the accuracy, copyright compliance, legality or decency of material contained in or accessed through the Service.\n\n### 5.2 Sophistication and Risk of Cryptographic Systems ###\n\nBy utilizing the Service or interacting with the Content or platform in any way, you represent that you understand the inherent risks associated with cryptographic systems; and warrant that you have an understanding of the usage and intricacies of native cryptographic tokens, like Ether (ETH) and Bitcoin (BTC), smart contract based tokens such as those that follow the Ethereum Token Standard (https://github.com/ethereum/EIPs/issues/20), and blockchain-based software systems.\n\n### 5.3 Risk of Regulatory Actions in One or More Jurisdictions ###\n\nMetaMask and ETH could be impacted by one or more regulatory inquiries or regulatory action, which could impede or limit the ability of MetaMask to continue to develop, or which could impede or limit your ability to access or use the Service or Ethereum blockchain.\n\n### 5.4 Risk of Weaknesses or Exploits in the Field of Cryptography ###\n\nYou acknowledge and understand that Cryptography is a progressing field. Advances in code cracking or technical advances such as the development of quantum computers may present risks to cryptocurrencies and Services of Content, which could result in the theft or loss of your cryptographic tokens or property. To the extent possible, MetaMask intends to update the protocol underlying Services to account for any advances in cryptography and to incorporate additional security measures, but does not guarantee or otherwise represent full security of the system. By using the Service or accessing Content, you acknowledge these inherent risks.\n\n### 5.5 Volatility of Crypto Currencies ###\n\nYou understand that Ethereum and other blockchain technologies and associated currencies or tokens are highly volatile due to many factors including but not limited to adoption, speculation, technology and security risks. You also acknowledge that the cost of transacting on such technologies is variable and may increase at any time causing impact to any activities taking place on the Ethereum blockchain. You acknowledge these risks and represent that MetaMask cannot be held liable for such fluctuations or increased costs.\n\n### 5.6 Application Security ###\n\nYou acknowledge that Ethereum applications are code subject to flaws and acknowledge that you are solely responsible for evaluating any code provided by the Services or Content and the trustworthiness of any third-party websites, products, smart-contracts, or Content you access or use through the Service. You further expressly acknowledge and represent that Ethereum applications can be written maliciously or negligently, that MetaMask cannot be held liable for your interaction with such applications and that such applications may cause the loss of property or even identity. This warning and others later provided by MetaMask in no way evidence or represent an on-going duty to alert you to all of the potential risks of utilizing the Service or Content.\n\n## 6. Indemnity ##\n\nYou agree to release and to indemnify, defend and hold harmless MetaMask and its parents, subsidiaries, affiliates and agencies, as well as the officers, directors, employees, shareholders and representatives of any of the foregoing entities, from and against any and all losses, liabilities, expenses, damages, costs (including attorneys’ fees and court costs) claims or actions of any kind whatsoever arising or resulting from your use of the Service, your violation of these Terms of Use, and any of your acts or omissions that implicate publicity rights, defamation or invasion of privacy. MetaMask reserves the right, at its own expense, to assume exclusive defense and control of any matter otherwise subject to indemnification by you and, in such case, you agree to cooperate with MetaMask in the defense of such matter.\n\n## 7. Limitation on liability ##\n\nYOU ACKNOWLEDGE AND AGREE THAT YOU ASSUME FULL RESPONSIBILITY FOR YOUR USE OF THE SITE AND SERVICE. YOU ACKNOWLEDGE AND AGREE THAT ANY INFORMATION YOU SEND OR RECEIVE DURING YOUR USE OF THE SITE AND SERVICE MAY NOT BE SECURE AND MAY BE INTERCEPTED OR LATER ACQUIRED BY UNAUTHORIZED PARTIES. YOU ACKNOWLEDGE AND AGREE THAT YOUR USE OF THE SITE AND SERVICE IS AT YOUR OWN RISK. RECOGNIZING SUCH, YOU UNDERSTAND AND AGREE THAT, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, NEITHER METAMASK NOR ITS SUPPLIERS OR LICENSORS WILL BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY OR OTHER DAMAGES OF ANY KIND, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER TANGIBLE OR INTANGIBLE LOSSES OR ANY OTHER DAMAGES BASED ON CONTRACT, TORT, STRICT LIABILITY OR ANY OTHER THEORY (EVEN IF METAMASK HAD BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES), RESULTING FROM THE SITE OR SERVICE; THE USE OR THE INABILITY TO USE THE SITE OR SERVICE; UNAUTHORIZED ACCESS TO OR ALTERATION OF YOUR TRANSMISSIONS OR DATA; STATEMENTS OR CONDUCT OF ANY THIRD PARTY ON THE SITE OR SERVICE; ANY ACTIONS WE TAKE OR FAIL TO TAKE AS A RESULT OF COMMUNICATIONS YOU SEND TO US; HUMAN ERRORS; TECHNICAL MALFUNCTIONS; FAILURES, INCLUDING PUBLIC UTILITY OR TELEPHONE OUTAGES; OMISSIONS, INTERRUPTIONS, LATENCY, DELETIONS OR DEFECTS OF ANY DEVICE OR NETWORK, PROVIDERS, OR SOFTWARE (INCLUDING, BUT NOT LIMITED TO, THOSE THAT DO NOT PERMIT PARTICIPATION IN THE SERVICE); ANY INJURY OR DAMAGE TO COMPUTER EQUIPMENT; INABILITY TO FULLY ACCESS THE SITE OR SERVICE OR ANY OTHER WEBSITE; THEFT, TAMPERING, DESTRUCTION, OR UNAUTHORIZED ACCESS TO, IMAGES OR OTHER CONTENT OF ANY KIND; DATA THAT IS PROCESSED LATE OR INCORRECTLY OR IS INCOMPLETE OR LOST; TYPOGRAPHICAL, PRINTING OR OTHER ERRORS, OR ANY COMBINATION THEREOF; OR ANY OTHER MATTER RELATING TO THE SITE OR SERVICE.\n\nSOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.\n\n## 8. Our Proprietary Rights ##\n\nAll title, ownership and intellectual property rights in and to the Service are owned by MetaMask or its licensors. You acknowledge and agree that the Service contains proprietary and confidential information that is protected by applicable intellectual property and other laws. Except as expressly authorized by MetaMask, you agree not to copy, modify, rent, lease, loan, sell, distribute, perform, display or create derivative works based on the Service, in whole or in part. MetaMask issues a license for MetaMask, found [here](https://github.com/MetaMask/metamask-plugin/blob/master/LICENSE). For information on other licenses utilized in the development of MetaMask, please see our attribution page at: [https://metamask.io/attributions.html](https://metamask.io/attributions.html)\n\n## 9. Links ##\n\nThe Service provides, or third parties may provide, links to other World Wide Web or accessible sites, applications or resources. Because MetaMask has no control over such sites, applications and resources, you acknowledge and agree that MetaMask is not responsible for the availability of such external sites, applications or resources, and does not endorse and is not responsible or liable for any content, advertising, products or other materials on or available from such sites or resources. You further acknowledge and agree that MetaMask shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.\n\n## 10. Termination and Suspension ##\n\nMetaMask may terminate or suspend all or part of the Service and your MetaMask access immediately, without prior notice or liability, if you breach any of the terms or conditions of the Terms. Upon termination of your access, your right to use the Service will immediately cease.\n\nThe following provisions of the Terms survive any termination of these Terms: INDEMNITY; WARRANTY DISCLAIMERS; LIMITATION ON LIABILITY; OUR PROPRIETARY RIGHTS; LINKS; TERMINATION; NO THIRD PARTY BENEFICIARIES; BINDING ARBITRATION AND CLASS ACTION WAIVER; GENERAL INFORMATION.\n\n## 11. No Third Party Beneficiaries ##\n\nYou agree that, except as otherwise expressly provided in these Terms, there shall be no third party beneficiaries to the Terms.\n\n## 12. Notice and Procedure For Making Claims of Copyright Infringement ##\n\nIf you believe that your copyright or the copyright of a person on whose behalf you are authorized to act has been infringed, please provide MetaMask’s Copyright Agent a written Notice containing the following information:\n\n· an electronic or physical signature of the person authorized to act on behalf of the owner of the copyright or other intellectual property interest;\n\n· a description of the copyrighted work or other intellectual property that you claim has been infringed;\n\n· a description of where the material that you claim is infringing is located on the Service;\n\n· your address, telephone number, and email address;\n\n· a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law;\n\n· a statement by you, made under penalty of perjury, that the above information in your Notice is accurate and that you are the copyright or intellectual property owner or authorized to act on the copyright or intellectual property owner's behalf.\n\nMetaMask’s Copyright Agent can be reached at:\n\nEmail: copyright [at] metamask [dot] io\n\nMail:\n\nAttention:\n\nMetaMask Copyright ℅ ConsenSys\n\n49 Bogart Street\n\nBrooklyn, NY 11206\n\n## 13. Binding Arbitration and Class Action Waiver ##\n\nPLEASE READ THIS SECTION CAREFULLY – IT MAY SIGNIFICANTLY AFFECT YOUR LEGAL RIGHTS, INCLUDING YOUR RIGHT TO FILE A LAWSUIT IN COURT\n\n### 13.1 Initial Dispute Resolution ###\n\nThe parties shall use their best efforts to engage directly to settle any dispute, claim, question, or disagreement and engage in good faith negotiations which shall be a condition to either party initiating a lawsuit or arbitration.\n\n### 13.2 Binding Arbitration ###\n\nIf the parties do not reach an agreed upon solution within a period of 30 days from the time informal dispute resolution under the Initial Dispute Resolution provision begins, then either party may initiate binding arbitration as the sole means to resolve claims, subject to the terms set forth below. Specifically, all claims arising out of or relating to these Terms (including their formation, performance and breach), the parties’ relationship with each other and/or your use of the Service shall be finally settled by binding arbitration administered by the American Arbitration Association in accordance with the provisions of its Commercial Arbitration Rules and the supplementary procedures for consumer related disputes of the American Arbitration Association (the \"AAA\"), excluding any rules or procedures governing or permitting class actions.\n\nThe arbitrator, and not any federal, state or local court or agency, shall have exclusive authority to resolve all disputes arising out of or relating to the interpretation, applicability, enforceability or formation of these Terms, including, but not limited to any claim that all or any part of these Terms are void or voidable, or whether a claim is subject to arbitration. The arbitrator shall be empowered to grant whatever relief would be available in a court under law or in equity. The arbitrator’s award shall be written, and binding on the parties and may be entered as a judgment in any court of competent jurisdiction.\n\nThe parties understand that, absent this mandatory provision, they would have the right to sue in court and have a jury trial. They further understand that, in some instances, the costs of arbitration could exceed the costs of litigation and the right to discovery may be more limited in arbitration than in court.\n\n### 13.3 Location ###\n\nBinding arbitration shall take place in New York. You agree to submit to the personal jurisdiction of any federal or state court in New York County, New York, in order to compel arbitration, to stay proceedings pending arbitration, or to confirm, modify, vacate or enter judgment on the award entered by the arbitrator.\n\n### 13.4 Class Action Waiver ###\n\nThe parties further agree that any arbitration shall be conducted in their individual capacities only and not as a class action or other representative action, and the parties expressly waive their right to file a class action or seek relief on a class basis. YOU AND METAMASK AGREE THAT EACH MAY BRING CLAIMS AGAINST THE OTHER ONLY IN YOUR OR ITS INDIVIDUAL CAPACITY, AND NOT AS A PLAINTIFF OR CLASS MEMBER IN ANY PURPORTED CLASS OR REPRESENTATIVE PROCEEDING. If any court or arbitrator determines that the class action waiver set forth in this paragraph is void or unenforceable for any reason or that an arbitration can proceed on a class basis, then the arbitration provision set forth above shall be deemed null and void in its entirety and the parties shall be deemed to have not agreed to arbitrate disputes.\n\n### 13.5 Exception - Litigation of Intellectual Property and Small Claims Court Claims ###\n\nNotwithstanding the parties' decision to resolve all disputes through arbitration, either party may bring an action in state or federal court to protect its intellectual property rights (\"intellectual property rights\" means patents, copyrights, moral rights, trademarks, and trade secrets, but not privacy or publicity rights). Either party may also seek relief in a small claims court for disputes or claims within the scope of that court’s jurisdiction.\n\n### 13.6 30-Day Right to Opt Out ###\n\nYou have the right to opt-out and not be bound by the arbitration and class action waiver provisions set forth above by sending written notice of your decision to opt-out to the following address: MetaMask ℅ ConsenSys, 49 Bogart Street, Brooklyn NY 11206 and via email at support@metamask.io. The notice must be sent within 30 days of September 6, 2016 or your first use of the Service, whichever is later, otherwise you shall be bound to arbitrate disputes in accordance with the terms of those paragraphs. If you opt-out of these arbitration provisions, MetaMask also will not be bound by them.\n\n### 13.7 Changes to This Section ###\n\nMetaMask will provide 60-days’ notice of any changes to this section. Changes will become effective on the 60th day, and will apply prospectively only to any claims arising after the 60th day.\n\nFor any dispute not subject to arbitration you and MetaMask agree to submit to the personal and exclusive jurisdiction of and venue in the federal and state courts located in New York, New York. You further agree to accept service of process by mail, and hereby waive any and all jurisdictional and venue defenses otherwise available.\n\nThe Terms and the relationship between you and MetaMask shall be governed by the laws of the State of New York without regard to conflict of law provisions.\n\n## 14. General Information ##\n\n### 14.1 Entire Agreement ###\n\nThese Terms (and any additional terms, rules and conditions of participation that MetaMask may post on the Service) constitute the entire agreement between you and MetaMask with respect to the Service and supersedes any prior agreements, oral or written, between you and MetaMask. In the event of a conflict between these Terms and the additional terms, rules and conditions of participation, the latter will prevail over the Terms to the extent of the conflict.\n\n### 14.2 Waiver and Severability of Terms ###\n\nThe failure of MetaMask to exercise or enforce any right or provision of the Terms shall not constitute a waiver of such right or provision. If any provision of the Terms is found by an arbitrator or court of competent jurisdiction to be invalid, the parties nevertheless agree that the arbitrator or court should endeavor to give effect to the parties' intentions as reflected in the provision, and the other provisions of the Terms remain in full force and effect.\n\n### 14.3 Statute of Limitations ###\n\nYou agree that regardless of any statute or law to the contrary, any claim or cause of action arising out of or related to the use of the Service or the Terms must be filed within one (1) year after such claim or cause of action arose or be forever barred.\n\n### 14.4 Section Titles ###\n\nThe section titles in the Terms are for convenience only and have no legal or contractual effect.\n\n### 14.5 Communications ###\n\nUsers with questions, complaints or claims with respect to the Service may contact us using the relevant contact information set forth above and at communications@metamask.io.\n\n## 15 Related Links ##\n\n**[Terms of Use](https://metamask.io/terms.html)**\n\n**[Privacy](https://metamask.io/privacy.html)**\n\n**[Attributions](https://metamask.io/attributions.html)**\n","date":"Thu Feb 09 2017","id":0,"read":false,"title":"Terms of Use"},{"body":"MetaMask is beta software. \n\nWhen you log in to MetaMask and approve account access, your current account's address is visible to the site you're currently viewing. This can be used to look up your account balances of Ether and other tokens.\n\nFor your privacy, take caution when approving account access and sign out of MetaMask when you're done using a site.\n\n","date":"Mon May 08 2017","id":2,"read":false,"title":"Privacy Notice"},{"body":"Dear MetaMask Users,\n\nThere have been several instances of high-profile legitimate websites such as BTC Manager and Games Workshop that have had their websites temporarily compromised. This involves showing a fake MetaMask window on the page asking for user's seed phrases. MetaMask will never open itself to ask you for your seed phrase, and users are encouraged to report these instances immediately to either [our phishing blacklist](https://github.com/MetaMask/eth-phishing-detect/issues) or our support email at [support@metamask.io](mailto:support@metamask.io).\n\n[Please read our full article on this ongoing issue over at Medium.](https://medium.com/metamask/new-phishing-strategy-becoming-common-1b1123837168)\n","date":"Wed Jun 13 2018","id":4,"read":false,"title":"Phishing Warning"}]},"PreferencesController":{"accountTokens":{"0x7ecf4659ab223cf48a9b082eba8041c5f4b1d45e":{"localhost":[]},"0x985c30949c92df7a0bd42e0f3e3d539ece98db24":{"localhost":[],"mainnet":[]}},"assetImages":{},"completedOnboarding":true,"completedUiMigration":true,"currentAccountTab":"history","currentLocale":"en","featureFlags":{},"firstTimeFlowType":"import","forgottenPassword":false,"frequentRpcListDetail":[],"identities":{"0x7ecf4659ab223cf48a9b082eba8041c5f4b1d45e":{"address":"0x7ecf4659ab223cf48a9b082eba8041c5f4b1d45e","name":"Account 2"},"0x985c30949c92df7a0bd42e0f3e3d539ece98db24":{"address":"0x985c30949c92df7a0bd42e0f3e3d539ece98db24","name":"Account 1"}},"knownMethodData":{},"lostIdentities":{},"metaMetricsId":null,"metaMetricsSendCount":0,"participateInMetaMetrics":false,"preferences":{"useNativeCurrencyAsPrimaryCurrency":true},"seedWords":null,"selectedAddress":"0x7ecf4659ab223cf48a9b082eba8041c5f4b1d45e","suggestedTokens":{},"tokens":[],"useBlockie":false},"config":{},"firstTimeInfo":{"date":1559146971733,"version":"6.2.2"}},"meta":{"version":31}} \ No newline at end of file diff --git a/e2e/ganache/index.js b/e2e/ganache/index.js index 16dd8d6fabf5..57c10811411d 100644 --- a/e2e/ganache/index.js +++ b/e2e/ganache/index.js @@ -3,7 +3,7 @@ const getPort = require('get-port') class Ganache { async start (options) { - const port = await getPort() + const port = options.port || await getPort() this._server = ganache.server(options) return new Promise((resolve, reject) => { this._server.listen(port, (err, blockchain) => { diff --git a/e2e/index.js b/e2e/index.js index 6af9a50fd89b..72aa8d12cf9d 100644 --- a/e2e/index.js +++ b/e2e/index.js @@ -5,7 +5,9 @@ const ReferenceCounter = require('./rc') const {buildWebDriver, Driver} = require('./webdriver') const fixtureServer = new fixtures.FixtureServer() -const rc = new ReferenceCounter(async () => fixtureServer.start(), async () => fixtureServer.stop()) +const rc = new ReferenceCounter(() => fixtureServer.start(), () => fixtureServer.stop()) + +// TODO Exit if either Ganache or the browser fail to start correctly const withFixtures = async function load (fixturesDirectory, callback) { await rc.tick(async () => { diff --git a/e2e/tests/example.spec.js b/e2e/tests/example.spec.js deleted file mode 100644 index 292997a73721..000000000000 --- a/e2e/tests/example.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -const {withFixtures} = require('../') - -describe('MetaMask Browser Extension first-time flow', function () { - it('displays a welcome screen with a clickable continue button', async () => { - await withFixtures(null, async ({driver}) => { - const button = await driver.findElement('.welcome-page .first-time-flow__button') - await button.click() - }) - }) -}) - -describe('MetaMask Browser Extension from existing state', function () { - it('displays the lock screen', async () => { - await withFixtures('onboarded', async ({driver}) => { - const button = await driver.findElement('.unlock-page__title') - await button.click() - }) - }) -}) diff --git a/e2e/tests/simple-send/index.spec.js b/e2e/tests/simple-send/index.spec.js new file mode 100644 index 000000000000..7037676fbce9 --- /dev/null +++ b/e2e/tests/simple-send/index.spec.js @@ -0,0 +1,18 @@ +const {Key} = require('selenium-webdriver') +const {withFixtures} = require('../../') + +describe('MetaMask Browser Extension', function () { + it('can send a simple transaction from one account to another', async () => { + await withFixtures('simple-send', async ({driver}) => { + await driver.findElement('#password').sendKeys('password') + await driver.findElement('#password').sendKeys(Key.ENTER) + await driver.clickElement('#app-content > div > div.main-container-wrapper > div > div > div.transaction-view > div.transaction-view__balance-wrapper > div > div.transaction-view-balance__buttons > button:nth-child(2)') + await driver.findElement('input[placeholder="Recipient Address"]').sendKeys('0x985c30949c92df7a0bd42e0f3e3d539ece98db24') + await driver.findElement('.unit-input__input').sendKeys('1') + await driver.delay(1000) + await driver.clickElement('#app-content > div > div.main-container-wrapper > div > div.page-container__footer > header > button.button.btn-primary.btn--large.page-container__footer-button') + await driver.clickElement('#app-content > div > div.main-container-wrapper > div > div.page-container__footer > header > button.button.btn-confirm.btn--large.page-container__footer-button') + await driver.findElement('.transaction-list-item') + }) + }) +}) diff --git a/e2e/webdriver/driver.js b/e2e/webdriver/driver.js index 818ad292a713..6841248f4d52 100644 --- a/e2e/webdriver/driver.js +++ b/e2e/webdriver/driver.js @@ -5,7 +5,7 @@ class Driver { * @param {!ThenableWebDriver} driver a {@code WebDriver} instance * @param {number} timeout */ - constructor (driver, timeout = 5000) { + constructor (driver, timeout = 10000) { this.driver = driver this.timeout = timeout } @@ -17,6 +17,28 @@ class Driver { findElement (selector) { return this.driver.wait(until.elementLocated(By.css(selector)), this.timeout) } + + /** + * @param {string} selector the CSS selector to use + * @return {Promise} + */ + async clickElement (selector) { + const element = await this.findElement(selector) + await element.click() + } + + /** + * @param {string} query the XPath selector to use + * @return {Promise} + */ + async clickElementXPath (query) { + const element = await this.driver.wait(until.elementLocated(By.xpath(query)), this.timeout) + await element.click() + } + + delay (time) { + return new Promise(resolve => setTimeout(resolve, time)) + } } module.exports = Driver From de5268029bacc2c763dccca4b8d38aa2581a926d Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 10 Jul 2019 14:16:47 -0230 Subject: [PATCH 2/2] Add basic docs for new e2e setup --- e2e/README.md | 9 +++++++++ e2e/fixtures/README.md | 32 ++++++++++++++++++++++++++++++++ e2e/tests/README.md | 17 +++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 e2e/README.md create mode 100644 e2e/fixtures/README.md create mode 100644 e2e/tests/README.md diff --git a/e2e/README.md b/e2e/README.md new file mode 100644 index 000000000000..38c7998597bc --- /dev/null +++ b/e2e/README.md @@ -0,0 +1,9 @@ +# End-to-end tests + +**Fair warning:** this directory contains work in progress—this is where end-to-end tests will live once they are +updated to be more individually isolated and fixture-based. + +See also: + +- [How to run the e2e tests](./tests/README.md) +- [Fixture data documentation](./fixtures/README.md) diff --git a/e2e/fixtures/README.md b/e2e/fixtures/README.md new file mode 100644 index 000000000000..8ce62718ceac --- /dev/null +++ b/e2e/fixtures/README.md @@ -0,0 +1,32 @@ +# End-to-end tests + +This directory contains the fixture data used to bootstrap the individual e2e tests. Each sub-directory contains +two things: + +1. A `state.json` file that represents a the saved state for the extension (see _Generating fixture data_ below) +2. A `db.js` file that exports a config for Ganache + +The `db/` sub-sub-directory and its contents, should it exist, contains Ganache's state and a path to it is configured +in the `db.js` file. + +## Generating fixture data + +Fixture data can be generated by loading the unpacked extension, inspecting the background context, +dumping `chrome.storage.local`, and using [`copy`][1] to copy it to the clipboard, and manually pasting the contents into +a file on disk. + +```js +chrome.storage.local.get(null, (x) => console.log(x)) +// Store the value as a global (shown below) +copy(temp1) +``` + +Store the value as a global variable: + +Store as global variable + + [1]:https://developers.google.com/web/tools/chrome-devtools/console/utilities diff --git a/e2e/tests/README.md b/e2e/tests/README.md new file mode 100644 index 000000000000..b88d2690d032 --- /dev/null +++ b/e2e/tests/README.md @@ -0,0 +1,17 @@ +# End-to-end tests + +# Quick start + +To run the tests in Firefox: + +```bash +BROWSER=firefox npx mocha --no-timeouts e2e/tests/**/*.spec.js +``` + +To run the tests in Chrome: + +```bash +BROWSER=chrome npx mocha --no-timeouts e2e/tests/**/*.spec.js +``` + +Both commands listed above assume a current working directory of the project root.