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

[Test] Add tag cloud visualization to dashboard in functional test for reporting #87600

Merged
merged 10 commits into from Jan 16, 2021

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Jan 7, 2021

Summary

Problem: A blocking issue came up that a Tag Cloud panel in a Dashboard shows blank in PDF and PNG reports. That problem should have been caught by automated testing when it was first introduced.

I looked into it and found there is a PNG test in the Dashboard x-pack functional app tests, but the dashboard used for the test is a custom one that doesn't have a tag cloud visualization.

This PR updates the test to include a tag cloud panel. Its saved object data can be found in the data.json.gz file that is changed in this PR.

It has changes to clarify how the comparePNGs function works and lowers the threshold of delta percentage to 85%

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan marked this pull request as ready for review January 7, 2021 23:47
@tsullivan tsullivan added release_note:skip Skip the PR/issue when compiling release notes Feature:Reporting Reporting (PDF, CSV, ..) feature v7.11.0 v7.12 v7.13.0 v7.14.0 v8.0.0 labels Jan 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

const url = await PageObjects.reporting.getReportURL(60000);
const res = await PageObjects.reporting.getResponse(url);

expect(res.status).to.equal(200);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note

Unfortunately, all that the PDF tests are doing is verifying that the job completes successfully. That is ensured by the 200 response.

@elastic/kibana-app-services we need to think of a good way to validate the contents of a PDF file against a baseline. We have an implementation for PNG but not PDF.

@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

sessionReportPath,
getBaselineReportPath(reportFileName, 'png'),
config.get('screenshots.directory'),
log
);

expect(percentSimilar).to.be.lessThan(0.1);
expect(percentDiff).to.be.lessThan(0.09);
Copy link
Contributor

Choose a reason for hiding this comment

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

with value being (0.08) : I hit this error

       at Assertion.assert (/Users/rashmikulkarni/Documents/kibana/packages/kbn-expect/expect.js:100:11)
       at Assertion.lessThan.Assertion.below (/Users/rashmikulkarni/Documents/kibana/packages/kbn-expect/expect.js:336:8)
       at Function.lessThan (/Users/rashmikulkarni/Documents/kibana/packages/kbn-expect/expect.js:531:15)
       at Context.<anonymous> (test/functional/apps/dashboard/reporting/screenshots.ts:132:35)
       at Object.apply (/Users/rashmikulkarni/Documents/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

changing it to (0.09) - solves it.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

Copy link
Contributor

@rashmivkulkarni rashmivkulkarni left a comment

Choose a reason for hiding this comment

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

LGTM - post the changes - it is passing locally and on CI.

Thanks Tim!

@tsullivan tsullivan merged commit abffb19 into elastic:master Jan 16, 2021
@tsullivan tsullivan deleted the test/dashboard-pdf branch January 16, 2021 05:05
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jan 16, 2021
…r reporting (elastic#87600)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jan 16, 2021
…r reporting (elastic#87600)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 18, 2021
* master: (33 commits)
  [Security Solution][Case] Fix patch cases integration test with alerts (elastic#88311)
  [Security Solutions][Detection Engine] Removes duplicate API calls (elastic#88420)
  Fix log msg (elastic#88370)
  [Test] Add tag cloud visualization to dashboard in functional test for reporting (elastic#87600)
  removing kibana-core-ui from codeowners (elastic#88111)
  [Alerting] Migrate Event Log plugin to TS project references (elastic#81557)
  [Maps] fix zooming while drawing shape filter logs errors in console (elastic#88413)
  Porting fixes 1 (elastic#88477)
  [APM] Explicitly set environment for cross-service links (elastic#87481)
  chore(NA): remove mocha junit ci integrations (elastic#88129)
  [APM] Only display relevant sections for rum agent in service overview (elastic#88410)
  [Enterprise Search] Automatically mock shared logic files (elastic#88494)
  [APM] Disable Create custom link button on Transaction details page for read-only users
  [Docs] clean-up vega map reference documenation (elastic#88487)
  [Security Solution] Fix Timeline event details layout (elastic#88377)
  Change DELETE to POST for _bulk_delete to avoid incompatibility issues (elastic#87914)
  [Monitoring] Change cloud messaging on no data page (elastic#88375)
  [Uptime] clear ping state when PingList component in unmounted (elastic#88321)
  [APM] Consistent terminology for latency and throughput (elastic#88452)
  fix copy (elastic#88481)
  ...
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 19, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

tsullivan added a commit to tsullivan/kibana that referenced this pull request Jan 19, 2021
…r reporting (elastic#87600)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jan 19, 2021
…r reporting (elastic#87600)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
JasonStoltz pushed a commit to JasonStoltz/kibana that referenced this pull request Jan 19, 2021
…r reporting (elastic#87600)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
tsullivan added a commit that referenced this pull request Jan 19, 2021
…r reporting (#87600) (#88557)

* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

8 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them 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 Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Reporting Reporting (PDF, CSV, ..) feature release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v7.12.0 v7.13.0 v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants