mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Rebase remerge
This commit is contained in:
parent
afb832dc28
commit
747f8df06b
@ -42,21 +42,32 @@ Running Tests
|
|||||||
Run PhantomJS:
|
Run PhantomJS:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
phantomjs --webdriver=4444
|
npm run vi-phantom
|
||||||
```
|
```
|
||||||
|
|
||||||
And then run Gemini tests:
|
And then run Gemini tests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# In root onion/
|
npm run vi-test
|
||||||
gemini test gemini/* --report html
|
|
||||||
|
# Run only main tests
|
||||||
|
npm run vi-test:main
|
||||||
|
|
||||||
|
# Run only whitelabel tests
|
||||||
|
npm run vi-test:whitelabel
|
||||||
|
|
||||||
|
# Run only specific whitelabel tests
|
||||||
|
npm run vi-test:cyland
|
||||||
```
|
```
|
||||||
|
|
||||||
If you've made changes and want them to be the new baseline (ie. it's a correct change--**make sure** to test there are no regressions first!), use
|
If you've made changes and want them to be the new baseline (ie. it's a correct change--**make sure** to test there are
|
||||||
|
no regressions first!), use
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# In root onion/
|
npm run vi-update
|
||||||
gemini update gemini/*
|
|
||||||
|
# Update just the main app for desktop and mobile
|
||||||
|
npm run vi-update -- --browser MainDesktop --browser MainMobile
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -112,6 +123,8 @@ are available.
|
|||||||
|
|
||||||
Our tests are located in `onion/gemini/`.
|
Our tests are located in `onion/gemini/`.
|
||||||
|
|
||||||
|
**It would be nice if we kept the whitelabels up to date.**
|
||||||
|
|
||||||
Some useful tips:
|
Some useful tips:
|
||||||
* The `find()` method in the callbacks is equivalent to `document.querySelector`; it will only return the first
|
* The `find()` method in the callbacks is equivalent to `document.querySelector`; it will only return the first
|
||||||
element found that matches the selector. Use pseudo classes like `nth-of-type()`, `nth-child()`, and etc. to select
|
element found that matches the selector. Use pseudo classes like `nth-of-type()`, `nth-child()`, and etc. to select
|
||||||
@ -181,3 +194,11 @@ change the environment to run against.
|
|||||||
# In root /onion folder
|
# In root /onion folder
|
||||||
phantomjs phantomjs/launch_app_and_login.js
|
phantomjs phantomjs/launch_app_and_login.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
TODO
|
||||||
|
====
|
||||||
|
|
||||||
|
* Write scripts to automate creation of test users (and modify tests to accomodate)
|
||||||
|
* Set scripts with rootUrls pointing to staging / live using environment variables
|
||||||
|
* Set up with Sauce Labs
|
||||||
|
15
package.json
15
package.json
@ -14,6 +14,19 @@
|
|||||||
"start": "node server.js",
|
"start": "node server.js",
|
||||||
"test": "mocha",
|
"test": "mocha",
|
||||||
"tunnel": "node test/tunnel.js"
|
"tunnel": "node test/tunnel.js"
|
||||||
|
|
||||||
|
"vi-clean": "rm -rf gemini-report",
|
||||||
|
"vi-phantom": "phantomjs --webdriver=4444",
|
||||||
|
"vi-update": "gemini update",
|
||||||
|
"vi-test": "npm run vi-clean && gemini test --reporter html --reporter vflat || true",
|
||||||
|
"vi-test:all": "npm run vi-test",
|
||||||
|
"vi-test:main": "npm run vi-test -- --browser MainDesktop --browser MainMobile",
|
||||||
|
"vi-test:whitelabel": "GEMINI_BROWSERS='CcDesktop, CcMobile, CylandDesktop, CylandMobile, IkonotvDesktop, IkonotvMobile, LumenusDesktop, LumenusMobile, 23viviDesktop, 23viviMobile' npm run vi-test",
|
||||||
|
"vi-test:cc": "npm run vi-test -- --browser CcDesktop --browser CcMobile",
|
||||||
|
"vi-test:cyland": "npm run vi-test -- --browser CylandDesktop --browser CylandMobile",
|
||||||
|
"vi-test:ikonotv": "npm run vi-test -- --browser IkonotvDesktop --browser IkonotvMobile",
|
||||||
|
"vi-test:lumenus": "npm run vi-test -- --browser LumenusDesktop --browser LumenusMobile",
|
||||||
|
"vi-test:23vivi": "npm run vi-test -- --browser 23viviDesktop --browser 23viviMobile"
|
||||||
},
|
},
|
||||||
"browser": {
|
"browser": {
|
||||||
"fineUploader": "./js/components/ascribe_uploader/vendor/s3.fine-uploader.js"
|
"fineUploader": "./js/components/ascribe_uploader/vendor/s3.fine-uploader.js"
|
||||||
@ -42,7 +55,7 @@
|
|||||||
"chai-as-promised": "^5.1.0",
|
"chai-as-promised": "^5.1.0",
|
||||||
"colors": "^1.1.2",
|
"colors": "^1.1.2",
|
||||||
"dotenv": "^1.2.0",
|
"dotenv": "^1.2.0",
|
||||||
"gemini": "^2.0.3",
|
"gemini": "^2.1.0",
|
||||||
"jest-cli": "^0.4.0",
|
"jest-cli": "^0.4.0",
|
||||||
"mocha": "^2.3.4",
|
"mocha": "^2.3.4",
|
||||||
"phantomjs2": "^2.0.2",
|
"phantomjs2": "^2.0.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user