DoSomething/dosomething — pull request #3093 by sergii-tkachenko (2014-09-20 00:57:41+00:00)
Title: Provide UK-specific integration tests.

#### What's this PR do?
- Provides possibility to create affiliate-specific integration tests: `ds test --intl-integration uk`
- Includes [momentjs](http://momentjs.com/) npm library to simplify work with dates
- Provides random user generation for casper tests
- Provides UK SSO integration failtest:
- Test that Drupal configure for the UK correctly:
- OAuth settings must present
- Date format must be `d/m/y`
- Test that registration form is integrated with SSO
- Test that user created from SSO has correct data
- Test that user created from SSO can login

![screen shot 2014-09-20 at 3 23 56 am](https://cloud.githubusercontent.com/assets/672669/4343725/153973f8-4060-11e4-97cb-59aa5c4e6506.png)

#### How should this be manually tested?
Your vagrant have to be updated to the last baseline.
- `drush en dosomething_uk`
- Set `dosomething_uk_oauth_url`, `dosomething_uk_oauth_key`, `dosomething_uk_oauth_secret` variables
- `drush vset date_format_short "d/m/Y - H:i"`
- Login to VM and cd to `/var/www/vagrant`
- Run `bin/ds test --intl-integration uk`
- Wait for tests to finish

#### Any background context you want to provide?
I wrote UK tests in [coffeescript](http://coffeescript.org/) because:
- I was in hurry
- I think casper tests are more compact and readable on coffee
- It's 100% compatible with other test scripts, you can user all js function from `common.js`
- It's already built into `casperjs`, no additional changes is required
- Now we can compare what's more convinient to write scripts.
If we agree to not use coffee anymore, I'll just compile tests to pure js and do the readability refactoring

#### What are the relevant tickets?
This tests are to ensure nothing gets broken during [#DS-377](https://jira.dosomething.org/browse/DS-377) and [#DS-379](https://jira.dosomething.org/browse/DS-379).