* [functional_test_runner] replace functional testing tools with custom/pluggable solution
* [functional_test_runner] Convert unit tests to commonjs format
* [functional_test_runner] Fix dashboard test in wrong mode
* [functional_test_runner] Add dashboardLandingPage test subject
* [functional_test_runner] Get Visualize page object
* [functional_test_runner] Fix outdated references
* [functional_test_runner] Fix more outdated refs
* [functional_test_runner] Remove duplicate tests
* [functional_test_runner] Improve test readability
* [functional_test_runner] 😞 So many duplicate methods
* [functional_test_runner] Move mgmt `before` outside toplevel describe
* [functional_test_runner] Settings page obj missing methods
* [functional_test_runner] Add improvements from @gammon
* [functional_test_runner] Fix return statements in async funcs
* [functional_test_runner] Move before() to correct scope
* [functional_test_runner] Add after() hooks to remove index patterns
* [functional_test_runner] Attempt to fix vertical bar chart tests
* [functional_test_runner] Clean up
* [functional_test_runner] Reinstate unit tests
* [functional_test_runner] Set default loglevel back to info
* [functional_test_runner] Replace `context`s with `describe`s
* [functional_test_runner] Better error handling
* [functional_test_runner] Add in new Tile Map tests
* Incorporate changes from master
* [functional_test_runner] validate that every test file has a single top-level suite
* Update contributing doc with link to full doc
* [docs] Spelling and grammar fixes
* docs: writing and running functional tests
* [docs] Move plugin doc to plugin area
* [docs] Housekeeping. Doc in wrong place
* [docs] Remove dup doc file
* [grunt] Only run mocha_setup when running tests, not every grunt task
While there are still hardcoded defaults, this change allows people to
specify custom credentials via environment variables for each shield
role in our tests.
These changes will make sure the kibana server in tests is using shield
credentials, as are any requests made through the kbn_server test
helper.
The current credentials are hardcoded based on our internal best
practices, but they should be made configurable in the future.
This will pass credentials to ES regardless of whether shield is
actually enabled, but that will have no negative effect if shield
happens to be disabled.
The new kbn_server test utility allows us to setup KbnServer instances
with consistent defaults and make requests through a common test-only
interface. These abstractions allow us to configure global behaviors
such as shield authorization for all of our tests rather than
re-implementing it in every test.
Starting in lodash 3.0 _() chains are lazily evaluated and therefor usage of the pattern had to be checked for side effects. Where it made more sense to just use Array methods, the code was updated. In other places the code was already calling .value() on the chain, so no changes were needed. Finally, there were places where the chain was not designed to produce a value, but to modify a value that was already in scope (like this/self), in those senarios .commit() was added to force evaluation of the chain.
A circular dependency was discovered in the Doc AppController tests, because it was stubbing
$route and required the IndexPattern class. The dependency path was something like:
$route -> IndexPattern -> Field -> kbnUrl -> $route
While investigating solutions for this I noticed two things: we require kbnUrl both
in the object classes where urls are precomputed and in the controllers/directives
where we redirect/change the url, we needed error-prone logic to recompute the urls
when their dependencies change.
To simplify things and solve the circular dep, the indexPattern and field objects now just
expose a .routes property that has named route patterns. These patterns expect to receive
the object they describe in order to create the route. kbnUrl was also updated with helper
functions for this:
```
kbnUrl.getRouteUrl(indexPattern, 'edit') -> '#/settings/indices/logstash-*'
kbnUrl.redirectToRoute(indexPattern, 'indexedFields')
kbnUrl.changeToRoute(field, 'edit')
```