-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Time to Visualize] Adds functional tests for linking/unlinking panel from embeddable library #89612
[Time to Visualize] Adds functional tests for linking/unlinking panel from embeddable library #89612
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
3ecee63
to
181dae0
Compare
181dae0
to
f3a6dc6
Compare
@elasticmachine merge upstream |
5baca1e
to
85f5bdd
Compare
x-pack/test/functional/apps/maps/embeddable/embeddable_library.js
Outdated
Show resolved
Hide resolved
x-pack/test/functional/apps/maps/embeddable/embeddable_library.js
Outdated
Show resolved
Hide resolved
|
||
const originalPanel = await testSubjects.find('embeddablePanelHeading-documentexample'); | ||
await dashboardPanelActions.unlinkFromLibary(originalPanel); | ||
await testSubjects.existOrFail('unlinkPanelSuccess'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better instead of asserting a success message gets displayed to also go to visualize listing page and ensure saved object is listed when its in the library and not listed when not in library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though unlinking won't actually remove any entries from the library, this is still important to test at least once. You could start by creating a panel by value, adding it via the 'save to library' action, then double checking that it shows up in the visualize listing page.
}); | ||
|
||
after(async () => { | ||
await security.testUser.restoreDefaults(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One concern I have about this test is that "document example" saved object is used in other maps tests. What happens if there is an error linking the saved object back to the library? Will down stream tests be effected? Seems like there is not a good way to clean up the "document example" saved object incase it gets left in a stranded state. How about creating a new map saved object in https://github.com/elastic/kibana/blob/master/x-pack/test/functional/es_archives/maps/kibana/data.json that is used only in this test to avoid an potential flaky tests if this test fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'unlink' feature doesn't delete any saved objects. It only affects the panel that it is applied against, and this panel looks to be created on a new dashboard so it shouldn't cause any downstream problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nreese I've updated the maps tests to create a new map. Can you take a look when you get a chance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are looking great, and everything is passing CI which is amazing. I left a note of one additional test that could be good to add.
@@ -91,6 +91,7 @@ | |||
/src/plugins/dashboard/ @elastic/kibana-presentation | |||
/src/plugins/input_control_vis/ @elastic/kibana-presentation | |||
/src/plugins/vis_type_markdown/ @elastic/kibana-presentation | |||
/test/functional/apps/dashboard/ @elastic/kibana-presentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
|
||
const originalPanel = await testSubjects.find('embeddablePanelHeading-documentexample'); | ||
await dashboardPanelActions.unlinkFromLibary(originalPanel); | ||
await testSubjects.existOrFail('unlinkPanelSuccess'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though unlinking won't actually remove any entries from the library, this is still important to test at least once. You could start by creating a panel by value, adding it via the 'save to library' action, then double checking that it shows up in the visualize listing page.
c682ae9
to
2c0c63c
Compare
jenkins test this |
8bb01f7
to
3ca707b
Compare
3ca707b
to
14d4118
Compare
💚 Build Succeeded
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
code review
…timeline-and-rollover-info * 'master' of github.com:elastic/kibana: (47 commits) [Fleet] Use TS project references (elastic#87574) before/beforeEach clean up (elastic#90663) [Vega] user should be able to set a specific tilemap service using the mapStyle property (elastic#88440) [Security Solution][Case] ServiceNow SIR Connector (elastic#88655) [Search Sessions] Enable extend from management (elastic#90558) [ILM] Delete phase redesign (rework) (elastic#90291) [APM-UI][E2E] use withGithubStatus step (elastic#90651) Add folding in kb-monaco and update some viewers (elastic#90152) [Grok Debugger] Changed test to wait for grok debugger container to exist to fix test flakiness (elastic#90543) Strongly typed EUI theme for styled-components (elastic#90106) Fix vega renovate label (elastic#90591) [Uptime] Migrate to TypeScript project references (elastic#90510) [Monitoring] Migrate data source for legacy alerts to monitoring data directly (elastic#87377) [Upgrade Assistant] Add A11y Tests (elastic#90265) [Time to Visualize] Adds functional tests for linking/unlinking panel from embeddable library (elastic#89612) [dev-utils/ship-ci-stats] fail when CI stats is down (elastic#90678) chore(NA): remove write permissions on Bazel remote cache for PRs (elastic#90652) chore(NA): move bazel workspace status from bash script into nodejs executable (elastic#90560) Use default ES distribution for functional tests (elastic#88737) [Alerts] Jira: Disallow labels with spaces (elastic#90548) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/timeline/timeline.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/absolute_timing_to_relative_timing.test.ts # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/absolute_timing_to_relative_timing.ts
Friendly reminder: Looks like this PR hasn’t been backported yet. |
… from embeddable library (#89612) (#91066) # Conflicts: # .github/CODEOWNERS Co-authored-by: Kibana Machine <[email protected]>
Summary
Related to #80584.
This adds functional tests for unlinking a panel from the embeddable library and save a panel to the embeddable library.
Checklist
Delete any items that are not applicable to this PR.
For maintainers