mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
This commit is contained in:
parent
b9e408e5a4
commit
c0f901798c
4 changed files with 25 additions and 4 deletions
|
@ -150,6 +150,7 @@ export const datatableVisualization: Visualization<
|
|||
accessors: sortedColumns,
|
||||
supportsMoreColumns: true,
|
||||
filterOperations: () => true,
|
||||
dataTestSubj: 'lnsDatatable_column',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -129,7 +129,7 @@ function LayerPanels(
|
|||
},
|
||||
},
|
||||
visualization: {
|
||||
activeId: activeVisualization.id,
|
||||
...prevState.visualization,
|
||||
state: newVisualizationState,
|
||||
},
|
||||
stagedPreview: undefined,
|
||||
|
|
|
@ -9,7 +9,7 @@ import expect from '@kbn/expect';
|
|||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function({ getService, getPageObjects, ...rest }: FtrProviderContext) {
|
||||
export default function({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects([
|
||||
'header',
|
||||
'common',
|
||||
|
@ -89,6 +89,17 @@ export default function({ getService, getPageObjects, ...rest }: FtrProviderCont
|
|||
field: 'bytes',
|
||||
});
|
||||
|
||||
await PageObjects.lens.configureDimension({
|
||||
dimension:
|
||||
'[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]',
|
||||
operation: 'terms',
|
||||
field: '@message.raw',
|
||||
});
|
||||
|
||||
await PageObjects.lens.switchToVisualization('lnsChartSwitchPopover_lnsDatatable');
|
||||
await PageObjects.lens.removeDimension('lnsDatatable_column');
|
||||
await PageObjects.lens.switchToVisualization('lnsChartSwitchPopover_bar_stacked');
|
||||
|
||||
await PageObjects.lens.configureDimension({
|
||||
dimension:
|
||||
'[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]',
|
||||
|
|
|
@ -103,8 +103,8 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
/**
|
||||
* Changes the specified dimension to the specified operation and (optinally) field.
|
||||
*
|
||||
* @param opts.from - the text of the dimension being changed
|
||||
* @param opts.to - the desired operation for the dimension
|
||||
* @param opts.dimension - the selector of the dimension being changed
|
||||
* @param opts.operation - the desired operation ID for the dimension
|
||||
* @param opts.field - the desired field for the dimension
|
||||
*/
|
||||
async configureDimension(opts: { dimension: string; operation?: string; field?: string }) {
|
||||
|
@ -123,6 +123,15 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the dimension matching a specific test subject
|
||||
*/
|
||||
async removeDimension(dimensionTestSubj: string) {
|
||||
await find.clickByCssSelector(
|
||||
`[data-test-subj="${dimensionTestSubj}"] [data-test-subj="indexPattern-dimensionPopover-remove"]`
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Save the current Lens visualization.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue