Add todo to the test README and make slight changes

This commit is contained in:
Brett Sun 2016-01-25 17:31:09 +01:00
parent c3c9c88421
commit a2ea9b4aa2
1 changed files with 13 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# TL;DR # TL;DR
Copy the file `.env-template` in `.env` and fill up the missing keys. Copy the contents of `.env-template` to `.env` and [fill up the missing keys with
information from your SauceLabs account](#how-to-set-up-your-env-config-file).
```bash ```bash
$ npm install $ npm install
@ -8,6 +9,11 @@ $ npm test && git commit
``` ```
# TODO
* Use gulp to parallelize mocha invocations with different browsers
* Figure out good system for changing subdomain through test scripts
# Welcome to our test suite, let me be your guide # Welcome to our test suite, let me be your guide
Dear reader, first of all thanks for taking your time reading this document. Dear reader, first of all thanks for taking your time reading this document.
@ -154,8 +160,8 @@ chai.should();
``` ```
`browser` is the main object to interact with Saucelab "real" browsers. We will `browser` is the main object to interact with Saucelab "real" browsers. We will
use this object a lot. It allow us to load pages, click around, check if a use this object a lot. It allows us to load pages, click around, check if a
specific text is present etc. specific text is present, etc.
```javascript ```javascript
describe('Login logs users in', function() { describe('Login logs users in', function() {
@ -179,11 +185,13 @@ browser to a specific URL.
}); });
``` ```
While this function will be executed after each `it` function. `quit` will Close the browser after finishing all tests. `after` will be executed at the end
destroy the browser session. of all `it` functions. Use `afterEach` instead if you'd like to run some code
after each `it` function.
```javascript ```javascript
after(function() { after(function() {
// Destroys the browser session
return browser.quit(); return browser.quit();
}); });
``` ```
@ -197,7 +205,6 @@ without writing new functions.
it('should contain "Log in" in the title', function() { it('should contain "Log in" in the title', function() {
return browser.title().should.become('Log in'); return browser.title().should.become('Log in');
}); });
}); });
``` ```