Functional tests: refactor visualize_page#53845
Conversation
💔 Build FailedTo update your PR or re-run it, just comment with: |
💔 Build FailedTo update your PR or re-run it, just comment with: |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
| import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
|
||
| export function VisualizeListingTableProvider({ getService, getPageObjects }: FtrProviderContext) { | ||
| export function ListingTableProvider({ getService, getPageObjects }: FtrProviderContext) { |
There was a problem hiding this comment.
Can be reused for Dashboard and Settings landing pages
…kibana into ftr/reorganize--page-objects
|
@elasticmachine merge upstream |
| await testSubjects.existOrFail('visLibVisualizeError'); | ||
| } | ||
|
|
||
| public async getChartTypes() { |
There was a problem hiding this comment.
I think getChartTypes should be in visualize_page?
There was a problem hiding this comment.
You are right, fixing it
| const listingTable = getService('listingTable'); | ||
| const { common, header, visEditor } = getPageObjects(['common', 'header', 'visEditor']); | ||
|
|
||
| class VisualizePage { |
There was a problem hiding this comment.
Maybe we can have a comment block here describing that this page object file contains the visualization type selection, the landing page, and the open/save dialog functions (is that correct?)
I was going to suggest we rename it to visualization_types_page or something like that, but now I see it has more than that.
LeeDr
left a comment
There was a problem hiding this comment.
LGTM - a few small comments you can address if you like. Wow, this looks like it was a lot of work but really makes it better! Some of the visualization_chart_page will be obsolete as we move over to elastic-charts library. But it's still a great improvement.
…kibana into ftr/reorganize--page-objects
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* add new POs and services * split visualize_page * refactor PO and tests * lost changes * more fixes * fix tslint error * refactor POs * add vega_chart_page, refactor * review fix Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* add new POs and services * split visualize_page * refactor PO and tests * lost changes * more fixes * fix tslint error * refactor POs * add vega_chart_page, refactor * review fix Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…le-saved-objects * 'master' of github.com:elastic/kibana: (86 commits) [Uptime] Added date range filter into expanded list query (elastic#52609) [SIEM] Add react/display-name eslint rule (elastic#53107) [SIEM] Enable eslint prefer-template rule (elastic#53983) Elasticsearch snapshots automation (elastic#53706) [SIEM] Enable eslint react/no-children-prop (elastic#53985) [DOCS][Reporting] Adds info about using a custom reporting index (elastic#54052) Changing background color to align with EUI color (elastic#54060) Fix linting issues (elastic#54068) NP Migration: Move doc views registry and existing doc views into discover plugin (elastic#53465) [ML] DF Analytics job creation: Add 'excludes' input field to form (elastic#53856) EMT-issue-65: add endpoint list api (elastic#53861) [SIEM] Fix doubled drag handles in Timeline (elastic#52679) Functional tests: refactor visualize_page (elastic#53845) [Dashboard] Redesign empty screen in readonly mode (elastic#54073) [ML] Support search for partitions on Single Metric Viewer (elastic#53879) update apm index pattern (elastic#54095) Add data ui for envoyproxy Metricbeat Module (elastic#53476) [ML] persist the brush when expanded to full width (elastic#54020) Skip failing test (elastic#54100) [APM] Show errors on the timeline instead of under the transaction (elastic#53756) ... # Conflicts: # src/legacy/core_plugins/console/public/np_ready/application/contexts/services_context.tsx # src/legacy/core_plugins/console/public/np_ready/application/index.tsx
…/kibana into feature/console-saved-objects * 'feature/console-saved-objects' of github.com:jloleysens/kibana: (86 commits) [Uptime] Added date range filter into expanded list query (elastic#52609) [SIEM] Add react/display-name eslint rule (elastic#53107) [SIEM] Enable eslint prefer-template rule (elastic#53983) Elasticsearch snapshots automation (elastic#53706) [SIEM] Enable eslint react/no-children-prop (elastic#53985) [DOCS][Reporting] Adds info about using a custom reporting index (elastic#54052) Changing background color to align with EUI color (elastic#54060) Fix linting issues (elastic#54068) NP Migration: Move doc views registry and existing doc views into discover plugin (elastic#53465) [ML] DF Analytics job creation: Add 'excludes' input field to form (elastic#53856) EMT-issue-65: add endpoint list api (elastic#53861) [SIEM] Fix doubled drag handles in Timeline (elastic#52679) Functional tests: refactor visualize_page (elastic#53845) [Dashboard] Redesign empty screen in readonly mode (elastic#54073) [ML] Support search for partitions on Single Metric Viewer (elastic#53879) update apm index pattern (elastic#54095) Add data ui for envoyproxy Metricbeat Module (elastic#53476) [ML] persist the brush when expanded to full width (elastic#54020) Skip failing test (elastic#54100) [APM] Show errors on the timeline instead of under the transaction (elastic#53756) ...
Summary
This PR aim is to improve the developer's experience in writing functional tests. As described in #53117,
visualize_pageis one of those "heavy" PO: with 1.5k lines and ~200 functions, it is hard to search and determine suitable function.The idea is to split
visualize_pageinto smaller POs that represents different areas, remove duplicate functions, combine similar actions and convert it to TS:visualize_page: interactions on the landing page (open, save, create new viz)visualize_editor_page: interactions related to editor panelvisualize_chart_page: common interactions with chart viz and legendtile_map_page: tilemap viz specific interactionstag_cloud_page: tag cloud specific interactionsvega_chart_page: vega viz specific interactions