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

[Lens] Add more chart editor tests based on the debug state #86750

Merged
merged 11 commits into from
Dec 29, 2020

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Dec 22, 2020

Summary

This PR is a rebased version of #84502 with more testing for chart XY axis.

Checklist

@dej611 dej611 marked this pull request as ready for review December 23, 2020 11:48
@dej611 dej611 requested a review from a team December 23, 2020 11:48
@dej611 dej611 added release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 labels Dec 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me, just have one question about waiting for the chart to load


await PageObjects.lens.closeDimensionEditor();

await retry.tryForTime(3000, async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we replace this with a await PageObjects.header.waitUntilLoadingHasFinished() along with the other occurences below? That's also what's used in x-pack/test/functional/apps/lens/chart_data.ts

dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension',
operation: 'avg',
field: 'bytes',
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you load one of the existing pre-saved visualizations that are used by the other charts? Does it need to be the Terms agg?

expect(
state.bars![0].bars.map((bar) => ({
x: bar.x,
y: Math.round(bar.y * 100) / 100,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you comment on why this rounding is needed? Or maybe the expect library has a number precision parameter?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's because the data table rounds numbers to two decimal points, but the xy chart does not

assertMatchesExpectedData(data!);
});

it.skip('should render pie chart', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment on the skipped tests

@dej611
Copy link
Contributor Author

dej611 commented Dec 28, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.0MB 1.0MB +566.0B

Distributable file count

id before after diff
default 47267 48027 +760

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dej611 dej611 merged commit 2781bf3 into elastic:master Dec 29, 2020
@dej611 dej611 deleted the test/lens/chart-data-test-2 branch December 29, 2020 13:18
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 30, 2020
* master: (108 commits)
  [DOCS] Refreshes Data Visualizer screenshot (elastic#87017)
  [Security Solution] Change 'anti-virus' text to 'antivirus' (elastic#87001)
  [securitySolution/cypress] temporarily limit to PRs
  [AppServices/Examples] Add the example for Reporting integration (elastic#82091)
  [Build Chromium] Improve git checkout (elastic#83225)
  Deprecate `services.callCluster` in alerts and actions executors (elastic#86474)
  [Security Solution] Use system node version for Cypress and increase exec command timeout (elastic#86985)
  [Lens] Add more chart editor tests based on the debug state (elastic#86750)
  [Lens] Integrate searchSessionId into Lens app (elastic#86297)
  skip "pagination updates results and page number" elastic#86975
  skip "Custom detection rules" elastic#83772
  [logging/json] use merge from kbn/std (elastic#86330)
  skip network and timeline inspection. elastic#85677, elastic#85678
  skip "adds correctly a filter to the global search bar" elastic#86552
  [ftr/flags] improve help text (elastic#86971)
  skip "Fields Browser rendering. elastic#60209
  skip "Closes and opens alerts" elastic#83773
  [Security Solution] Skip failing Cypress tests (elastic#86967)
  Removes archives (elastic#86537)
  [ML] Fix charts grid on the Anomaly Explorer page (elastic#86904)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 30, 2020
* master: (72 commits)
  [DOCS] Refreshes Data Visualizer screenshot (elastic#87017)
  [Security Solution] Change 'anti-virus' text to 'antivirus' (elastic#87001)
  [securitySolution/cypress] temporarily limit to PRs
  [AppServices/Examples] Add the example for Reporting integration (elastic#82091)
  [Build Chromium] Improve git checkout (elastic#83225)
  Deprecate `services.callCluster` in alerts and actions executors (elastic#86474)
  [Security Solution] Use system node version for Cypress and increase exec command timeout (elastic#86985)
  [Lens] Add more chart editor tests based on the debug state (elastic#86750)
  [Lens] Integrate searchSessionId into Lens app (elastic#86297)
  skip "pagination updates results and page number" elastic#86975
  skip "Custom detection rules" elastic#83772
  [logging/json] use merge from kbn/std (elastic#86330)
  skip network and timeline inspection. elastic#85677, elastic#85678
  skip "adds correctly a filter to the global search bar" elastic#86552
  [ftr/flags] improve help text (elastic#86971)
  skip "Fields Browser rendering. elastic#60209
  skip "Closes and opens alerts" elastic#83773
  [Security Solution] Skip failing Cypress tests (elastic#86967)
  Removes archives (elastic#86537)
  [ML] Fix charts grid on the Anomaly Explorer page (elastic#86904)
  ...
dej611 added a commit to dej611/kibana that referenced this pull request Dec 30, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 31, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants