Commit graph

95 commits

Author SHA1 Message Date
Spencer
90434765c0 [functionalTestRunner] replace intern (#10910)
* [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
2017-04-11 17:01:06 -05:00
Spencer
d8d65526c6 [eslint] enable no undef (#10825)
* [codeshift] add proper ignore comments

* [codeshift] apply require-to-import transform

* [codeshift/fixup] remove duplicate imports

* [eslint] upgrade config for react "unused" support

* [codeshift] apply remove-unused-imports transform

* [codeshift] apply remove-unused-basic-requires transform

* [codeshift] apply remove-unused-function-arguments transform

* [lintroller] fix argument list spacing

* [codeshift] apply remove-unused-basic-bars transform

* [codeshift/fixup] fixup unused basic var removals

* manually apply remove-unused-assignments transform

* [codeshift] reapply remove-unused-imports transform

* [codeshift] reapply remove-unused-function-arguments transform

* [eslint] autofix param spacing

* manually fix remaining no-undef errors

* use more descriptive file ignore pattern

* add eslint-plugin-react peerDependency

* replace values that looked unused in tests

* remove // kibana-jscodeshift-no-babel comment

* remove import statements from code required by api tests

* Remove '// kibana-jscodeshift-ignore' comments

* address review feedback

* remove remnant of removed if condition
2017-03-22 07:08:23 -07:00
Spencer
e488a16e6f [eslint] reenable no-extra-semi and quotes rules (#9473)
* [eslint] re-enable no-extra-semi and quotes rules

* [eslint] update to version 0.2.2 of eslint config

* [eslint] autofix
2016-12-13 18:17:47 -07:00
Spencer
2f6654bcec [eslint] re-enable no-var and prefer-const (#9455)
* [eslint] enable no-var and autofix

* [eslint] enable prefer-const and autofix

* [eslint] fix autofix-incompatible no-var and prefer-const violations
2016-12-13 10:44:27 -07:00
Joe Fleming
26812c93a1 remove unused dep 2016-03-18 11:53:22 -07:00
spalger
cdcc795af8 [test/utils/kbnServer] opt-in to plugin loading 2016-03-17 18:42:35 -07:00
spalger
d77de4e1ca Merge branch 'master' of github.com:elastic/kibana into renameAllFiles 2016-03-15 00:35:01 -04:00
Nicolas Bevacqua
ec037de9be [test] Consolidate elasticsearch URL in configuration file. Fixes #5555 2016-03-14 14:06:25 -03:00
spalger
42f936e633 [npm] remove requirefrom package 2016-02-24 14:50:12 -08:00
spalger
c1c8607f27 [rename] process previously dynamic imports 2016-02-24 13:36:12 -08:00
spalger
07b32d715f Merge branch 'chore/removeRequireFrom' into renameAllFiles 2016-02-24 13:33:57 -08:00
spalger
506c9939b9 [npm] remove requirefrom package 2016-02-24 13:30:02 -08:00
spalger
2422a988e5 [rename] rename all files to snake_case 2016-02-24 12:14:05 -08:00
LeeDr
a30a70964c Improve baseUrl function. 2016-01-27 09:16:08 -06:00
LeeDr
82d993adff Add 5 tests for Discover shared links 2016-01-25 20:39:27 -06:00
Court Ewing
d50c48bccb Configurable shield credentials for tests
While there are still hardcoded defaults, this change allows people to
specify custom credentials via environment variables for each shield
role in our tests.
2016-01-21 13:13:17 -05:00
Court Ewing
4b0ac79c6f Inline documentation for kbn_server test utility 2016-01-15 11:48:46 -05:00
Court Ewing
eccb3d6f97 Basic support for running server tests with shield
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.
2016-01-12 17:16:10 -05:00
Court Ewing
41de597e42 Abstract kbn server setup in tests
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.
2016-01-12 17:11:58 -05:00
LeeDr
854489353c Make getUrl.noAuth use getUrl. Fix elasticsearch and kibana ports in serverConfig.js. 2015-12-17 10:12:33 -06:00
LeeDr
d01db9334b Initial changes (only the UI automation changes) to support running tests with Shield (works without Shield also). 2015-12-16 15:57:43 -06:00
Joe Fleming
e05e91bcd4 fix scenarioManager and getUrl tests 2015-11-05 17:36:15 -07:00
Joe Fleming
e50bb3b859 provide safe methods for app navigation
also change the way getUrl works
2015-11-05 14:41:43 -07:00
Jonathan Budzenski
8af41458ae [functional testing] Centralize server configs 2015-10-26 13:11:28 -05:00
Jonathan Budzenski
94996e8442 [functional testing] Rename getPage util to getUrl 2015-10-21 14:31:37 -05:00
Jonathan Budzenski
90969d9308 [functional testing] Add url configs and util to get pages 2015-10-21 14:26:42 -05:00
spalger
15864363d5 It has been a while.. sorry 2015-07-20 15:29:48 -07:00
spalger
ffc4f3d7e5 flatten the ui directory a bit, shorten module ids 2015-07-15 23:25:46 -07:00
Spencer Alger
40e2bd562f updated 'always included' list 2015-06-25 03:07:05 -07:00
Spencer Alger
701d2dedfb Merge branch 'master' of github.com:elastic/kibana into update/lodash 2015-06-16 18:02:30 -07:00
Spencer Alger
8da87d75f0 Merge branch 'master' of github.com:elastic/kibana into testing/seeds 2015-06-16 17:32:04 -07:00
Spencer Alger
4579019ec1 grunt-mocha integration 2015-06-15 16:05:30 -07:00
Spencer Alger
1b308bf86b Merge branch 'master' of github.com:elastic/kibana into update/lodash 2015-06-15 15:12:00 -07:00
Spencer Alger
ebb705cd89 [lodash] _.rest, _.last, and _.first audit 2015-06-15 10:10:59 -07:00
Spencer Alger
a5ffd91277 [lodash] audit _() usage to ensure compatibility with lodash 3.0
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.
2015-06-11 18:27:18 -07:00
Spencer Alger
971ca6ef3e [testing] add reusable test seed option to tests 2015-05-29 21:33:43 -07:00
Chris Cowan
127f0a1561 Fixing tests 2015-05-12 16:43:13 -07:00
Chris Cowan
1281e1317e Merge branch 'master' of github.com:elastic/kibana into feature/hapi-server 2015-05-11 10:56:11 -07:00
Chris Cowan
f4bc660c88 Merge branch 'master' of github.com:elastic/kibana into feature/hapi-server 2015-05-04 13:12:35 -07:00
Spencer Alger
77409af202 [indexPattern] clean up getFields() api 2015-05-04 07:49:06 -07:00
Spencer Alger
3d65cda4d2 Merge branch 'master' of github.com:elastic/kibana into fieldFormatting 2015-05-01 13:21:58 -07:00
Spencer Alger
f9ae669e79 [flattenHit] [formatHit] [stubbedIndexPattern] update tests 2015-05-01 10:33:14 -07:00
Spencer Alger
9caa81482c [object.routes] move away from precomputed routes
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')
```
2015-04-30 03:16:57 -07:00
Chris Cowan
76ddea6e99 Completing plugin system 2015-04-28 20:21:28 -07:00
Spencer Alger
a3bf70a85c [fieldEditor] added some tests
also fixed a bug here and bug there. No biggy
2015-04-24 18:40:37 -07:00
Spencer Alger
b2f71f7017 [registry/fieldFormats] clean up api to make Type/instance line clearer 2015-04-23 16:08:22 -07:00
Spencer Alger
f79aa5fd77 [indexPattern/flattenHits] ignore private hit.fields 2015-04-10 16:11:11 -07:00
Spencer Alger
32a0dbb663 [fieldFormats] shorten #defaultFor() to #for() 2015-04-08 18:13:47 -07:00
Spencer Alger
ec96ab028c rename limit to ary, like lodash 3.0 2015-04-08 16:56:32 -07:00
Spencer Alger
792059d69a [stringify] replace field formats with stringify component 2015-04-08 16:56:32 -07:00