Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context tests refactors #25669

Merged

Conversation

cuff-links
Copy link
Contributor

This PR is to migrate the contexts tests to Selenium and to get them passing.

sebelga and others added 30 commits October 29, 2018 20:14
…#24495)

* Use the cluster name from metadata if it exists

* PR comments
…#21169)

* Default scroll wheel zoom to false on vega maps. Update docs

* Update scroll wheel to false in tests
* Revert "Reporting cookies (elastic#24177)"

This reverts commit 9f4ec18.

* Take 2

* Adding comment

* Better escaping and encoding for use in eval

* Checking for an empty string also

* Fixing session test
…elastic#24783)

* Fix time field not being recognized due to ordering of aggs

* Clean up UI whitespace

* Update snapshot
* [kbn-datemath][parseEsInterval] improve types slightly

* [kbn-datemath][vis/leastCommonInterval] make types more precise

* [ui/leastCommonInterval] fix bug in finding same types

* add back valid test
In order to support esjs apiVersion 6.5 we need to upgrade to the newly released version of elasticsearch-js. Bumping makelogs allowed us to keep only one version of the elasticsearch module installed.
* Removes infra links and replaces context menu with single discover links for now

* Changes discover links to use empty button style
* Fixes check for security plugin

* Cleaned up security check logic. Fixed tests for create_handlers. Added TODOs

* Updated comment

* Added tests

* Updated variable names
…stic#24797)

I noticed the following message while watching the build output:

```
00:33:19.131    │ info [kibana] > /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/install/kibana/bin/kibana --optimize.useBundleCache=true --env.name=development --logging.json=false --server.port=5620 --optimize.watchPort=5630 --optimize.watchPrebuild=true --status.allowAnonymous=true --elasticsearch.url=http://elastic:changeme@localhost:9220 --elasticsearch.username=elastic --elasticsearch.password=changeme --server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d --xpack.xpack_main.telemetry.enabled=false --xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf" --optimize.enabled=true --xpack.reporting.capture.browser.type=chromium --xpack.spaces.enabled=false
00:33:38.533    │ proc [kibana]   log   [23:20:25.923] [info][optimize] Optimizing and caching bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, login, logout, dashboardViewer, apm, canvas, infra and kibana. This may take a few minutes
00:34:12.650    │ proc [kibana] [BABEL] Note: The code generator has deoptimised the styling of "/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/install/kibana/node_modules/x-pack/plugins/infra/node_modules/lodash/lodash.js" as it exceeds the max of "500KB".
00:36:11.346    │ proc [kibana]   log   [23:22:58.721] [info][optimize] Optimization of bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, login, logout, dashboardViewer, apm, canvas, infra and kibana complete in 152.79 seconds
```

The "code generator has deoptimised" line specifically raised a red flag as babel shouldn't be running on node_modules. We have admittedly weak regular expressions in two places to enforce this. The first is in https://github.com/elastic/kibana/blob/49071132c3c14590dea877bccb7647bbec1e1459/src/setup_node_env/babel_register/register.js#L42, which I verified matched `node_modules` directories within the `node_modules/x-pack` directory, but the other is https://github.com/elastic/kibana/blob/49071132c3c14590dea877bccb7647bbec1e1459/src/optimize/base_optimizer.js#L152-L154 which does not. It only excludes files from babel in webpack if they are within a node_modules directory that is a direct child of `node_modules/xpack`, but with InfraOps and Canvas we now have node_module directories at `plugins/*/node_modules`.

This should probably be fixed by preventing plugins from installing their own node_modules, but since that would involve upgrading/moving plugins between major versions of dependencies like lodash that's somewhat impractical from where I stand, so instead I've just updated the webpack module rule to exclude any `node_modules/xpack/**/node_modules` directory.
This commit does three things:
0. This fixes the instructions for interacting with the heartbeat service, which is called `heartbeat-elastic` not `heartbeat`
1. This removes some extraneous text that should be reserved for the subsequent section.
2. This makes the instructions for creating a monitor more explicit
…rval. (elastic#24742)

In certain cases tickInterval mistakenly could end up being negative which made getTickValues() run into a call stack size exception. This PR fixes it by a) adding a check to getTickValues() that interval must not be 0 or smaller and b) changing the way the tickInterval is determined in the Anomaly Explorer Charts.
* [ML] Reducing risk of upload timeouts

* function rename

* removing hardcoded number

* fixing typo

* updating comment
Improved reading of the contents, especially in the Transaction Flyout.
Fixes the missing y-axis description for rare charts in the form of y-axis event distribution split by {{fieldName}}. The intention is to briefly clarify that the type of chart is different than the other ones which have a count or metric based y-axis. This text is in addition to the text provided (but hidden without hovering) in the info icon tooltip.
elastic#24424)

* Check for toast before waiting for page to finish loading to avoid missing the toast by the time the page finishes

* turn test back on
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
…clearing URLjob deep-link when detail panel is closed. (elastic#24841)
…cha (elastic#24786)

* add warning to the documentation_links file about link validation gotcha

* Use Clint's full name
When querying against the default field (i.e. querying without specifying a field) we weren't correctly handling values with wildcards in them.
* [BeatsCM] Change Index template name

* Update x-pack/plugins/beats_management/server/management_server.ts

* Update x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/test_contract.ts
Spencer and others added 15 commits November 13, 2018 13:01
When generating a plugin with the plugin generator and scss is in use, we should add the generated `app.css` file to the .gitignore file.
* Add a note about index migrations to the kibana setup docs

* Tewak the migrations asciidocs for clarity

* docs: refine saved object migration details

Breaking down the migration process into sections helps people find
and link to relevant information more easily.

The focus is on ongoing maintenance of Kibana, whereas the initial new
experience in 6.5.0 is treated as a note of clarification.

Error handling should be expanded in the future to include details about
specific known error cases.
* Translate monitoring -> summary_status, table, main.html in directives

* Fix issues

* Fix tests

* Add disable eslint for unused var  intl
* Create common routines for PDF and PNG report processing

* REmove Blacklisted headers not needed

* Changes for issues with PDF and PNG testing

As per Joel Griffith suggestion I added removal of toast notifications after each click download report.  And removed setting of image density to 300.

* removed uneccesary image compare routine

* Moved server from property on job to passed in parameter.

* consolidated PDF and PNG testing

Moved test code from PDF and PNG index.test.js into a common index.test.js that now tests the common functions.

* Typescripted the common functions and broke out tests to individual test files

* Create a common create mock server function that all new tests call

* Removed unnecessary exception check and removed test include from index.ts
* Add href option in addition to onClick

* Small modificationd and adding tests

* Add missing import

* Switch order of tests

* Don't close panel menu again
* Translate monitoring -> license

* Translate monitoring -> page_loading

* Translate monitoring -> no_data

* Fix issues

* Update unit tests

* Fix eslint
* fix: switch to new CustomEvent

new Event is not supported in IE11

* fix: skip element.scrollTo when not available

that method doesn't exist on elements in IE11
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

These tests are running passing.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@dmlemeshko
Copy link
Member

@silne30 tests code LGTM. Do you know a reason for the build to fail?

@cuff-links
Copy link
Contributor Author

@dmlemeshko The build will always fail because it runs all of the tests from every suite. So even if you fix a suite, they will fail until we have fixed all of the suites.

@cuff-links
Copy link
Contributor Author

Gonna merge this since I got your approval. 😺

@cuff-links cuff-links merged commit ba0d27e into elastic:Swap_Leadfoot_Out_From_Under_The_Hood Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.