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

[WIP] Fix multiple skipped tests in vertical bar chart #46703

Closed
wants to merge 150 commits into from

Conversation

bhavyarm
Copy link
Contributor

@bhavyarm bhavyarm commented Sep 26, 2019

Trying to fix: #45105

@bhavyarm bhavyarm changed the title Fix multiple skipped tests in vertical bar chart [WIP] Fix multiple skipped tests in vertical bar chart Sep 26, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@bhavyarm bhavyarm self-assigned this Sep 30, 2019
@bhavyarm bhavyarm added release_note:skip Skip the PR/issue when compiling release notes test-matrix Use this label to ensure PRs are tested with matrix jobs v8.0.0 labels Sep 30, 2019
This allows the timeline to adapt to the Kibana dark mode setting
@elasticmachine
Copy link
Contributor

💔 Build Failed

jloleysens and others added 4 commits September 30, 2019 16:44
* First attempt at editor.tsx integration test

* Fix typo in variable name

* Expanded smoke test integration tests

* Mounting happens in beforeEach
Added i18n context to suppress error messages
Updated name of data-test-subj for the send request button
* Remove unnecessary whitespace

* Split CommitHistory into multiple files

There were already >5 components in this file; this splits them into
smaller, distinct components/files and an index.

* Extract props to interfaces

Rather than keeping them inline.

* Add basic implementation of new commit actions

This is embedded within the Commit component, for now.

Obviates CommitLink for now, but we'll address that in the PR.

* Update the remainder of the Commit layout

* Parses and displays the commit title/description
* Parses and displays the author and date
* Adds new translations

* Update translation keys to match naming standards

See
https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/GUIDELINE.md
for details.

* Extract commit message parsing to helper util

* Move CommitLink to commit folder

* Fix font-sizes of commit text

I was reading the wrong field in figma. Whoops!

* Add RepoLink component controlled by a boolean

If we're already viewing the commit in the context of the repo, the link
here isn't as helpful. For our first use, the commit history, that is
the case.

* Simpler construction of app paths

We should build a helper for this, but these are strewn about the
codebase.

* Update snapshots following text size changes

* Truncate summary text

* Fix type error on test component

* Make date-dependent test timezone-agnostic

Uses Date.UTC to get a non-relative date/time.
@bhavyarm
Copy link
Contributor Author

@markov00 is taking a look at the last failing test here:

    it('should show ticks on selecting log scale', async () => {
        await PageObjects.visualize.clickMetricsAndAxes();
        await PageObjects.visualize.clickYAxisOptions(axisId);
        await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
        await PageObjects.visualize.clickYAxisOptions(axisId);
        await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
        await PageObjects.visualize.clickGo();
        const labels = await PageObjects.visualize.getYAxisLabels();
        const expectedLabels = [
          '2', '3', '5', '7', '10', '20', '30', '50', '70', '100', '200',
          '300', '500', '700', '1,000', '2,000', '3,000', '5,000', '7,000',
        ];
        expect(labels).to.eql(expectedLabels);
      });

This is the failure:

fail: "visualize app  vertical bar chart flaky test switch between Y axis scale types should show ticks on selecting log scale"
           │ 
           │       Error: expected [ '2' ] to sort of equal [ '2',
           │   '3',
           │   '5',
           │   '7',
           │   '10',
           │   '20',
           │   '30',
           │   '50',
           │   '70',
           │   '100',
           │   '200',
           │   '300',
           │   '500',
           │   '700',
           │   '1,000',
           │   '2,000',
           │   '3,000',
           │   '5,000',
           │   '7,000' ]
           │       + expected - actual
           │ 
           │        [
           │          "2"
           │       +  "3"
           │       +  "5"
           │       +  "7"
           │       +  "10"
           │       +  "20"
           │       +  "30"
           │       +  "50"
           │       +  "70"
           │       +  "100"
           │       +  "200"
           │       +  "300"
           │       +  "500"
           │       +  "700"
           │       +  "1,000"
           │       +  "2,000"
           │       +  "3,000"
           │       +  "5,000"
           │       +  "7,000"
           │        ]
           │       
           │       at Assertion.assert (packages/kbn-expect/expect.js:100:11)
           │       at Assertion.eql (packages/kbn-expect/expect.js:235:8)
           │       at Context.eql (test/functional/apps/visualize/_vertical_bar_chart.js:173:27)
           │       at process._tickCallback (internal/process/next_tick.js:68:7)
           │ 
           │ 
         └-> "after all" hook
       └-> "after all" hook
     └-> "after all" hook
   └-> "after all" hook

kertal and others added 6 commits September 30, 2019 17:50
* Add getCache method to IndexPatterns

* Refactor to use IndexPatternCache instead of another request

* Improve getCache function to be async if necessary

* Adapt discover controller code
* Create supporting API

* Rename mute terminology to mute instance to allow alert level muting

* Add alert mute and unmute APIs

* Add logic to handle alert muting

* Add integration tests + fix AAD breaking the object

* Fix failing jest tests

* Fix test failures

* Clear out mutedInstanceIds when muting / unmuting an alert

* Skip muting / unmuting instances when alert is muted

* Rename interface for alert instance

* Rename functional tests to alert instance terminology

* Add API integration tests for alert muting / unmuting

* Apply PR feedback pt1

* Create single index record action

* Function to create always firing alerts and function to generate reference

* Make tests use alert utils

* Rename mute / unmute alert routes

* Make alerts.ts integration test use alertUtils for both spaces_only and security_and_spaces

* Re-use alert utils where possible

* Change muted in mapping to muteAll

* Rename alert client methods to muteAll and unmuteAll

* Rename files

* Rename alert utils function muteAll and unmuteAll

* Rename variable in task runner

* Cleanup

* Destructure instead of using existingObject variable
…sts with bodies (elastic#46200)

* Cleaned up use of es.send API
  - Converted Elasticsearch proxy config to TS (now we can see the types with https.AgentOptions)
  - Wrap request in util.promisify and refactor
  - Use 'url' lib for parsing URLs
  - Remove rejectUnauthorized from proxy_route.js (this is a TLS setting handled in agent setup)
* Retained original proxying behavior
* Re-enable support for setting rejectUnauthorized via proxy config settings
* Updated tests.
…obs (elastic#46894)

This PR adds tests for ML single metric, multi metric and population job cloning.
ogupte and others added 2 commits September 30, 2019 11:24
* [APM] fix bug where flyout state did not reflect the currently selected agent config

* removed commented code
* adds linter rule to disallow undeclared variables

* adds cypress eslint plugin, remove redundant packages from siem/package.json

* removes comment from json and adds a line about cypress linting to the cypress README

* adds upgraded package back to siem/package.json

* updates cypress run scripts since cypress package is now located in the x-pack/node_modules

* needed to yarn kbn bootstrap after rebasing with master
renovate bot and others added 15 commits October 5, 2019 05:31
* Update gulp related packages

* ts-ify and gulp4-ify x-pack tasks, remove unused canvas tasks

* remove unnecessary gulp.TaskFunction usage

* fix old references

* update renovate config

* move constants into helpers directory

* typo

* compact tasks a bit, remove unnecessary paths

* fix build directories

* deprecate testonly task

* rather than justifying an unjustifiable ts-ignore, ts-ify the imported module

* update renovate config

* update browser download tests to mock axios

* add root index.d.ts to tsconfig

* export BrowserType

* remove unnecessary `@ts-ignore`

* use consistent casing
* Added storage interface to avoid importing ui/storage

* Move persisted log into data plugin / query

* Fix jest tests

* import getQueryLog

* Add store to graph search bar

* Added window localStorage

* Deleted persisted log folder
* Bind search bar

* create prewired data components

* Pass NP data plugin to shim plugin, to access autocomplete
Pass storage and autocomplete to createSearchBar method
Add appName and autocomplete to IDataPluginServices
QueryBarInput to consume autocomplete and appName from context
QueryBarTopRow to consume appName from context
Remove appName from SearchBar
Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types

* Use KibanaContextProvider in vis editor and graph

* Use KibanaContextProvider in maps

* Use prewirted SearchBar in TopNavMenu

* Use KibanaContextProbider in Lens

* Fix appName usage in query bar input

* fixed query bar top row appName

* update tests

* fixed bind search bar bug

* mock SearchBar

* Removed unnecessary mocks

* Delete unused mock

* Fixed exporting of data plugin types

* Updated maps snapshot

* Fixed some TS issues

* Fixed jest tests

* Context adjustments in TSVB

* componentWillMount

* Code review fixes

* Pass dataTestSubj to query bar input

* Graph data

* - Pass NP data plugin to KibanaReactContext
- Move value_suggestions to NP

* - Pass NP data plugin to KibanaReactContext
- Move value_suggestions to NP

* ts fixes

* Added karma getSuggestions fake

* Refactored kuery autocomplete tests to jest

* Filter bar context for directives

* updated snapshot

* fix diffs

* fixed lens test
* Moving FieldNameIcon implementation to FieldIcon implementation in kibana_react directory

* Adding LensFieldIcon implementation around the new FieldIcon to be used in Lens components

* Applying new LensFieldIcon in the Lens components

* Applying new FieldIcon component in Graph components

* Applying new FieldIcon component in the rest of the components

* Adding missing type to lens field icon

* adding missing type

* Addressing PR comments
* [functional/services] refactor using new types

* [code/history] wrap forward navigation with browser service
* Adding width and height as parameters to image url

* Addressing PR comments

* Removing unnecessary error message
This PR adds tests for ML job creation based on saved searches
…7223)

* honor current search criteria when exporting saved objects

* adding core docs
@bhavyarm bhavyarm requested review from a team as code owners October 7, 2019 15:13
@bhavyarm bhavyarm requested a review from a team October 7, 2019 15:13
@bhavyarm bhavyarm requested review from a team as code owners October 7, 2019 15:13
@bhavyarm bhavyarm requested a review from a team October 7, 2019 15:13
@bhavyarm bhavyarm requested a review from a team as a code owner October 7, 2019 15:13
@bhavyarm
Copy link
Contributor Author

bhavyarm commented Oct 7, 2019

apologies. This was a bad commit.

@bhavyarm bhavyarm closed this Oct 7, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment