Commit Graph

83 Commits

Author SHA1 Message Date
kumavis 74dc20bdf1 Merge branch 'dev' into obs-store2 2017-01-21 10:06:50 -08:00
Dan Finlay 3572708fda Fix test to log out despite number of menu items 2017-01-17 16:49:08 -08:00
kumavis 3bc996878b background - move pojo migrator to outside of metamask controller 2017-01-11 22:47:56 -08:00
kumavis 8012ede126 background - introduce ObservableStore 2017-01-11 19:31:21 -08:00
Dan Finlay e95c937569 Add additional migration test 2016-12-23 17:09:24 -08:00
Dan Finlay ebeaf3b3d6 Restructured migration
Migrator now returns a lostAccount array that includes objects
these objects include keys of address and privateKey,
this allows the MetamaskController to restore the lost accounts
even without customizing the idStore or the KeyringController.

Also includes a patch that allows idStore to synchronously export private keys.
2016-12-21 17:21:10 -08:00
Dan Finlay b3533f9bf7 Fixed another lostAccount test 2016-12-21 10:49:56 -08:00
Dan Finlay 674b268982 Merge pull request #916 from MetaMask/i894-DetectBadAccounts
I894 detect bad accounts
2016-12-20 11:50:26 -08:00
Dan Finlay 26f1e6cbd2 Remove encryptor in favor of external browser-passworder
I broke out the encryptor lib into its own module on npm called browser-passworder.
2016-12-19 21:55:02 -08:00
Dan Finlay 7b9749e30c Got bad account detection working and added to state 2016-12-09 12:24:25 -08:00
Dan Finlay ab9e15b782 Mostly added bad account detection
Currently riddled with logs, because the migrator is inexplicably returning before generating the new style accounts for comparison.
2016-12-08 14:22:02 -08:00
Dan Finlay c93227ea72 Cranked up CI test suite wait duration to alleviate their nondeterminism for now 2016-12-07 16:55:15 -08:00
Dan Finlay 1880cda9b9 Fix vault encrypting & unlocking bug
This is only a bug in dev, but was committed yesterday.

Sometimes the `encrypt` method was being passed values other than the password as the encryption key, leading to un-unlockable vaults.

To find this, and avoid it for all time hereafter, I added several more steps to our oft-neglected integration test suite, which now fully initializes a vault, locks it, and unlocks it again, to make sure all of those steps definitely work always.
2016-11-30 19:36:24 -08:00
Dan Finlay 049e351c9d Add integration tests for logging out and back in 2016-11-30 16:01:51 -08:00
Dan Finlay fe533bbef2 Add more integration tests
Integration tests now:
- Scroll through terms
- Accept terms
- Confirm seed phrase
- Verify account detail screen
2016-11-30 15:18:26 -08:00
Dan Finlay 549bbfd05f Made integration test create a first vault 2016-11-30 14:58:40 -08:00
Dan Finlay 80e76b45ee Denodeify most of KeyringController
Mostly Fixes #893

A couple methods cache callbacks, and will require a larger refactor to fully denodeify.

Specifically, our methods involving web3 requests to sign a tx, sign a message, and approve or cancel either of those.

I think we should postpone those until the TxManager refactor, since it will likely handle this response caching itself.
2016-11-28 16:13:03 -08:00
Dan Finlay 05c8658ff3 Fix new encryptor migration logic 2016-11-22 17:41:54 -08:00
Kevin Serrano 3cd839d27f
Create failing test to check submitPassword in keyringController. 2016-11-18 15:40:12 -08:00
Dan Finlay 93c0a6826a Fix integration test suite 2016-11-07 14:11:01 -08:00
Dan Finlay ba7d6b437f Fix password validation and persistence issue
Was wiping the vault on each successful password attempt... :P
2016-11-03 16:14:37 -07:00
Kevin Serrano b3cb3e9ec6
Remove debugger statement. 2016-10-25 13:24:57 -07:00
Kevin Serrano 678301a20e
Phase out extra warning screen. 2016-10-25 13:24:03 -07:00
Dan Finlay 0deed17752 Fix tests 2016-10-20 12:07:53 -07:00
Dan Finlay 036b0e4cca Linted 2016-10-14 16:29:24 -07:00
Dan Finlay 1c791c4d2e Got basic encryptor working 2016-10-14 15:59:07 -07:00
Dan Finlay c9cfcd5253 Got encrypting working, not yet decrypting 2016-10-14 13:21:00 -07:00
Dan Finlay cce8d9e360 Began adding browser-native encryptor module
Added new Qunit build process that will browserify the contents of `test/integration/lib` into the QUnit browser, allowing much more modular testing, including unit testing of our modules in our target browsers.

Made a basic unit test file of this form for the new encryptor module, which fails miserably because I've only just begun to work with it.

I've started with this blog post as a starting point, and will be adjusting it to our needs from there:
http://qnimate.com/passphrase-based-encryption-using-web-cryptography-api/
2016-10-12 20:07:46 -07:00
Kevin Serrano 5c0c370fe4
Remove comments. 2016-10-11 15:52:44 -07:00
Kevin Serrano 5e9bc31c58
Cleanup. 2016-10-11 15:50:02 -07:00
Kevin Serrano e20e0f661d
Fix integration test. 2016-10-05 19:49:53 -07:00
Kevin Serrano c0d6dcff00
Rewritten to react standards. Way easier. 2016-10-05 02:42:19 -07:00
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