mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Dashboard] Use panel actions service for testing panels (#190102)
## Summary Pre-req for #182535. This refactors functional tests that interact with panel actions to use the `DashboardPanelActions` service instead of directly clicking the actions via test subjects. This will reduce the maintenance required to fix failing tests when we change the UX for the panel actions context menu. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
2f558b2497
commit
6738bdc12e
46 changed files with 329 additions and 477 deletions
|
@ -36,7 +36,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('redirects via save and return button after edit', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.visualize.saveVisualizationAndReturn();
|
||||
});
|
||||
|
@ -45,7 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const newTitle = 'wowee, looks like I have a new title';
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, {
|
||||
saveAsNew: false,
|
||||
|
@ -62,7 +60,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const newTitle = 'wowee, my title just got cooler';
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, {
|
||||
saveAsNew: true,
|
||||
|
@ -78,8 +75,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('loses originatingApp connection after save as when redirectToOrigin is false', async () => {
|
||||
const newTitle = 'wowee, my title just got cooler again';
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await dashboardPanelActions.editPanelByTitle('wowee, my title just got cooler');
|
||||
await PageObjects.visualize.linkedToOriginatingApp();
|
||||
await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, {
|
||||
saveAsNew: true,
|
||||
|
|
|
@ -34,7 +34,6 @@ export default function ({ getService, getPageObjects }) {
|
|||
};
|
||||
|
||||
const editMarkdownVis = async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visEditor.setMarkdownTxt(modifiedMarkdownText);
|
||||
|
@ -86,7 +85,6 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('cancel button returns to dashboard with no modal if there are no changes to apply', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
|
|
|
@ -268,7 +268,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await pieChart.expectPieSliceCount(5);
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await queryBar.setQuery('weightLbs:>50');
|
||||
await queryBar.submitQuery();
|
||||
|
@ -290,7 +289,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('Nested visualization filter pills filters data as expected', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await renderable.waitForRender();
|
||||
|
@ -305,7 +303,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('Removing filter pills and query unfiters data as expected', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await renderable.waitForRender();
|
||||
|
|
|
@ -69,7 +69,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('displays exit full screen logo button when panel is expanded', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
|
||||
const exists = await PageObjects.dashboard.exitFullScreenTextButtonExists();
|
||||
|
|
|
@ -35,7 +35,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('hides other panels', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
await retry.try(async () => {
|
||||
const panelCount = await PageObjects.dashboard.getPanelCount();
|
||||
|
@ -46,9 +45,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('shows other panels after being minimized', async () => {
|
||||
const panelCount = await PageObjects.dashboard.getPanelCount();
|
||||
// Panels are all minimized on a fresh open of a dashboard, so we need to re-expand in order to then minimize.
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
|
||||
// Add a retry to fix https://github.com/elastic/kibana/issues/14574. Perhaps the recent changes to this
|
||||
|
|
|
@ -100,9 +100,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await testSubjects.existOrFail('saveDashboardSuccess');
|
||||
|
||||
await PageObjects.dashboard.clickCancelOutOfEditMode();
|
||||
const panelOptions = await dashboardPanelActions.getPanelHeading(markdownTitle);
|
||||
await dashboardPanelActions.openContextMenu(panelOptions);
|
||||
await dashboardPanelActions.expectMissingEditPanelAction();
|
||||
await dashboardPanelActions.expectMissingEditPanelAction(markdownTitle);
|
||||
});
|
||||
|
||||
it('does not show the current dashboard in the dashboard picker', async () => {
|
||||
|
|
|
@ -76,7 +76,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
describe('visualization object edit menu', () => {
|
||||
it('opens a visualization when edit link is clicked', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const currentUrl = await browser.getCurrentUrl();
|
||||
|
@ -118,7 +117,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('opens a saved search when edit link is clicked', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const queryName = await PageObjects.discover.getCurrentQueryName();
|
||||
|
@ -147,7 +145,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
before('expand panel to "full screen"', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
});
|
||||
|
||||
|
|
|
@ -129,8 +129,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('data-shared-item title should update a saved search when using a custom panel title', async () => {
|
||||
await PageObjects.dashboard.switchToEditMode();
|
||||
const CUSTOM_SEARCH_TITLE = 'ima custom title for a search!';
|
||||
const el = await dashboardPanelActions.getPanelHeading('Rendering Test: saved search');
|
||||
await dashboardPanelActions.customizePanel(el);
|
||||
await dashboardPanelActions.customizePanelByTitle('Rendering Test: saved search');
|
||||
await dashboardCustomizePanel.expectCustomizePanelSettingsFlyoutOpen();
|
||||
await dashboardCustomizePanel.setCustomPanelTitle(CUSTOM_SEARCH_TITLE);
|
||||
await dashboardCustomizePanel.clickSaveButton();
|
||||
|
|
|
@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
|
|||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const dashboardAddPanel = getService('dashboardAddPanel');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const filterBar = getService('filterBar');
|
||||
const find = getService('find');
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
@ -77,17 +76,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
const actionExists = await testSubjects.exists(
|
||||
await dashboardPanelActions.clickContextMenuItem(
|
||||
'embeddablePanelAction-ACTION_VIEW_SAVED_SEARCH'
|
||||
);
|
||||
if (!actionExists) {
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
}
|
||||
const actionElement = await testSubjects.find(
|
||||
'embeddablePanelAction-ACTION_VIEW_SAVED_SEARCH'
|
||||
);
|
||||
await actionElement.click();
|
||||
|
||||
await PageObjects.discover.waitForDiscoverAppOnScreen();
|
||||
expect(await PageObjects.discover.getSavedSearchTitle()).to.equal(
|
||||
|
|
|
@ -63,7 +63,6 @@ export default function ({
|
|||
|
||||
await PageObjects.dashboard.saveDashboard('tsvb');
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
|
@ -85,7 +84,6 @@ export default function ({
|
|||
|
||||
await PageObjects.dashboard.saveDashboard('area');
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickExpandPanelToggle();
|
||||
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
|
|
|
@ -16,7 +16,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const kibanaServer = getService('kibanaServer');
|
||||
const retry = getService('retry');
|
||||
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions');
|
||||
const dashboardDrilldownsManage = getService('dashboardDrilldownsManage');
|
||||
|
||||
|
@ -53,8 +52,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('image embeddable should support drilldowns', async () => {
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction();
|
||||
await dashboardDrilldownPanelActions.clickCreateDrilldown();
|
||||
await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen();
|
||||
|
|
|
@ -139,7 +139,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboard.loadSavedDashboard('links 001');
|
||||
await dashboard.switchToEditMode();
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await dashboardLinks.expectPanelEditorFlyoutIsOpen();
|
||||
|
||||
|
@ -159,7 +158,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboard.loadSavedDashboard('links 001');
|
||||
await dashboard.switchToEditMode();
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await dashboardLinks.expectPanelEditorFlyoutIsOpen();
|
||||
|
||||
|
@ -178,7 +176,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboard.loadSavedDashboard('links 001');
|
||||
await dashboard.switchToEditMode();
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await dashboardLinks.expectPanelEditorFlyoutIsOpen();
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ const REMOVE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-deletePanel';
|
|||
const EDIT_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-editPanel';
|
||||
const INLINE_EDIT_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_CONFIGURE_IN_LENS';
|
||||
const EDIT_IN_LENS_EDITOR_DATA_TEST_SUBJ = 'navigateToLensEditorLink';
|
||||
const REPLACE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-replacePanel';
|
||||
const CLONE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-clonePanel';
|
||||
const TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-togglePanel';
|
||||
const CUSTOMIZE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_CUSTOMIZE_PANEL';
|
||||
|
@ -32,6 +31,7 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
private readonly log = this.ctx.getService('log');
|
||||
private readonly retry = this.ctx.getService('retry');
|
||||
private readonly browser = this.ctx.getService('browser');
|
||||
private readonly find = this.ctx.getService('find');
|
||||
private readonly inspector = this.ctx.getService('inspector');
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
|
||||
|
@ -62,6 +62,12 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
await toggleMenuItem.click(DASHBOARD_TOP_OFFSET);
|
||||
}
|
||||
|
||||
async toggleContextMenuByTitle(title = '') {
|
||||
this.log.debug(`toggleContextMenu(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.toggleContextMenu(header);
|
||||
}
|
||||
|
||||
async expectContextMenuToBeOpen() {
|
||||
this.log.debug('expectContextMenuToBeOpen');
|
||||
await this.testSubjects.existOrFail('embeddablePanelContextMenuOpen');
|
||||
|
@ -69,11 +75,19 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
|
||||
async openContextMenu(parent?: WebElementWrapper) {
|
||||
this.log.debug(`openContextMenu(${parent}`);
|
||||
await this.toggleContextMenu(parent);
|
||||
const open = await this.testSubjects.exists('embeddablePanelContextMenuOpen');
|
||||
if (!open) await this.toggleContextMenu(parent);
|
||||
await this.expectContextMenuToBeOpen();
|
||||
}
|
||||
|
||||
async openContextMenuByTitle(title = '') {
|
||||
this.log.debug(`openContextMenuByTitle(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.openContextMenu(header);
|
||||
}
|
||||
|
||||
async hasContextMenuMoreItem() {
|
||||
this.log.debug('hasContextMenuMoreItem');
|
||||
return await this.testSubjects.exists('embeddablePanelMore-mainMenu');
|
||||
}
|
||||
|
||||
|
@ -87,21 +101,30 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
}
|
||||
|
||||
async openContextMenuMorePanel(parent?: WebElementWrapper) {
|
||||
this.log.debug('openContextMenuMorePanel');
|
||||
await this.openContextMenu(parent);
|
||||
await this.clickContextMenuMoreItem();
|
||||
}
|
||||
|
||||
async clickContextMenuItem(itemSelector: string, parent?: WebElementWrapper) {
|
||||
async clickContextMenuItem(testSubject: string, parent?: WebElementWrapper) {
|
||||
this.log.debug(`clickContextMenuItem`);
|
||||
await this.openContextMenu(parent);
|
||||
const exists = await this.testSubjects.exists(itemSelector);
|
||||
const exists = await this.testSubjects.exists(testSubject);
|
||||
if (!exists) {
|
||||
await this.clickContextMenuMoreItem();
|
||||
}
|
||||
await this.testSubjects.click(itemSelector);
|
||||
await this.testSubjects.click(testSubject);
|
||||
}
|
||||
|
||||
async clickContextMenuItemByTitle(testSubject: string, title = '') {
|
||||
this.log.debug(`openContextMenuByTitle(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.clickContextMenuItem(testSubject, header);
|
||||
}
|
||||
|
||||
async navigateToEditorFromFlyout() {
|
||||
await this.testSubjects.clickWhenNotDisabledWithoutRetry(INLINE_EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
this.log.debug('navigateToEditorFromFlyout');
|
||||
await this.clickContextMenuItem(INLINE_EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
await this.testSubjects.click(EDIT_IN_LENS_EDITOR_DATA_TEST_SUBJ);
|
||||
const isConfirmModalVisible = await this.testSubjects.exists('confirmModalConfirmButton');
|
||||
|
@ -112,12 +135,7 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
|
||||
async clickInlineEdit() {
|
||||
this.log.debug('clickInlineEditAction');
|
||||
await this.expectContextMenuToBeOpen();
|
||||
const isInlineEditingActionVisible = await this.testSubjects.exists(
|
||||
INLINE_EDIT_PANEL_DATA_TEST_SUBJ
|
||||
);
|
||||
if (!isInlineEditingActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.clickWhenNotDisabledWithoutRetry(INLINE_EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
await this.clickContextMenuItem(INLINE_EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
await this.common.waitForTopNavToBeVisible();
|
||||
}
|
||||
|
@ -126,9 +144,9 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
* The dashboard/canvas panels can be either edited on their editor or inline.
|
||||
* The inline editing panels allow the navigation to the editor after the flyout opens
|
||||
*/
|
||||
async clickEdit() {
|
||||
async clickEdit(parent?: WebElementWrapper) {
|
||||
this.log.debug('clickEdit');
|
||||
await this.expectContextMenuToBeOpen();
|
||||
await this.openContextMenu(parent);
|
||||
const isActionVisible = await this.testSubjects.exists(EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
const isInlineEditingActionVisible = await this.testSubjects.exists(
|
||||
INLINE_EDIT_PANEL_DATA_TEST_SUBJ
|
||||
|
@ -149,40 +167,26 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
* The dashboard/canvas panels can be either edited on their editor or inline.
|
||||
* The inline editing panels allow the navigation to the editor after the flyout opens
|
||||
*/
|
||||
async editPanelByTitle(title?: string) {
|
||||
async editPanelByTitle(title = '') {
|
||||
this.log.debug(`editPanelByTitle(${title})`);
|
||||
if (title) {
|
||||
const panelOptions = await this.getPanelHeading(title);
|
||||
await this.openContextMenu(panelOptions);
|
||||
} else {
|
||||
await this.openContextMenu();
|
||||
}
|
||||
if (await this.testSubjects.exists(EDIT_PANEL_DATA_TEST_SUBJ)) {
|
||||
await this.testSubjects.clickWhenNotDisabledWithoutRetry(EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
} else {
|
||||
await this.navigateToEditorFromFlyout();
|
||||
}
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.clickEdit(header);
|
||||
}
|
||||
|
||||
async clickExpandPanelToggle() {
|
||||
this.log.debug(`clickExpandPanelToggle`);
|
||||
await this.expectContextMenuToBeOpen();
|
||||
const isActionVisible = await this.testSubjects.exists(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.click(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
|
||||
await this.openContextMenu();
|
||||
await this.clickContextMenuItem(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
async removePanel(parent?: WebElementWrapper) {
|
||||
this.log.debug('removePanel');
|
||||
await this.openContextMenu(parent);
|
||||
const isActionVisible = await this.testSubjects.exists(REMOVE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
const isPanelActionVisible = await this.testSubjects.exists(REMOVE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isPanelActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.click(REMOVE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.clickContextMenuItem(REMOVE_PANEL_DATA_TEST_SUBJ, parent);
|
||||
}
|
||||
|
||||
async removePanelByTitle(title: string) {
|
||||
async removePanelByTitle(title = '') {
|
||||
this.log.debug(`removePanel(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
this.log.debug('found header? ', Boolean(header));
|
||||
await this.removePanel(header);
|
||||
|
@ -190,62 +194,36 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
|
||||
async customizePanel(parent?: WebElementWrapper) {
|
||||
this.log.debug('customizePanel');
|
||||
await this.openContextMenu(parent);
|
||||
const isActionVisible = await this.testSubjects.exists(CUSTOMIZE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
const isPanelActionVisible = await this.testSubjects.exists(CUSTOMIZE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isPanelActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.click(CUSTOMIZE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.clickContextMenuItem(CUSTOMIZE_PANEL_DATA_TEST_SUBJ, parent);
|
||||
}
|
||||
|
||||
async replacePanelByTitle(title?: string) {
|
||||
this.log.debug(`replacePanel(${title})`);
|
||||
if (title) {
|
||||
const panelOptions = await this.getPanelHeading(title);
|
||||
await this.openContextMenu(panelOptions);
|
||||
} else {
|
||||
await this.openContextMenu();
|
||||
}
|
||||
const actionExists = await this.testSubjects.exists(REPLACE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!actionExists) {
|
||||
await this.clickContextMenuMoreItem();
|
||||
}
|
||||
await this.testSubjects.click(REPLACE_PANEL_DATA_TEST_SUBJ);
|
||||
async customizePanelByTitle(title = '') {
|
||||
this.log.debug('customizePanel');
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.clickContextMenuItem(CUSTOMIZE_PANEL_DATA_TEST_SUBJ, header);
|
||||
}
|
||||
|
||||
async clonePanelByTitle(title?: string) {
|
||||
async clonePanelByTitle(title = '') {
|
||||
this.log.debug(`clonePanel(${title})`);
|
||||
if (title) {
|
||||
const panelOptions = await this.getPanelHeading(title);
|
||||
await this.openContextMenu(panelOptions);
|
||||
} else {
|
||||
await this.openContextMenu();
|
||||
}
|
||||
const isActionVisible = await this.testSubjects.exists(CLONE_PANEL_DATA_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.click(CLONE_PANEL_DATA_TEST_SUBJ);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.clickContextMenuItem(CLONE_PANEL_DATA_TEST_SUBJ, header);
|
||||
await this.dashboard.waitForRenderComplete();
|
||||
}
|
||||
|
||||
async openCopyToModalByTitle(title?: string) {
|
||||
async openCopyToModalByTitle(title = '') {
|
||||
this.log.debug(`copyPanelTo(${title})`);
|
||||
if (title) {
|
||||
const panelOptions = await this.getPanelHeading(title);
|
||||
await this.openContextMenu(panelOptions);
|
||||
} else {
|
||||
await this.openContextMenu();
|
||||
}
|
||||
const isActionVisible = await this.testSubjects.exists(COPY_PANEL_TO_DATA_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.click(COPY_PANEL_TO_DATA_TEST_SUBJ);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.clickContextMenuItem(COPY_PANEL_TO_DATA_TEST_SUBJ, header);
|
||||
}
|
||||
|
||||
async openInspectorByTitle(title: string) {
|
||||
this.log.debug(`openInspector(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
await this.openInspector(header);
|
||||
}
|
||||
|
||||
async getSearchSessionIdByTitle(title: string) {
|
||||
this.log.debug(`getSearchSessionId(${title})`);
|
||||
await this.openInspectorByTitle(title);
|
||||
await this.inspector.openInspectorRequestsView();
|
||||
const searchSessionId = await (
|
||||
|
@ -256,6 +234,7 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
}
|
||||
|
||||
async getSearchResponseByTitle(title: string) {
|
||||
this.log.debug(`setSearchResponse(${title})`);
|
||||
await this.openInspectorByTitle(title);
|
||||
await this.inspector.openInspectorRequestsView();
|
||||
const response = await this.inspector.getResponse();
|
||||
|
@ -264,6 +243,7 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
}
|
||||
|
||||
async openInspector(parent?: WebElementWrapper) {
|
||||
this.log.debug(`openInspector`);
|
||||
await this.clickContextMenuItem(OPEN_INSPECTOR_TEST_SUBJ, parent);
|
||||
}
|
||||
|
||||
|
@ -311,12 +291,11 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
});
|
||||
}
|
||||
|
||||
async expectExistsPanelAction(testSubject: string, title?: string) {
|
||||
this.log.debug('expectExistsPanelAction', testSubject);
|
||||
async expectExistsPanelAction(testSubject: string, title = '') {
|
||||
this.log.debug('expectExistsPanelAction', testSubject, title);
|
||||
|
||||
const panelWrapper = title ? await this.getPanelHeading(title) : undefined;
|
||||
await this.openContextMenu(panelWrapper);
|
||||
|
||||
if (!(await this.testSubjects.exists(testSubject))) {
|
||||
if (await this.hasContextMenuMoreItem()) {
|
||||
await this.clickContextMenuMoreItem();
|
||||
|
@ -326,12 +305,12 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
await this.toggleContextMenu(panelWrapper);
|
||||
}
|
||||
|
||||
async expectExistsRemovePanelAction() {
|
||||
async expectExistsRemovePanelAction(title = '') {
|
||||
this.log.debug('expectExistsRemovePanelAction');
|
||||
await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async expectExistsEditPanelAction(title?: string, allowsInlineEditing?: boolean) {
|
||||
async expectExistsEditPanelAction(title = '', allowsInlineEditing?: boolean) {
|
||||
this.log.debug('expectExistsEditPanelAction');
|
||||
let testSubj = EDIT_PANEL_DATA_TEST_SUBJ;
|
||||
if (allowsInlineEditing) {
|
||||
|
@ -340,43 +319,45 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
await this.expectExistsPanelAction(testSubj, title);
|
||||
}
|
||||
|
||||
async expectExistsClonePanelAction() {
|
||||
async expectExistsClonePanelAction(title = '') {
|
||||
this.log.debug('expectExistsClonePanelAction');
|
||||
await this.expectExistsPanelAction(CLONE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectExistsPanelAction(CLONE_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async expectExistsToggleExpandAction() {
|
||||
async expectExistsToggleExpandAction(title = '') {
|
||||
this.log.debug('expectExistsToggleExpandAction');
|
||||
await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async expectMissingPanelAction(testSubject: string) {
|
||||
this.log.debug('expectMissingPanelAction', testSubject);
|
||||
await this.openContextMenu();
|
||||
async expectMissingPanelAction(testSubject: string, title = '') {
|
||||
this.log.debug('expectMissingPanelAction', testSubject, title);
|
||||
await this.openContextMenuByTitle(title);
|
||||
await this.testSubjects.missingOrFail(testSubject);
|
||||
if (await this.hasContextMenuMoreItem()) {
|
||||
await this.clickContextMenuMoreItem();
|
||||
await this.testSubjects.missingOrFail(testSubject);
|
||||
}
|
||||
await this.toggleContextMenu();
|
||||
await this.toggleContextMenuByTitle(title);
|
||||
}
|
||||
|
||||
async expectMissingEditPanelAction() {
|
||||
async expectMissingEditPanelAction(title = '') {
|
||||
this.log.debug('expectMissingEditPanelAction');
|
||||
await this.expectMissingPanelAction(EDIT_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectMissingPanelAction(EDIT_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async expectMissingDuplicatePanelAction() {
|
||||
async expectMissingDuplicatePanelAction(title = '') {
|
||||
this.log.debug('expectMissingDuplicatePanelAction');
|
||||
await this.expectMissingPanelAction(CLONE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectMissingPanelAction(CLONE_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async expectMissingRemovePanelAction() {
|
||||
async expectMissingRemovePanelAction(title = '') {
|
||||
this.log.debug('expectMissingRemovePanelAction');
|
||||
await this.expectMissingPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ);
|
||||
await this.expectMissingPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ, title);
|
||||
}
|
||||
|
||||
async getPanelHeading(title: string) {
|
||||
async getPanelHeading(title = '') {
|
||||
this.log.debug(`getPanelHeading(${title})`);
|
||||
if (!title) return await this.find.byClassName('embPanel__header');
|
||||
return await this.testSubjects.find(`embeddablePanelHeading-${title.replace(/\s/g, '')}`);
|
||||
}
|
||||
|
||||
|
@ -399,11 +380,15 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
await this.openContextMenu(parent);
|
||||
const isActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ);
|
||||
if (!isActionVisible) await this.clickContextMenuMoreItem();
|
||||
const isPanelActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ);
|
||||
if (!isPanelActionVisible) await this.clickContextMenuMoreItem();
|
||||
return await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ, { timeout: 500 });
|
||||
}
|
||||
|
||||
async canConvertToLensByTitle(title = '') {
|
||||
this.log.debug(`canConvertToLens(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
return await this.canConvertToLens(header);
|
||||
}
|
||||
|
||||
async convertToLens(parent?: WebElementWrapper) {
|
||||
this.log.debug('convertToLens');
|
||||
|
||||
|
@ -415,4 +400,10 @@ export class DashboardPanelActionsService extends FtrService {
|
|||
await this.testSubjects.click(CONVERT_TO_LENS_TEST_SUBJ);
|
||||
});
|
||||
}
|
||||
|
||||
async convertToLensByTitle(title = '') {
|
||||
this.log.debug(`convertToLens(${title})`);
|
||||
const header = await this.getPanelHeading(title);
|
||||
return await this.convertToLens(header);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,31 +15,44 @@ const MANAGE_DRILLDOWNS_DATA_TEST_SUBJ = 'embeddablePanelAction-OPEN_FLYOUT_EDIT
|
|||
export function DashboardDrilldownPanelActionsProvider({ getService }: FtrProviderContext) {
|
||||
const log = getService('log');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
return new (class DashboardDrilldownPanelActions {
|
||||
async expectExistsCreateDrilldownAction() {
|
||||
log.debug('expectExistsCreateDrilldownAction');
|
||||
await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ);
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.expectContextMenuToBeOpen();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
async expectMissingCreateDrilldownAction() {
|
||||
log.debug('expectMissingCreateDrilldownAction');
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.expectContextMenuToBeOpen();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.existOrFail(MANAGE_DRILLDOWNS_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
async clickCreateDrilldown() {
|
||||
log.debug('clickCreateDrilldown');
|
||||
await this.expectExistsCreateDrilldownAction();
|
||||
await testSubjects.clickWhenNotDisabledWithoutRetry(CREATE_DRILLDOWN_DATA_TEST_SUBJ);
|
||||
await dashboardPanelActions.clickContextMenuItem(CREATE_DRILLDOWN_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
async expectExistsManageDrilldownsAction() {
|
||||
log.debug('expectExistsCreateDrilldownAction');
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.expectContextMenuToBeOpen();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
async expectMissingManageDrilldownsAction() {
|
||||
log.debug('expectExistsRemovePanelAction');
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.expectContextMenuToBeOpen();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.existOrFail(MANAGE_DRILLDOWNS_DATA_TEST_SUBJ);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ const DRILLDOWN_TO_AREA_CHART_NAME = 'Go to area chart dashboard';
|
|||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions');
|
||||
const dashboardDrilldownsManage = getService('dashboardDrilldownsManage');
|
||||
const PageObjects = getPageObjects([
|
||||
|
@ -45,9 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await toasts.dismissAll(); // toasts get in the way of bottom "Create drilldown" button in flyout
|
||||
|
||||
// create drilldown
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction();
|
||||
await dashboardDrilldownPanelActions.clickCreateDrilldown();
|
||||
await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen();
|
||||
await testSubjects.click('actionFactoryItem-DASHBOARD_TO_DASHBOARD_DRILLDOWN');
|
||||
|
@ -277,8 +273,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('delete dashboard to dashboard drilldown', async () => {
|
||||
// delete drilldown
|
||||
await PageObjects.dashboard.switchToEditMode();
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await dashboardDrilldownPanelActions.expectExistsManageDrilldownsAction();
|
||||
await dashboardDrilldownPanelActions.clickManageDrilldowns();
|
||||
await dashboardDrilldownsManage.expectsManageDrilldownsFlyoutOpen();
|
||||
|
|
|
@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../../../ftr_provider_context';
|
|||
const DRILLDOWN_TO_DISCOVER_URL = 'Go to discover';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions');
|
||||
const dashboardDrilldownsManage = getService('dashboardDrilldownsManage');
|
||||
const PageObjects = getPageObjects(['dashboard', 'common', 'header', 'timePicker', 'discover']);
|
||||
|
@ -32,8 +31,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
);
|
||||
|
||||
// create drilldown
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction();
|
||||
await dashboardDrilldownPanelActions.clickCreateDrilldown();
|
||||
await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen();
|
||||
|
|
|
@ -52,13 +52,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
};
|
||||
|
||||
const clickDownloadCsv = async () => {
|
||||
log.debug('click "More"');
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
|
||||
const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport';
|
||||
await testSubjects.existOrFail(actionItemTestSubj); // wait for the full panel to display or else the test runner could click the wrong option!
|
||||
log.debug('click "Generate CSV"');
|
||||
await testSubjects.click(actionItemTestSubj);
|
||||
await dashboardPanelActions.clickContextMenuItem('embeddablePanelAction-generateCsvReport');
|
||||
await testSubjects.existOrFail('csvReportStarted'); // validate toast panel
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
]);
|
||||
const elasticChart = getService('elasticChart');
|
||||
const monacoEditor = getService('monacoEditor');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
const defaultSettings = {
|
||||
enableESQL: true,
|
||||
|
@ -232,8 +233,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await testSubjects.existOrFail('embeddablePanelHeading-TextBasedChart');
|
||||
await elasticChart.setNewChartUiDebugFlag(true);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS');
|
||||
await dashboardPanelActions.clickInlineEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
expect(await PageObjects.lens.canRemoveDimension('lnsXY_xDimensionPanel')).to.equal(true);
|
||||
await PageObjects.lens.removeDimension('lnsXY_xDimensionPanel');
|
||||
|
@ -261,8 +261,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await elasticChart.setNewChartUiDebugFlag(true);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// open the inline editing flyout
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS');
|
||||
await dashboardPanelActions.clickInlineEdit();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
// change the query
|
||||
|
|
|
@ -28,6 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const browser = getService('browser');
|
||||
const dataViews = getService('dataViews');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
const expectedData = [
|
||||
{ x: '97.220.3.248', y: 19755 },
|
||||
|
@ -55,9 +56,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
}
|
||||
|
||||
const checkDiscoverNavigationResult = async () => {
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER');
|
||||
await dashboardPanelActions.clickContextMenuItem(
|
||||
'embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'
|
||||
);
|
||||
|
||||
const [, discoverHandle] = await browser.getAllWindowHandles();
|
||||
await browser.switchToWindow(discoverHandle);
|
||||
|
|
|
@ -183,9 +183,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboardAddPanel.closeAddPanel();
|
||||
|
||||
await retry.try(async () => {
|
||||
await panelActions.openContextMenu();
|
||||
await panelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.existOrFail(ACTION_TEST_SUBJ);
|
||||
await panelActions.expectExistsPanelAction(ACTION_TEST_SUBJ);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -225,9 +223,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
await PageObjects.lens.saveAndReturn();
|
||||
|
||||
await panelActions.openContextMenu();
|
||||
await panelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.click('embeddablePanelAction-openInspector');
|
||||
await panelActions.openInspector();
|
||||
await inspector.openInspectorRequestsView();
|
||||
const requests = await inspector.getRequestNames();
|
||||
expect(requests.split(',').length).to.be(2);
|
||||
|
@ -337,8 +333,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
await PageObjects.lens.save('test', true);
|
||||
// Edit the visualization now and get back to Lens editor
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS');
|
||||
await panelActions.clickInlineEdit();
|
||||
await testSubjects.click('navigateToLensEditorLink');
|
||||
// Click on Share, then Copy link and paste the link in a new tab.
|
||||
const url = await PageObjects.lens.getUrl();
|
||||
|
|
|
@ -8,6 +8,8 @@ import expect from '@kbn/expect';
|
|||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
const OPEN_IN_DISCOVER_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_OPEN_IN_DISCOVER';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects([
|
||||
'visualize',
|
||||
|
@ -40,9 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
exitFromEditMode: true,
|
||||
});
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER');
|
||||
await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ);
|
||||
|
||||
const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles();
|
||||
await browser.switchToWindow(discoverWindowHandle);
|
||||
|
@ -73,9 +73,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
exitFromEditMode: true,
|
||||
});
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER');
|
||||
await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ);
|
||||
|
||||
const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles();
|
||||
await browser.switchToWindow(discoverWindowHandle);
|
||||
|
@ -118,14 +116,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.dashboard.clickQuickSave();
|
||||
|
||||
// make sure Open in Discover is also available in edit mode
|
||||
await dashboardPanelActions.openContextMenuMorePanel();
|
||||
await testSubjects.existOrFail('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER');
|
||||
|
||||
await dashboardPanelActions.expectExistsPanelAction(OPEN_IN_DISCOVER_DATA_TEST_SUBJ);
|
||||
await PageObjects.dashboard.clickCancelOutOfEditMode();
|
||||
|
||||
await dashboardPanelActions.openContextMenu();
|
||||
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER');
|
||||
await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ);
|
||||
|
||||
const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles();
|
||||
await browser.switchToWindow(discoverWindowHandle);
|
||||
|
|
|
@ -113,7 +113,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await testSubjects.find('emptyPlaceholder');
|
||||
|
||||
await PageObjects.dashboard.switchToEditMode();
|
||||
await dashboardPanelActions.editPanelByTitle();
|
||||
await dashboardPanelActions.clickEdit();
|
||||
await PageObjects.timePicker.waitForNoDataPopover();
|
||||
await PageObjects.timePicker.ensureHiddenNoDataPopover();
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
export default function ({ getPageObjects }: FtrProviderContext) {
|
||||
const { visualize, lens, visChart, timePicker, visEditor } = getPageObjects([
|
||||
'visualize',
|
||||
'lens',
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
const FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ = 'embeddablePanelAction-FILTER_BY_MAP_EXTENT';
|
||||
|
||||
export default function ({ getPageObjects, getService }) {
|
||||
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'lens', 'maps']);
|
||||
|
||||
|
@ -34,9 +36,10 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should filter dashboard by map extent when "filter by map extent" is enabled', async () => {
|
||||
const mapPanelHeader = await dashboardPanelActions.getPanelHeading('document example');
|
||||
await dashboardPanelActions.openContextMenuMorePanel(mapPanelHeader);
|
||||
await testSubjects.click('embeddablePanelAction-FILTER_BY_MAP_EXTENT');
|
||||
await dashboardPanelActions.clickContextMenuItemByTitle(
|
||||
FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ,
|
||||
'document example'
|
||||
);
|
||||
await testSubjects.setEuiSwitch(
|
||||
'filterByMapExtentSwitch24ade730-afe4-42b6-919a-c4e0a98c94f2',
|
||||
'check'
|
||||
|
@ -54,9 +57,11 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should remove map extent filter dashboard when "filter by map extent" is disabled', async () => {
|
||||
const mapPanelHeader = await dashboardPanelActions.getPanelHeading('document example');
|
||||
await dashboardPanelActions.openContextMenuMorePanel(mapPanelHeader);
|
||||
await testSubjects.click('embeddablePanelAction-FILTER_BY_MAP_EXTENT');
|
||||
await dashboardPanelActions.clickContextMenuItemByTitle(
|
||||
FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ,
|
||||
'document example'
|
||||
);
|
||||
|
||||
await testSubjects.setEuiSwitch(
|
||||
'filterByMapExtentSwitch24ade730-afe4-42b6-919a-c4e0a98c94f2',
|
||||
'uncheck'
|
||||
|
|
|
@ -9,7 +9,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
|
|||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const ml = getService('ml');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const browser = getService('browser');
|
||||
const PageObjects = getPageObjects(['common', 'timePicker', 'dashboard']);
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
@ -31,9 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await ml.dashboardEmbeddables.assertDashboardPanelExists(selectedPanelTitle);
|
||||
|
||||
await setFarequoteTimerange();
|
||||
|
||||
const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle);
|
||||
await dashboardPanelActions.openContextMenuMorePanel(header);
|
||||
}
|
||||
|
||||
describe('create jobs from lens', function () {
|
||||
|
@ -70,7 +66,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
@ -102,7 +98,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await setFarequoteTimerange();
|
||||
|
||||
const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle);
|
||||
await dashboardPanelActions.openContextMenuMorePanel(header);
|
||||
await dashboardPanelActions.openContextMenuByTitle(selectedPanelTitle);
|
||||
}
|
||||
|
||||
async function createJobInWizard(
|
||||
|
@ -129,7 +128,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
@ -154,7 +153,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
@ -179,7 +178,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
@ -202,7 +201,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
@ -216,7 +215,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
ml.lensVisualizations.assertMLJobMenuActionDoesNotExist();
|
||||
ml.lensVisualizations.assertMLJobMenuActionDoesNotExist(selectedPanelTitle);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,8 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.dashboard.loadSavedDashboard(dashboardTitle);
|
||||
await ml.dashboardEmbeddables.assertDashboardPanelExists(selectedPanelTitle);
|
||||
|
||||
const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle);
|
||||
await dashboardPanelActions.openContextMenuMorePanel(header);
|
||||
await dashboardPanelActions.openContextMenuByTitle(selectedPanelTitle);
|
||||
}
|
||||
|
||||
describe('create jobs from dashboard map', function () {
|
||||
|
@ -62,7 +61,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
await dashboardPreparation(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction();
|
||||
await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle);
|
||||
|
||||
await ml.lensVisualizations.assertLayerSelectorExists();
|
||||
|
||||
|
|
|
@ -14,10 +14,14 @@ export function MachineLearningLensVisualizationsProvider(
|
|||
mlCommonUI: MlCommonUI
|
||||
) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
return {
|
||||
async clickCreateMLJobMenuAction() {
|
||||
await testSubjects.click('embeddablePanelAction-create-ml-ad-job-action');
|
||||
async clickCreateMLJobMenuAction(title = '') {
|
||||
await dashboardPanelActions.clickContextMenuItemByTitle(
|
||||
'embeddablePanelAction-create-ml-ad-job-action',
|
||||
title
|
||||
);
|
||||
},
|
||||
async clickCreateJob(layerIndex: number) {
|
||||
await testSubjects.clickWhenNotDisabledWithoutRetry(
|
||||
|
@ -30,8 +34,11 @@ export function MachineLearningLensVisualizationsProvider(
|
|||
async assertLayerSelectorExists() {
|
||||
await testSubjects.existOrFail('mlFlyoutLayerSelector');
|
||||
},
|
||||
async assertMLJobMenuActionDoesNotExist() {
|
||||
await testSubjects.missingOrFail('embeddablePanelAction-create-ml-ad-job-action');
|
||||
async assertMLJobMenuActionDoesNotExist(title = '') {
|
||||
await dashboardPanelActions.expectMissingPanelAction(
|
||||
'embeddablePanelAction-create-ml-ad-job-action',
|
||||
title
|
||||
);
|
||||
},
|
||||
async assertNumberOfCompatibleLensLayers(numberOfCompatibleLayers: number) {
|
||||
const compatibleLayers = await testSubjects.findAll('mlLensLayerCompatible');
|
||||
|
|
|
@ -23,6 +23,8 @@ import {
|
|||
} from '../../../../cases_api_integration/common/lib/api';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
const ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase';
|
||||
|
||||
const createLogStashDataView = async (
|
||||
supertest: SuperTest.Agent
|
||||
): Promise<{ data_view: { id: string } }> => {
|
||||
|
@ -63,6 +65,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const listingTable = getService('listingTable');
|
||||
const toasts = getService('toasts');
|
||||
const browser = getService('browser');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
const createAttachmentAndNavigate = async (attachment: AttachmentRequest) => {
|
||||
const caseData = await cases.api.createCase({
|
||||
|
@ -400,10 +403,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
await common.navigateToApp('dashboard');
|
||||
await dashboard.preserveCrossAppState();
|
||||
await dashboard.loadSavedDashboard(myDashboardName);
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ);
|
||||
await testSubjects.click('cases-table-add-case-filter-bar');
|
||||
|
||||
await cases.create.createCase({
|
||||
|
@ -435,9 +435,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
await dashboard.preserveCrossAppState();
|
||||
await dashboard.loadSavedDashboard(myDashboardName);
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ);
|
||||
|
||||
await testSubjects.click(`cases-table-row-select-${theCase.id}`);
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ import expect from '@kbn/expect';
|
|||
import { createScenarios as createAPIScenarios } from '../../reporting_api_integration/services/scenarios';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
const GENERATE_CSV_DATA_TEST_SUBJ = 'embeddablePanelAction-generateCsvReport';
|
||||
|
||||
export function createScenarios(
|
||||
context: Pick<FtrProviderContext, 'getPageObjects' | 'getService'>
|
||||
) {
|
||||
|
@ -74,35 +76,27 @@ export function createScenarios(
|
|||
await PageObjects.canvas.loadFirstWorkpad(title);
|
||||
};
|
||||
|
||||
const getSavedSearchPanel = async (savedSearchTitle: string) => {
|
||||
return await testSubjects.find(`embeddablePanelHeading-${savedSearchTitle.replace(' ', '')}`);
|
||||
};
|
||||
const tryDashboardGenerateCsvFail = async (savedSearchTitle: string) => {
|
||||
const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle);
|
||||
await dashboardPanelActions.toggleContextMenu(savedSearchPanel);
|
||||
const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport';
|
||||
|
||||
if (!(await testSubjects.exists(actionItemTestSubj))) {
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
}
|
||||
|
||||
await testSubjects.click(actionItemTestSubj);
|
||||
await dashboardPanelActions.clickContextMenuItemByTitle(
|
||||
GENERATE_CSV_DATA_TEST_SUBJ,
|
||||
savedSearchTitle
|
||||
);
|
||||
await testSubjects.existOrFail('generateCsvFail');
|
||||
};
|
||||
const tryDashboardGenerateCsvNotAvailable = async (savedSearchTitle: string) => {
|
||||
const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle);
|
||||
await dashboardPanelActions.toggleContextMenu(savedSearchPanel);
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
await testSubjects.missingOrFail('embeddablePanelAction-generateCsvReport');
|
||||
await dashboardPanelActions.expectMissingPanelAction(
|
||||
GENERATE_CSV_DATA_TEST_SUBJ,
|
||||
savedSearchTitle
|
||||
);
|
||||
};
|
||||
const tryDashboardGenerateCsvSuccess = async (savedSearchTitle: string) => {
|
||||
const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle);
|
||||
await dashboardPanelActions.toggleContextMenu(savedSearchPanel);
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport';
|
||||
await testSubjects.existOrFail(actionItemTestSubj);
|
||||
/* wait for the full panel to display or else the test runner could click the wrong option! */ await testSubjects.click(
|
||||
actionItemTestSubj
|
||||
await dashboardPanelActions.expectExistsPanelAction(
|
||||
GENERATE_CSV_DATA_TEST_SUBJ,
|
||||
savedSearchTitle
|
||||
);
|
||||
await dashboardPanelActions.clickContextMenuItemByTitle(
|
||||
GENERATE_CSV_DATA_TEST_SUBJ,
|
||||
savedSearchTitle
|
||||
);
|
||||
await testSubjects.existOrFail('csvReportStarted'); /* validate toast panel */
|
||||
};
|
||||
|
|
|
@ -69,13 +69,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not convert aggregation with not supported field type', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Unsupported field type');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Gauge - Unsupported field type')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Color ranges');
|
||||
await lens.waitForVisualization('gaugeChart');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
|
|
@ -40,13 +40,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Goal - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Goal - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert to Lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Goal - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Goal - Basic');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
const data = await lens.getMetricVisualizationData();
|
||||
expect(data.length).to.be.equal(1);
|
||||
|
@ -65,8 +63,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert aggregation with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Goal - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Goal - Agg with params');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -93,8 +90,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert sibling pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Goal - Sibling pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Goal - Sibling pipeline agg');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -122,8 +118,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Goal - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Goal - Color ranges');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
|
|
@ -39,18 +39,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item if no X-axis was specified', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - With Y-Axis only');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Heatmap - With Y-Axis only')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - With X-Axis only');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Heatmap - With X-Axis only')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert to Lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - With X-Axis only');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Heatmap - With X-Axis only');
|
||||
await lens.waitForVisualization('heatmapChart');
|
||||
await lens.enableEchDebugState();
|
||||
const debugState = await lens.getCurrentChartDebugState('heatmapChart');
|
||||
|
@ -83,8 +80,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert to Lens if Y-axis is defined, but X-axis is not', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - With Y-Axis only');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Heatmap - With Y-Axis only');
|
||||
await lens.waitForVisualization('heatmapChart');
|
||||
await lens.enableEchDebugState();
|
||||
const debugState = await lens.getCurrentChartDebugState('heatmapChart');
|
||||
|
@ -98,8 +94,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should respect heatmap colors number', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - Color number');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Heatmap - Color number');
|
||||
await lens.waitForVisualization('heatmapChart');
|
||||
await lens.enableEchDebugState();
|
||||
const debugState = await lens.getCurrentChartDebugState('heatmapChart');
|
||||
|
@ -118,8 +113,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show respect heatmap custom color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Heatmap - Custom Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Heatmap - Custom Color ranges');
|
||||
await lens.waitForVisualization('heatmapChart');
|
||||
await lens.enableEchDebugState();
|
||||
const debugState = await lens.getCurrentChartDebugState('heatmapChart');
|
||||
|
|
|
@ -40,8 +40,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert to Lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Basic');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
const data = await lens.getMetricVisualizationData();
|
||||
|
@ -61,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert aggregation with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Agg with params');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -88,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert sibling pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Sibling pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Sibling pipeline agg');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -116,13 +113,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not convert aggregation with not supported field type', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Unsupported field type');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Metric - Unsupported field type')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Color ranges');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
|
|
@ -41,23 +41,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should hide the "Convert to Lens" menu item if no split slices were defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - No split slices');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Pie - No split slices')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should hide the "Convert to Lens" menu item if more than 3 split slices were defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - 4 layers');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Pie - 4 layers')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - 1 Split slice');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Pie - 1 Split slice')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert aggregation with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Pie - Agg with params');
|
||||
await lens.waitForVisualization('partitionVisChart');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -74,8 +70,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
it('should convert terms to slice by', async () => {
|
||||
const expectedTableData = ['ios', 'osx', 'win 7', 'win 8', 'win xp'];
|
||||
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - Basic count');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Pie - Basic count');
|
||||
await lens.waitForVisualization('partitionVisChart');
|
||||
await lens.enableEchDebugState();
|
||||
|
||||
|
@ -91,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert Donut type correctly', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - Basic count');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Pie - Basic count');
|
||||
await lens.waitForVisualization('partitionVisChart');
|
||||
|
||||
const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover');
|
||||
|
@ -101,8 +95,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert Pie types correctly', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Pie - Non Donut');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Pie - Non Donut');
|
||||
await lens.waitForVisualization('partitionVisChart');
|
||||
|
||||
const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover');
|
||||
|
|
|
@ -41,18 +41,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not allow converting of unsupported aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Unsupported Agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Unsupported Agg')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Agg with params');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Agg with params')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert aggregation with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Agg with params');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -63,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert total function to summary row', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Summary row');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Summary row');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -80,8 +76,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert sibling pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Sibling pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Sibling pipeline agg');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -96,8 +91,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert parent pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Parent pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Parent pipeline agg');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -112,8 +106,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert split rows and split table to split table rows', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Split rows and tables');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Split rows and tables');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -130,8 +123,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert percentage column', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Percentage Column');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Percentage Column');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
|
|
@ -41,38 +41,35 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not allow converting if dot size aggregation is defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Dot size metric');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('XY - Dot size metric')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting if split chart is defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Split chart');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('XY - Split chart')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting if more than one axis left/right/top/bottom are defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Multiple Y Axes');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('XY - Multiple Y Axes')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting if several split series are defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Multiple Split Series');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('XY - Multiple Split Series')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting if sibling pipeline agg and split series are defined', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Sibling pipeline agg w/ split');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(
|
||||
await panelActions.canConvertToLensByTitle('XY - Sibling pipeline agg w/ split')
|
||||
).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting of unsupported aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Unsupported Agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('XY - Unsupported Agg')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should convert in different layers if metrics have different chart types', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Differing Layers');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Differing Layers');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -89,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert in one layer if metrics have the same chart type', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Similar Layers');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Similar Layers');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -106,8 +102,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert parent pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Parent pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Parent pipeline agg');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -120,8 +115,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert sibling pipeline aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Sibling pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Sibling pipeline agg');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -138,8 +132,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should draw a reference line', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Reference line');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Reference line');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -156,8 +149,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert line stacked to area stacked chart', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Stacked lines');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Stacked lines');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -169,8 +161,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert percentage charts', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Percentage chart');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Percentage chart');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -182,8 +173,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert horizontal bar', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Horizontal Bar');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Horizontal Bar');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -195,8 +185,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert y-axis positions', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Axis positions');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Axis positions');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -217,8 +206,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert split series', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - Split Series');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - Split Series');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
const expectedData = ['win 8', 'win xp', 'win 7', 'ios', 'osx'];
|
||||
|
@ -237,8 +225,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert x-axis', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('XY - X Axis');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('XY - X Axis');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
const expectedData = ['Count'];
|
||||
|
|
|
@ -54,8 +54,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await dashboard.waitForRenderComplete();
|
||||
await dashboardBadgeActions.expectExistsTimeRangeBadgeAction();
|
||||
|
||||
const visPanel = await panelActions.getPanelHeading('My TSVB to Lens viz 1');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('My TSVB to Lens viz 1');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -93,8 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await dashboard.waitForRenderComplete();
|
||||
await dashboardBadgeActions.expectExistsTimeRangeBadgeAction();
|
||||
|
||||
const visPanel = await panelActions.getPanelHeading('My TSVB to Lens viz 2');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('My TSVB to Lens viz 2');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
|
|
@ -36,13 +36,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Gauge - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert to Lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Basic');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
const metricData = await lens.getMetricVisualizationData();
|
||||
|
@ -50,8 +48,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert metric with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Value count');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Value count');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
await retry.try(async () => {
|
||||
const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`);
|
||||
|
@ -65,18 +62,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not allow converting of unsupported metric', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Unsupported metric');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Gauge - Unsupported metric')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting of invalid panel', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Invalid panel');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Gauge - Invalid panel')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Color ranges');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -106,15 +102,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should bring the ignore global filters configured at series level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Ignore global filters series');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Ignore global filters series');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
||||
it('should bring the ignore global filters configured at panel level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Gauge - Ignore global filters panel');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Gauge - Ignore global filters panel');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
|
|
@ -35,13 +35,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Metric - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should convert to Lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Basic');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
const metricData = await lens.getMetricVisualizationData();
|
||||
|
@ -49,8 +47,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should draw static value', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Static value');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Static value');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -63,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert metric agg with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Agg with params');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -77,18 +73,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not allow converting of unsupported metric', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Unsupported metric');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Metric - Unsupported metric')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting of invalid panel', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Invalid panel');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Metric - Invalid panel')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Color ranges');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -116,16 +111,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should bring the ignore global filters configured at series level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Ignore global filters series');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Ignore global filters series');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
||||
it('should bring the ignore global filters configured at panel level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Metric - Ignore global filters panel');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Metric - Ignore global filters panel');
|
||||
await lens.waitForVisualization('mtrVis');
|
||||
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
|
|
|
@ -42,43 +42,41 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should allow converting a count aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should not allow converting of not valid panel', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Invalid panel');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Invalid panel')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting of unsupported aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Unsupported agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Unsupported agg')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting sibling pipeline aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Sibling pipeline agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Sibling pipeline agg')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting parent pipeline aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Parent pipeline agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Parent pipeline agg')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting invalid aggregation function', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Invalid agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Invalid agg')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting series with different aggregation function or aggregation by', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Different agg function');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Table - Different agg function')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should convert last value mode to reduced time range', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Last value mode');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Last value mode');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
await lens.openDimensionEditor('lnsDatatable_metrics > lns-dimensionTrigger');
|
||||
|
@ -97,8 +95,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert static value to the metric dimension', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Static value');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Static value');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -112,8 +109,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert aggregate by to split row dimension', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Agg by');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Agg by');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -131,8 +127,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert group by field with custom label', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - GroupBy label');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - GroupBy label');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -144,8 +139,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert color ranges', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Color ranges');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Color ranges');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -171,8 +165,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should bring the ignore global filters configured at panel level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Table - Ignore global filters panel');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Table - Ignore global filters panel');
|
||||
await lens.waitForVisualization('lnsDataTable');
|
||||
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
|
|
|
@ -38,13 +38,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item for a count aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Timeseries - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('visualizes field to Lens and loads fields to the dimesion editor', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Basic');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
await retry.try(async () => {
|
||||
const dimensions = await testSubjects.findAll('lns-dimensionTrigger');
|
||||
|
@ -55,24 +53,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should preserve app filters in lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - With filter');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - With filter');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await filterBar.hasFilter('extension', 'css')).to.be(true);
|
||||
});
|
||||
|
||||
it('should preserve query in lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - With query');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - With query');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await queryBar.getQueryString()).to.equal('machine.os : ios');
|
||||
});
|
||||
|
||||
it('should draw a reference line', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Reference line');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Reference line');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
await retry.try(async () => {
|
||||
const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`);
|
||||
|
@ -92,8 +87,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert metric agg with params', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Agg with params');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Agg with params');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
await retry.try(async () => {
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -108,18 +102,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should not allow converting of invalid panel', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Invalid panel');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Timeseries - Invalid panel')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should not allow converting of unsupported aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Unsupported aggregations');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(
|
||||
await panelActions.canConvertToLensByTitle('Timeseries - Unsupported aggregations')
|
||||
).to.eql(false);
|
||||
});
|
||||
|
||||
it('should convert parent pipeline aggregation with terms', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Parent pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Parent pipeline agg');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
await retry.try(async () => {
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -133,8 +128,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert sibling pipeline aggregation with terms', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Timeseries - Sibling pipeline agg');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Sibling pipeline agg');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
await retry.try(async () => {
|
||||
expect(await lens.getLayerCount()).to.be(1);
|
||||
|
@ -148,20 +142,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should bring the ignore global filters configured at series level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading(
|
||||
'Timeseries - Ignore global filters series'
|
||||
);
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Ignore global filters series');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
||||
it('should bring the ignore global filters configured at panel level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading(
|
||||
'Timeseries - Ignore global filters panel'
|
||||
);
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Timeseries - Ignore global filters panel');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
|
|
|
@ -37,33 +37,31 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should show the "Convert to Lens" menu item for a count aggregation', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Basic');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(true);
|
||||
expect(await panelActions.canConvertToLensByTitle('Top N - Basic')).to.eql(true);
|
||||
});
|
||||
|
||||
it('should not allow converting of invalid panel', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Invalid panel');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Top N - Invalid panel')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should not allow converting of unsupported aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Unsupported agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Top N - Unsupported agg')).to.eql(false);
|
||||
});
|
||||
|
||||
it('should hide the "Convert to Lens" menu item for a sibling pipeline aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Sibling pipeline agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Top N - Sibling pipeline agg')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should hide the "Convert to Lens" menu item for a parent pipeline aggregations', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Parent pipeline agg');
|
||||
expect(await panelActions.canConvertToLens(visPanel)).to.eql(false);
|
||||
expect(await panelActions.canConvertToLensByTitle('Top N - Parent pipeline agg')).to.eql(
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
it('should convert to horizontal bar', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Horizontal bar');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Horizontal bar');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover');
|
||||
|
@ -79,8 +77,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert group by to vertical axis', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Group by');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Group by');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -95,8 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert last value mode to reduced time range', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Last value');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Last value');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger');
|
||||
|
@ -114,8 +110,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should convert static value to the separate layer with y dimension', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Static value');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Static value');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -129,8 +124,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('visualizes field to Lens and loads fields to the dimesion editor', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Basic');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Basic');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
await retry.try(async () => {
|
||||
|
@ -140,31 +134,27 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should preserve app filters in lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - With filter');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - With filter');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await filterBar.hasFilter('extension', 'css')).to.be(true);
|
||||
});
|
||||
|
||||
it('should preserve query in lens', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - With query');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - With query');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
|
||||
expect(await queryBar.getQueryString()).to.equal('machine.os : ios');
|
||||
});
|
||||
|
||||
it('should bring the ignore global filters configured at series level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Ignore global filters series');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Ignore global filters series');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
||||
it('should bring the ignore global filters configured at panel level over', async () => {
|
||||
const visPanel = await panelActions.getPanelHeading('Top N - Ignore global filters panel');
|
||||
await panelActions.convertToLens(visPanel);
|
||||
await panelActions.convertToLensByTitle('Top N - Ignore global filters panel');
|
||||
await lens.waitForVisualization('xyVisChart');
|
||||
expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true);
|
||||
});
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
import { expect } from 'expect';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
const ADD_TO_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase';
|
||||
|
||||
export default ({ getPageObject, getService }: FtrProviderContext) => {
|
||||
const dashboard = getPageObject('dashboard');
|
||||
const lens = getPageObject('lens');
|
||||
|
@ -22,6 +24,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const find = getService('find');
|
||||
const toasts = getService('toasts');
|
||||
const retry = getService('retry');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
describe('Cases persistable attachments', function () {
|
||||
describe('lens visualization', () => {
|
||||
|
@ -55,9 +58,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
it('adds lens visualization to a new case', async () => {
|
||||
const caseTitle = 'case created in observability from my dashboard with lens visualization';
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ);
|
||||
|
||||
await retry.waitFor('wait for the modal to open', async () => {
|
||||
return (
|
||||
|
@ -108,10 +109,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
|
||||
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'dashboards' });
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ);
|
||||
// verify that solution filter is not visible
|
||||
await testSubjects.missingOrFail('options-filter-popover-button-owner');
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default ({ getPageObject, getService }: FtrProviderContext) => {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const dashboard = getPageObject('dashboard');
|
||||
|
@ -17,6 +16,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const svlCommonNavigation = getPageObject('svlCommonNavigation');
|
||||
const svlCommonPage = getPageObject('svlCommonPage');
|
||||
const settings = getPageObject('settings');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
describe('persistable attachment', () => {
|
||||
before(async () => {
|
||||
|
@ -49,9 +49,9 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
});
|
||||
|
||||
it('does not show actions to add lens visualization to case', async () => {
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.missingOrFail('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.expectMissingPanelAction(
|
||||
'embeddablePanelAction-embeddable_addToExistingCase'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
import { expect } from 'expect';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
const ADD_TO_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase';
|
||||
|
||||
export default ({ getPageObject, getService }: FtrProviderContext) => {
|
||||
const common = getPageObject('common');
|
||||
const dashboard = getPageObject('dashboard');
|
||||
|
@ -20,6 +22,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const retry = getService('retry');
|
||||
const header = getPageObject('header');
|
||||
const toasts = getService('toasts');
|
||||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
|
||||
describe('Cases persistable attachments', () => {
|
||||
describe('lens visualization', () => {
|
||||
|
@ -47,9 +50,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const caseTitle =
|
||||
'case created in security solution from my dashboard with lens visualization';
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ);
|
||||
|
||||
await retry.waitFor('wait for the modal to open', async () => {
|
||||
return (
|
||||
|
@ -106,9 +107,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
await testSubjects.click('edit-unsaved-New-Dashboard');
|
||||
}
|
||||
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelMore-mainMenu');
|
||||
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
|
||||
await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ);
|
||||
|
||||
// verify that solution filter is not visible
|
||||
await testSubjects.missingOrFail('options-filter-popover-button-owner');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue