mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
a99485ba33
* baldm0mma/transformation_info_modal * baldm0mma/transformation_info_modal/ add getDisplayContent * baldm0mma/transformation_info_modal/ reamove OperationRowHelp * baldm0mma/transformation_info_modal/ update prepMarkdown * baldm0mma/transformation_help_modal/ add example mkdwn * baldm0mma/transformation_help_modal/ add examples anno * baldm0mma/transformation_info_modal/ add calFieldHelper * baldm0mma/transformation_info_modal/ remove file * baldm0mma/transformation_info_modal/ add CalculateFieldHelper * baldm0mma/transformation_info_modal/ add TransformationEditorHelperModal * baldm0mma/transformation_info_modal/ add getHelperContent * baldm0mma/transformation_info_modal/ move TransformationEditorHelperModal * baldm0mma/transformation_info_modal/ add ReactElement * baldm0mma/transformations_info_modal * baldm0mma/transformation_info_modal/ update props for TransformationEditorHelperModal * baldm0mma/transformation_info_modal/ test * test * baldm0mma/transformation_info_modal/ reset vscode auth * baldm0mma/transformation_info_modal/ update getHelperContent * baldm0mma/transformations_info_modal/ add items for rebuilding markdown to react component * test * test * baldm0mma/transformations_info_modal/ remove comment in TransformationOperationRow * test * baldm0mma/transformation_info_modal/ add element to typing * baldm0mma/transformation_info_modal/ update getHelperContent with help component * baldm0mma/transformation_info_modal/ update modal title * baldm0mma/transformation_info_modal/ move logic to tranforms * baldm0mma/transformation_info_modal/ remove unused comments * baldm0mma/transformation_info_modal/ update standard reg * baldm0mma/trfansformation_info_modal/ remove context styling * baldm0mma/transformation_info_modal/ add content for CalculateFieldHelper * baldm0mma/transformation_info_modal/ add ConcatenateHelper * baldm0mma/transformations_info_modal/ add ConcatenateHelper * baldm0mma/transformation_info_modal/ add ConfigFromQueryHelper * baldm0mma/transformations/info_modal/ add ConvertFieldTypeHelper * baldm0mma/transformation_info_modal/ add CreateHeatmapHelp * baldm0mma/transformation_info_modal/ add ExtractFieldsHelper * baldm0mma/transformation_info_modal/ add FilterFieldsByNameHelper * baldm0mma/transformation_info_modal/ add FilterFieldsByNameHelper * baldm0mma/transformation_info_modal/ add OperationRowHelp to parse markdown * baldm0mma/transformation_info_modal/ remove commented out markdown * baldm0mma/transformations_info_modal/ remove comment * baldm0mma/transformation_info_modal/ update configFromQueryTransformRegistryItem * baldm0mma/transformation_info_modal/ update ConcatenateHelper * baldm0mma/transformation_info_modal/ update ConvertFieldTypeHelper * baldm0mma/transformation_info_modal/ update ExtractFieldsHelper * baldm0mma/transformation_info_modal/ update FieldLookupHelper * baldm0mma/transformation_info_modal/ update TransformationEditorHelperModal with determineContentDisplay() * baldm0mma/transformation_info_modal/ add FilterByRefIdHelper * baldm0mma/transformation_info_modal/ add FilterByValueHelper * baldm0mma/transformation_info_modal/ update file ext * baldm0mma/transformation_info_modal/ add GroupByHelper * baldm0mma/transformation_info_modal/ add HistogramHelper * baldm0mma/transformation_info_modal/ add JoinByFieldHelper * baldm0mma/transformation_info_modal/ add JoinByLabelsHelper * baldm0mma/transformations_info_modal/ add LabelsToFieldsHelper * baldm0mma/transformation_info_modal/ add LimitHelper * baldm0mma/transformation_info_modal/ add MergeHelper * baldm0mma/transformation_info_modal/ add PartitionByValuesHelper * baldm0mma/transformation_info_modal/ add ReduceHelper * baldm0mma/transformation_info_modal/ add RenameByRegexHelper * baldm0mma/transformation_info_modal/ add SeriesToRowsHelper * baldm0mma/transformation_info_modal/ add SortByHelper * baldm0mma/transformations_info_modal/ add spatial * baldm0mma/transformation_info_modal/ update to markdown * baldm0mma/transformation_info_modal/ remove comments * baldm0mma/transformation_info_modal/ update boarder with theme * baldm0mma/transformation_info_modal/ add test suite * baldm0mma/transformation_info_modal/ update tests * baldm0mma/transformation_info_modal/ update test to run on all transformations * baldm0mma/transformation_info_modaol/ add TimeSeriesTableHelper * baldm0mma/transformation_info_modal/ update concatenateHelper * baldm0mma/transformation_info_modal/ update calculateFieldHelper * baldmomma/transformation_info_modal/ update naming * baldm0mma/transformation_info_modal/ update getLinkToDocs location * baldm0mma/transformation_info_modal/ update docs * baldm0mma/transformation_info_modal/ update language * baldm0mma/transformation_info_modal/ rename test * baldm0mma/transformation_info_modal/ update naming 2 * baldm0mma/transformation_info_modal/ update to helper * baldm0mma/transformation_info_modal/ update docs * Apply suggestions from @imatwawana Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * baldm0mma/transformation_info_modal/ update convertFieldTypeHelper capitalization * Hack around with generating Markdown from transformations helpers (#75677) ```console $ cd docs $ make sources/panels-visualizations/query-transform-data/transform-data/index.md $ make docs ``` Browse to http://localhost:3003/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/ Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * baldm0mma/transformation_info_modal/ add calculateFieldHelper * baldm0mma/transformation_info_modal/ update concatenate * baldm0mma/transformation_info_modal/ add fieldLookup * baldm0mma/transformation_info_modal/ add filterFieldsByName * baldm0mma/transformation_info_modal/ add joinByField * baldm0mma/transformation_info_modal/ update renameByRegex * baldm0mma/transformation_info_modal/ update getHelperContent * baldm0mma/transformation_info_modal/ update calculateFieldTransformRegistryItem * baldm0mma/transformation_info_modal/ update concatenateTransformRegistryItem * baldm0mma/transformation_info_modal/ update configFromDataTransformer * baldm0mma/transformation_info_modal/ update extractFieldsTransformRegistryItem * baldm0mma/transformation_info_modal/ update formatTimeTransformerRegistryItem * baldm0mma/transformation_info_modal/ update heatmapTransformRegistryItem * baldm0mma/transformation_info_modal/ update mergeTransformerRegistryItem * baldm0mma/transformation_info_modal/ update timeSeriesTableTransformRegistryItem * baldm0mma/transformation_info_modal/ update doc builder * baldm0mma/transformation_info_modal/ update docs * baldm0mma/transformation_info_modal/ remove console log * baldm0mma/transformation_info_modal/ update console log * baldm0mma/transformation_info_modal/ update gitignore * baldm0mma/transformation_info_modal/ update calculateField * baldm0mma/transformation_info_modal/ add links * baldm0mma/transformation_info_modal/ update template * baldm0mma/transformation_info_modal/ update template with images * baldm0mma/transformation_info_modal/ build markdown * baldm0mma/transformations_info_modal/update with links * baldm0mma/transformation_info_modal/ update links * baldm0mma/transformation_info_modal/ apdate FormatTimeTransfomerEditor * baldm0mma/transformation_indo_modal/ update HeatmapTransformerEditor * baldm0mma/transformation_indo_modal/ update ConfigFromQueryTransformerEditor * baldm0mma/transformation_indo_modal/ update CalculateFieldTransformerEditor * baldm0mma/transformation_indo_modal/ update ConcatenateTransformerEditor * baldm0mma/transformation_indo_modal/ update FilterByNameTransformerEditor * baldm0mma/transformation_indo_modal/ update FilterByRefIdTransformerEditor * baldm0mma/transformation_indo_modal/ update GroupByTransformerEditor * baldm0mma/transformation_indo_modal/ update GroupingToMatrixTransformerEditor get helper * baldm0mma/transformation_indo_modal/ update SeriesToFieldsTransformerEditor get helper * baldm0mma/transformation_indo_modal/ update LabelsAsFieldsTransformerEditor * baldm0mma/transformation_info_modal/ update MergeTransformerEditor * baldm0mma/transformation_info_modal/ update OrganizeFieldsTransformerEditor * baldm0mma/transformation_info_modal/ update ReduceTransformerEditor * baldm0mma/transformation_info_modal/ update RenameByRegexTransformerEditor * baldm0mma/transformation_info_modal/ update SeriesToRowsTransformerEditor * baldm0mma/transformation_info_modal/ update SortByTransformerEditor * baldm0mma/transformation_info_modal/ update extractFieldsTransformerEditor * baldm0mma/transformation_info_modal/ update FilterByValueTransformerEditor * baldm0mma/transformation_info_modal/ update JoinByLabelsTransformerEditor * baldm0mma/transformation_info_modal/ update FieldLookupTransformerEditor * baldm0mma/transformation_info_modal/ update PartitionByValuesEditor * baldm0mma/transformation_info_modal/ update PrepareTimeSeriesEditor * baldm0mma/transformation_info_modal/ update RowsToFieldsTransformerEditor * baldm0mma/transformation_info_modal/ update spatialTransformRegistryItem * baldm0mma/transformation_info_modal/ update timeSeriesTableTransformRegistryItem * baldm0mma/transformation_info_modal/ update to helperDocs * baldm0mma/transformation_info_modal/ update built markdown * baldm0mma/transformation_info_modal/ run prettier * baldm0mma/transformation_info_modal/ update comments in getTransformationContent * baldm0mma/transformation_info_modal/ add removeMarkdownAnchorLinks * baldm0mma/transformation_info_modal/ update annos in getTransformationContent * baldm0mma/transformation_info_modal/ add requisite url prefix to markdown images * baldm0mma/transformation_info_modal/ add cleanMarkdownOfUnwantedSyntax * baldm0mma/transformation_info_modal/ update annos in content.ts * baldm0mma/transformation_info_modal/ update e2e tests with always-visiable trabnsformation * baldm0mma/transformation_info_modal/ remove note * baldm0mma/transformation_info_modal/ add annotation in getTransformationContent * baldm0mma/transformation_info_modal/ update e2e test naming --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
109 lines
4.9 KiB
TypeScript
109 lines
4.9 KiB
TypeScript
import { e2e } from '../utils';
|
|
|
|
const PANEL_UNDER_TEST = 'Lines 500 data points';
|
|
|
|
describe('Panel edit tests', () => {
|
|
beforeEach(() => {
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
|
});
|
|
|
|
it('Tests various Panel edit scenarios', () => {
|
|
cy.intercept({
|
|
pathname: '/api/ds/query',
|
|
}).as('query');
|
|
e2e.flows.openDashboard({ uid: 'TkZXxlNG3' });
|
|
cy.wait('@query');
|
|
|
|
e2e.flows.openPanelMenuItem(e2e.flows.PanelMenuItems.Edit, PANEL_UNDER_TEST);
|
|
|
|
// New panel editor opens when navigating from Panel menu
|
|
e2e.components.PanelEditor.General.content().should('be.visible');
|
|
|
|
// Queries tab is rendered and open by default
|
|
e2e.components.PanelEditor.DataPane.content()
|
|
.should('be.visible')
|
|
.within(() => {
|
|
e2e.components.Tab.title('Query').should('be.visible');
|
|
// data should be the active tab
|
|
e2e.components.Tab.active().within((li: JQuery<HTMLLIElement>) => {
|
|
expect(li.text()).equals('Query1'); // there's already a query so therefore Query + 1
|
|
});
|
|
e2e.components.QueryTab.content().should('be.visible');
|
|
e2e.components.TransformTab.content().should('not.exist');
|
|
e2e.components.AlertTab.content().should('not.exist');
|
|
e2e.components.PanelAlertTabContent.content().should('not.exist');
|
|
|
|
// Bottom pane tabs
|
|
// Can change to Transform tab
|
|
e2e.components.Tab.title('Transform data').should('be.visible').click();
|
|
e2e.components.Tab.active().within((li: JQuery<HTMLLIElement>) => {
|
|
expect(li.text()).equals('Transform data0'); // there's no transform so therefore Transform + 0
|
|
});
|
|
e2e.components.Transforms.card('Merge series/tables').scrollIntoView().should('be.visible');
|
|
e2e.components.QueryTab.content().should('not.exist');
|
|
e2e.components.AlertTab.content().should('not.exist');
|
|
e2e.components.PanelAlertTabContent.content().should('not.exist');
|
|
|
|
// Can change to Alerts tab (graph panel is the default vis so the alerts tab should be rendered)
|
|
e2e.components.Tab.title('Alert').should('be.visible').click();
|
|
e2e.components.Tab.active().should('have.text', 'Alert0'); // there's no alert so therefore Alert + 0
|
|
|
|
// Needs to be disabled until Grafana EE turns unified alerting on by default
|
|
// e2e.components.AlertTab.content().should('not.exist');
|
|
|
|
e2e.components.QueryTab.content().should('not.exist');
|
|
e2e.components.TransformTab.content().should('not.exist');
|
|
|
|
// Needs to be disabled until Grafana EE turns unified alerting on by default
|
|
// e2e.components.PanelAlertTabContent.content().should('exist');
|
|
// e2e.components.PanelAlertTabContent.content().should('be.visible');
|
|
|
|
e2e.components.Tab.title('Query').should('be.visible').click();
|
|
});
|
|
|
|
// Panel sidebar is rendered open by default
|
|
e2e.components.PanelEditor.OptionsPane.content().should('be.visible');
|
|
|
|
// close options pane
|
|
e2e.components.PanelEditor.toggleVizOptions().click();
|
|
e2e.components.PanelEditor.OptionsPane.content().should('not.exist');
|
|
|
|
// open options pane
|
|
e2e.components.PanelEditor.toggleVizOptions().should('be.visible').click();
|
|
e2e.components.PanelEditor.OptionsPane.content().should('be.visible');
|
|
|
|
// Check that Time series is chosen
|
|
e2e.components.PanelEditor.toggleVizPicker().click();
|
|
e2e.components.PluginVisualization.item('Time series').should('be.visible');
|
|
e2e.components.PluginVisualization.current().should((e) => expect(e).to.contain('Time series'));
|
|
|
|
// Check that table view works
|
|
e2e.components.Panels.Panel.loadingBar().should('not.exist');
|
|
e2e.components.PanelEditor.toggleTableView().click({ force: true });
|
|
e2e.components.Panels.Visualization.Table.header()
|
|
.should('be.visible')
|
|
.within(() => {
|
|
cy.contains('A-series').should('be.visible');
|
|
});
|
|
|
|
// Change to Text panel
|
|
e2e.components.PluginVisualization.item('Text').scrollIntoView().should('be.visible').click();
|
|
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain('Text'));
|
|
|
|
// Data pane should not be rendered
|
|
e2e.components.PanelEditor.DataPane.content().should('not.exist');
|
|
|
|
// Change to Table panel
|
|
e2e.components.PanelEditor.toggleVizPicker().click();
|
|
e2e.components.PluginVisualization.item('Table').scrollIntoView().should('be.visible').click();
|
|
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain('Table'));
|
|
|
|
// Data pane should be rendered
|
|
e2e.components.PanelEditor.DataPane.content().should('be.visible');
|
|
|
|
// Field & Overrides tabs (need to switch to React based vis, i.e. Table)
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Table Show table header').should('be.visible');
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Table Column width').should('be.visible');
|
|
});
|
|
});
|