1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 12:56:01 +01:00
Commit Graph

1344 Commits

Author SHA1 Message Date
Dan Finlay
11dfb8e869 Ui testing (#481)
* Add UI Testing Framework and Simple UI Test

Added a Testem configuration that launches a Qunit page with an iFrame that builds and loads our mock-dev page and can interact with it and run tests on it.

Wrote a simple test that accepts the terms and conditions and transitions to the next page.

I am not doing any fancy redux-hooks for the async waiting, I've simply added a `tests/integration/helpers.js` file with a `wait()` function that returns a promise that should wait long enough.

Long term we should hook into the app lifecycle by some means for testing, so we only wait the right amount of time, and wait long enough for slower processes to complete, but this may work for the time being, just enough to run some basic automated browser tests.

* Separate UI tests from normal unit test suite

* Add UI tests to CI test script

* Add testem and phantom to circleCI pre-script

* Fix circle pre script

* Move pre scripts to dependencies key

* Remove phantom from build deps

* Fix testem runner page

* Add promise polyfill for PhantomJS

* Skip PhantomJS in testem

* Run browser tests in parallel

* Fix promise usage?

* Correct skip usage
2016-07-25 16:42:39 -07:00
Dan Finlay
913a9e85bd Inject inpage script synchronously
Huge thanks to the Firefox team, for their help on the issue of our long-standing inpage script race condition.

http://stackoverflow.com/questions/38577656/how-can-i-make-a-firefox-add-on-contentscript-inject-and-run-a-script-before-oth

The problem is that we were injecting a `script` tag and assigning its `src` attribute, which triggers an asynchronous fetch request, and does not guarantee execution order! (That was news to me!)

Instead, I'm now assigning the `script` tag a `textContent` value of the script to inject, and it seems to fix the problem!

There is also a Firefox-only API that could solve this whole problem in an even more elegant way, so we might want to expose a code path for that solution later on:

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction

Allows you to expose an object from one scope to another. There was even talk of creating a polyfill for it that does virtually what we do, message passing between contexts.
2016-07-25 16:38:07 -07:00
Dan Finlay
6fa1d6efff Add note about firefox stackoverflow to readme 2016-07-25 14:50:19 -07:00
Kevin Serrano
950e7d3dcc Merge branch 'master' into usd-conversion 2016-07-26 06:39:40 +09:00
Dan Finlay
dcd1665e90 Add note about mozilla irc 2016-07-25 14:03:53 -07:00
Dan Finlay
b07bbc14e1 Clean up extension polyfill abstraction 2016-07-25 13:46:33 -07:00
Dan Finlay
0880721d84 Add firefox instructions to readme 2016-07-25 13:36:30 -07:00
Dan Finlay
f3ea891e72 Allow page injection to look for cross-browser APIs appropriately 2016-07-25 13:28:38 -07:00
Dan Finlay
5476cb9a2c Correct skip usage 2016-07-22 17:09:50 -07:00
Dan Finlay
6b3ffc9e5d Fix promise usage? 2016-07-22 17:08:17 -07:00
Dan Finlay
ae6fa76241 Run browser tests in parallel 2016-07-22 17:03:37 -07:00
Dan Finlay
f12394f7d5 Skip PhantomJS in testem 2016-07-22 17:02:59 -07:00
Dan Finlay
9f4f5f4bce Add promise polyfill for PhantomJS 2016-07-22 16:58:35 -07:00
Dan Finlay
b939da8508 Fix testem runner page 2016-07-22 16:52:01 -07:00
Dan Finlay
11ef342c61 Remove phantom from build deps 2016-07-22 16:39:55 -07:00
Dan Finlay
b37b2bcbdc Move pre scripts to dependencies key 2016-07-22 16:34:53 -07:00
Dan Finlay
ee3a2a65de Fix circle pre script 2016-07-22 16:30:56 -07:00
Dan Finlay
bf1bfdf87a Add testem and phantom to circleCI pre-script 2016-07-22 16:28:35 -07:00
Dan Finlay
c15ff7164e Add UI tests to CI test script 2016-07-22 16:23:52 -07:00
Dan Finlay
2e61102147 Separate UI tests from normal unit test suite 2016-07-22 16:20:43 -07:00
Dan Finlay
b724dd009c Add UI Testing Framework and Simple UI Test
Added a Testem configuration that launches a Qunit page with an iFrame that builds and loads our mock-dev page and can interact with it and run tests on it.

Wrote a simple test that accepts the terms and conditions and transitions to the next page.

I am not doing any fancy redux-hooks for the async waiting, I've simply added a `tests/integration/helpers.js` file with a `wait()` function that returns a promise that should wait long enough.

Long term we should hook into the app lifecycle by some means for testing, so we only wait the right amount of time, and wait long enough for slower processes to complete, but this may work for the time being, just enough to run some basic automated browser tests.
2016-07-22 15:43:30 -07:00
Kevin Serrano
86832e6feb Fix merge conflicts. Fix typos. Ensure currency immediately updated on load. 2016-07-22 11:15:47 -07:00
Kevin Serrano
22528002e1 Linting! 2016-07-22 10:15:39 -07:00
Kevin Serrano
bf5f1df20e Merge pull request #477 from MetaMask/MockDev
Add mock dev mode
2016-07-21 19:05:54 -07:00
Dan Finlay
5b4e2ffeac Add mock dev mode 2016-07-21 18:08:35 -07:00
Kevin Serrano
0bbfedc2bf Manifest fix for firefox-specific field (#475)
* Remove firefox-only manifest.json line.

* Changelog change.
2016-07-21 16:50:51 -07:00
Kevin Serrano
a612fcee64 Change function names. Add interval polling for api. Refactor functions. 2016-07-21 16:44:50 -07:00
Kevin Serrano
716e65424d Add date access throughout the data flow. 2016-07-21 14:08:26 -07:00
Dan Finlay
5d93e8fa74 Version 2.7.0 2016-07-21 13:42:09 -07:00
Frankie
fcd523abe4 Buy button (#474)
* WIP: Buy button link

* Add buy eth and the buy eth warning message

* Add css

* Move the opening of coinbase page to background
 and send to faucet if on test net

* Create a Warning about storeing eth

* Finish Buy button and Eth store warning screen

* Add to CHANGELOG

* fix frankies deletion and change chrome to extension
2016-07-21 13:41:10 -07:00
Kevin Serrano
66941f0808 Provide date access. 2016-07-21 13:33:22 -07:00
Kevin Serrano
7b85802a0f Merge branch 'master' into usd-conversion 2016-07-21 11:30:57 -07:00
Dan Finlay
6658bea8d4 Implement some cross-browser practices (#473)
* Add mozilla plugin key to manifest

* Move all chrome references into platform-checking module

Addresses #453

* Add chrome global back to linter blacklist

* Add tests
2016-07-21 10:45:32 -07:00
Kevin Serrano
4a9d5b1c25 Add data field to pass up parameters up to reducer. 2016-07-21 10:15:34 -07:00
Kevin Serrano
491b9cddc5 Add fiat actions to metamask controllere and actions. 2016-07-21 09:30:58 -07:00
Kevin Serrano
aac810b1eb Progress on config manager. Plus tests. 2016-07-21 08:47:03 -07:00
Dan Finlay
cdd7e40545 Make injected web3 fail hard on sync methods (#471)
Make injected web3 fail hard on sync methods
2016-07-20 14:54:07 -07:00
Dan Finlay
5567ea8dc5 Version 2.6.2 (#470) 2016-07-20 10:16:18 -07:00
Dan Finlay
4b8e95336d Add instructions for taking a state dump (#469) 2016-07-20 10:10:57 -07:00
kumavis
a174ec7fc1 Merge pull request #465 from MetaMask/i447
inpage - add try/catch to cleanContextForImports
2016-07-18 18:11:40 -07:00
kumavis
b2afa16925 typo fix 2016-07-18 18:08:29 -07:00
kumavis
9101812552 inpage - add try/catch to cleanContextForImports 2016-07-18 17:57:23 -07:00
Kevin Serrano
5b895c2a22 Merge pull request #455 from MetaMask/FixReopeningBug
Fix reopening bug
2016-07-18 12:26:58 -07:00
Kevin Serrano
1d8d8384c6 Update Changelog to account for last PR 2016-07-18 12:25:17 -07:00
Kevin Serrano
2bdda0848f Merge branch 'FixReopeningBug' of github.com:MetaMask/metamask-plugin into FixReopeningBug 2016-07-18 12:20:31 -07:00
Kevin Serrano
121874aeb6 Merge pull request #464 from MetaMask/test-branch
Test branch
2016-07-18 12:18:02 -07:00
Kevin Serrano
aaf3ff8b82 Merge branch 'master' of github.com:MetaMask/metamask-plugin 2016-07-18 12:14:44 -07:00
Kevin Serrano
3236c9869d Merge pull request #463 from MetaMask/aust-zero-changes
Aust zero changes
2016-07-18 12:09:35 -07:00
Kevin Serrano
96cd087c97 Readd string to conform to tests. Will discuss later. 2016-07-18 12:06:27 -07:00
Kevin Serrano
609bd7d6e8 Merge branch 'AustP-master' 2016-07-18 11:47:40 -07:00