diff --git a/test/functional/apps/dashboard/dashboard_state.js b/test/functional/apps/dashboard/dashboard_state.js
index 3caab3db44cb3..3b9e404e9b94d 100644
--- a/test/functional/apps/dashboard/dashboard_state.js
+++ b/test/functional/apps/dashboard/dashboard_state.js
@@ -27,7 +27,14 @@ import {
} from '../../../../src/plugins/dashboard_embeddable_container/public/embeddable/dashboard_constants';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['dashboard', 'visualize', 'header', 'discover']);
+ const PageObjects = getPageObjects([
+ 'dashboard',
+ 'visualize',
+ 'header',
+ 'discover',
+ 'tileMap',
+ 'visChart',
+ ]);
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const queryBar = getService('queryBar');
@@ -58,14 +65,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.dashboard.switchToEditMode();
- await PageObjects.visualize.openLegendOptionColors('Count');
- await PageObjects.visualize.selectNewLegendColorChoice('#EA6460');
+ await PageObjects.visChart.openLegendOptionColors('Count');
+ await PageObjects.visChart.selectNewLegendColorChoice('#EA6460');
await PageObjects.dashboard.saveDashboard('Overridden colors');
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.loadSavedDashboard('Overridden colors');
- const colorChoiceRetained = await PageObjects.visualize.doesSelectedLegendColorExist(
+ const colorChoiceRetained = await PageObjects.visChart.doesSelectedLegendColorExist(
'#EA6460'
);
@@ -153,10 +160,10 @@ export default function({ getService, getPageObjects }) {
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.clickEdit();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
await PageObjects.visualize.saveVisualizationExpectSuccess('Visualization TileMap');
@@ -225,8 +232,8 @@ export default function({ getService, getPageObjects }) {
describe('for embeddable config color parameters on a visualization', () => {
it('updates a pie slice color on a soft refresh', async function() {
await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME);
- await PageObjects.visualize.openLegendOptionColors('80,000');
- await PageObjects.visualize.selectNewLegendColorChoice('#F9D9F9');
+ await PageObjects.visChart.openLegendOptionColors('80,000');
+ await PageObjects.visChart.selectNewLegendColorChoice('#F9D9F9');
const currentUrl = await browser.getCurrentUrl();
const newUrl = currentUrl.replace('F9D9F9', 'FFFFFF');
await browser.get(newUrl.toString(), false);
@@ -248,7 +255,7 @@ export default function({ getService, getPageObjects }) {
// Unskip once https://github.com/elastic/kibana/issues/15736 is fixed.
it.skip('and updates the pie slice legend color', async function() {
await retry.try(async () => {
- const colorExists = await PageObjects.visualize.doesSelectedLegendColorExist('#FFFFFF');
+ const colorExists = await PageObjects.visChart.doesSelectedLegendColorExist('#FFFFFF');
expect(colorExists).to.be(true);
});
});
@@ -269,7 +276,7 @@ export default function({ getService, getPageObjects }) {
// Unskip once https://github.com/elastic/kibana/issues/15736 is fixed.
it.skip('resets the legend color as well', async function() {
await retry.try(async () => {
- const colorExists = await PageObjects.visualize.doesSelectedLegendColorExist('#57c17b');
+ const colorExists = await PageObjects.visChart.doesSelectedLegendColorExist('#57c17b');
expect(colorExists).to.be(true);
});
});
diff --git a/test/functional/apps/getting_started/_shakespeare.js b/test/functional/apps/getting_started/_shakespeare.js
index 04d81f4b46083..5af1676cf423f 100644
--- a/test/functional/apps/getting_started/_shakespeare.js
+++ b/test/functional/apps/getting_started/_shakespeare.js
@@ -23,7 +23,14 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const esArchiver = getService('esArchiver');
const retry = getService('retry');
- const PageObjects = getPageObjects(['console', 'common', 'settings', 'visualize']);
+ const PageObjects = getPageObjects([
+ 'console',
+ 'common',
+ 'settings',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ ]);
// https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html
@@ -63,11 +70,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVerticalBarChart();
await PageObjects.visualize.clickNewSearch('shakes*');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
const expectedChartValues = [111396];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Count');
+ const data = await PageObjects.visChart.getBarChartData('Count');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data[0] - expectedChartValues[0]).to.be.lessThan(5);
@@ -84,22 +91,22 @@ export default function({ getService, getPageObjects }) {
it('should configure metric Unique Count Speaking Parts', async function() {
log.debug('Metric = Unique Count, speaker, Speaking Parts');
// this first change to the YAxis metric agg uses the default aggIndex of 1
- await PageObjects.visualize.selectYAxisAggregation(
+ await PageObjects.visEditor.selectYAxisAggregation(
'Unique Count',
'speaker',
'Speaking Parts'
);
// then increment the aggIndex for the next one we create
aggIndex = aggIndex + 1;
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [935];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- const title = await PageObjects.visualize.getYAxisTitle();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be('Speaking Parts');
});
@@ -110,23 +117,23 @@ export default function({ getService, getPageObjects }) {
5. Click Apply changes images/apply-changes-button.png to view the results.
*/
it('should configure Terms aggregation on play_name', async function() {
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
aggIndex = aggIndex + 1;
log.debug('Field = play_name');
- await PageObjects.visualize.selectField('play_name');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('play_name');
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels).to.eql([
'Richard III',
'Henry VI Part 2',
@@ -145,21 +152,21 @@ export default function({ getService, getPageObjects }) {
2. Choose the Max aggregation and select the speech_number field.
*/
it('should configure Max aggregation metric on speech_number', async function() {
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
log.debug('Aggregation = Max');
- await PageObjects.visualize.selectYAxisAggregation(
+ await PageObjects.visEditor.selectYAxisAggregation(
'Max',
'speech_number',
'Max Speaking Parts',
aggIndex
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
const expectedChartValues2 = [177, 106, 153, 132, 162];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
@@ -168,7 +175,7 @@ export default function({ getService, getPageObjects }) {
expect(data2).to.eql(expectedChartValues2);
});
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels).to.eql([
'Richard III',
'Henry VI Part 2',
@@ -184,15 +191,15 @@ export default function({ getService, getPageObjects }) {
4. Click Apply changes images/apply-changes-button.png. Your chart should now look like this:
*/
it('should configure change options to normal bars', async function() {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.selectChartMode('normal');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.selectChartMode('normal');
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
const expectedChartValues2 = [177, 106, 153, 132, 162];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
@@ -210,15 +217,15 @@ export default function({ getService, getPageObjects }) {
Save this chart with the name Bar Example.
*/
it('should change the Y-Axis extents', async function() {
- await PageObjects.visualize.setAxisExtents('50', '250');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setAxisExtents('50', '250');
+ await PageObjects.visEditor.clickGo();
// same values as previous test except scaled down by the 50 for Y-Axis min
const expectedChartValues = [21, 15, 12, 5, 5];
const expectedChartValues2 = [127, 56, 103, 82, 112];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js
index b8fa253f72104..e52cfdf478c33 100644
--- a/test/functional/apps/visualize/_area_chart.js
+++ b/test/functional/apps/visualize/_area_chart.js
@@ -24,7 +24,14 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const browser = getService('browser');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('area charts', function indexPatternCreation() {
const vizName1 = 'Visualization AreaChart Name Test';
@@ -38,17 +45,17 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Check field value');
- const fieldValues = await PageObjects.visualize.getField();
+ const fieldValues = await PageObjects.visEditor.getField();
log.debug('fieldValue = ' + fieldValues);
expect(fieldValues[0]).to.be('@timestamp');
- const intervalValue = await PageObjects.visualize.getInterval();
+ const intervalValue = await PageObjects.visEditor.getInterval();
log.debug('intervalValue = ' + intervalValue);
expect(intervalValue[0]).to.be('Auto');
- return PageObjects.visualize.clickGo();
+ return PageObjects.visEditor.clickGo();
};
before(initAreaChart);
@@ -70,7 +77,7 @@ export default function({ getService, getPageObjects }) {
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -113,14 +120,14 @@ export default function({ getService, getPageObjects }) {
];
await retry.try(async function tryingForTime() {
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
log.debug('X-Axis labels = ' + labels);
expect(labels).to.eql(xAxisLabels);
});
- const labels = await PageObjects.visualize.getYAxisLabels();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug('Y-Axis labels = ' + labels);
expect(labels).to.eql(yAxisLabels);
- const paths = await PageObjects.visualize.getAreaChartData('Count');
+ const paths = await PageObjects.visChart.getAreaChartData('Count');
log.debug('expectedAreaChartData = ' + expectedAreaChartData);
log.debug('actual chart data = ' + paths);
expect(paths).to.eql(expectedAreaChartData);
@@ -185,9 +192,9 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '55'],
];
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.setInterval('Second');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.setInterval('Second');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -217,9 +224,9 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '0.015'],
];
- await PageObjects.visualize.toggleAdvancedParams('2');
- await PageObjects.visualize.toggleScaleMetrics();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleAdvancedParams('2');
+ await PageObjects.visEditor.toggleScaleMetrics();
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -249,11 +256,11 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '55', '2.053KB'],
];
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
- await PageObjects.visualize.selectAggregation('Top Hit', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.selectAggregateWith('average');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Top Hit', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.selectAggregateWith('average');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -285,13 +292,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -317,9 +324,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -345,10 +352,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -364,18 +371,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -392,9 +399,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -412,16 +419,16 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch('long-window-logstash-*');
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Yearly');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Yearly');
+ await PageObjects.visEditor.clickGo();
// This svg area is composed by 7 years (2013 - 2019).
// 7 points are used to draw the upper line (usually called y1)
// 7 points compose the lower line (usually called y0)
- const paths = await PageObjects.visualize.getAreaChartPaths('Count');
+ const paths = await PageObjects.visChart.getAreaChartPaths('Count');
log.debug('actual chart data = ' + paths);
const numberOfSegments = 7 * 2;
expect(paths.length).to.eql(numberOfSegments);
@@ -435,17 +442,17 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch('long-window-logstash-*');
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Monthly');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Monthly');
+ await PageObjects.visEditor.clickGo();
// This svg area is composed by 67 months 3 (2013) + 5 * 12 + 4 (2019)
// 67 points are used to draw the upper line (usually called y1)
// 67 points compose the lower line (usually called y0)
const numberOfSegments = 67 * 2;
- const paths = await PageObjects.visualize.getAreaChartPaths('Count');
+ const paths = await PageObjects.visChart.getAreaChartPaths('Count');
log.debug('actual chart data = ' + paths);
expect(paths.length).to.eql(numberOfSegments);
});
diff --git a/test/functional/apps/visualize/_data_table.js b/test/functional/apps/visualize/_data_table.js
index e8fe8fb656877..0a9ff1e77a2ef 100644
--- a/test/functional/apps/visualize/_data_table.js
+++ b/test/functional/apps/visualize/_data_table.js
@@ -22,9 +22,10 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
+ const testSubjects = getService('testSubjects');
const retry = getService('retry');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'timePicker', 'visEditor', 'visChart']);
describe('data table', function indexPatternCreation() {
const vizName1 = 'Visualization DataTable';
@@ -38,27 +39,27 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes');
+ await PageObjects.visEditor.selectField('bytes');
log.debug('Interval = 2000');
- await PageObjects.visualize.setNumericInterval('2000');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
});
it('should allow applying changed params', async () => {
- await PageObjects.visualize.setNumericInterval('1', { append: true });
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.setInterval('1', { type: 'numeric', append: true });
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('20001');
- const isApplyButtonEnabled = await PageObjects.visualize.isApplyEnabled();
+ const isApplyButtonEnabled = await PageObjects.visEditor.isApplyEnabled();
expect(isApplyButtonEnabled).to.be(true);
});
it('should allow reseting changed params', async () => {
- await PageObjects.visualize.clickReset();
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.clickReset();
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('2000');
});
@@ -66,7 +67,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -96,7 +97,7 @@ export default function({ getService, getPageObjects }) {
it('should show percentage columns', async () => {
async function expectValidTableData() {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'1,351 64.7%',
@@ -110,16 +111,16 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Range');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Range');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.setSelectByOptionText(
'datatableVisualizationPercentageCol',
'Count'
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await expectValidTableData();
@@ -128,20 +129,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(SAVE_NAME);
await PageObjects.visualize.loadSavedVisualization(SAVE_NAME);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await expectValidTableData();
// check that it works after selecting a column that's deleted
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.removeDimension(1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickOptionsTab();
-
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.removeDimension(1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickOptionsTab();
+
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'344.094B',
@@ -155,12 +156,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average Bucket', 'metrics');
- await PageObjects.visualize.selectAggregation('Terms', 'metrics', 'buckets');
- await PageObjects.visualize.selectField('geo.src', 'metrics', 'buckets');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average Bucket', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Terms', 'metrics', 'buckets');
+ await PageObjects.visEditor.selectField('geo.src', 'metrics', 'buckets');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql(['14,004 1,412.6']);
});
@@ -170,12 +171,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
@@ -192,12 +193,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
'4,757',
@@ -210,15 +211,15 @@ export default function({ getService, getPageObjects }) {
it('should correctly filter for applied time filter on the main timefield', async () => {
await filterBar.addFilter('@timestamp', 'is between', '2015-09-19', '2015-09-21');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
it('should correctly filter for pinned filters', async () => {
await filterBar.toggleFilterPinned('@timestamp');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
@@ -227,11 +228,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickMetricEditor();
- await PageObjects.visualize.selectAggregation('Top Hit', 'metrics');
- await PageObjects.visualize.selectField('agent.raw', 'metrics');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickMetricEditor();
+ await PageObjects.visEditor.selectAggregation('Top Hit', 'metrics');
+ await PageObjects.visEditor.selectField('agent.raw', 'metrics');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data);
expect(data.length).to.be.greaterThan(0);
});
@@ -241,11 +242,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Range');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Range');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'1,351',
@@ -260,19 +261,19 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.clickGo();
-
- await PageObjects.visualize.toggleOtherBucket();
- await PageObjects.visualize.toggleMissingBucket();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.clickGo();
+
+ await PageObjects.visEditor.toggleOtherBucket();
+ await PageObjects.visEditor.toggleMissingBucket();
+ await PageObjects.visEditor.clickGo();
});
it('should show correct data', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109'],
['css', '2,159'],
@@ -281,9 +282,9 @@ export default function({ getService, getPageObjects }) {
});
it('should apply correct filter', async () => {
- await PageObjects.visualize.filterOnTableCell(1, 3);
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visChart.filterOnTableCell(1, 3);
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['png', '1,373'],
['gif', '918'],
@@ -298,20 +299,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickGo();
});
it('should show correct data without showMetricsAtAllLevels', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', 'CN', '1,718'],
['jpg', 'IN', '1,511'],
@@ -327,10 +328,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show correct data without showMetricsAtAllLevels even if showPartialRows is selected', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showPartialRows');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showPartialRows', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', 'CN', '1,718'],
['jpg', 'IN', '1,511'],
@@ -346,10 +347,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics on each level', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showMetricsAtAllLevels');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showMetricsAtAllLevels', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109', 'CN', '1,718'],
['jpg', '9,109', 'IN', '1,511'],
@@ -365,12 +366,12 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics other than count on each level', async () => {
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109', '5.469KB', 'CN', '1,718', '5.477KB'],
['jpg', '9,109', '5.469KB', 'IN', '1,511', '5.456KB'],
@@ -392,26 +393,26 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split table');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.setSize(3, 3);
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.setSize(3, 4);
- await PageObjects.visualize.toggleOpenEditor(4, 'false');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split table');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.setSize(3, 3);
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.setSize(3, 4);
+ await PageObjects.visEditor.toggleOpenEditor(4, 'false');
+ await PageObjects.visEditor.clickGo();
});
it('should have a splitted table', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
[
['CN', 'CN', '330'],
@@ -439,10 +440,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics for split bucket when using showMetricsAtAllLevels', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showMetricsAtAllLevels');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showMetricsAtAllLevels', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
[
['CN', '1,718', 'CN', '330'],
diff --git a/test/functional/apps/visualize/_data_table_nontimeindex.js b/test/functional/apps/visualize/_data_table_nontimeindex.js
index 77478f5d10edc..3db3cd094a81b 100644
--- a/test/functional/apps/visualize/_data_table_nontimeindex.js
+++ b/test/functional/apps/visualize/_data_table_nontimeindex.js
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const filterBar = getService('filterBar');
const renderable = getService('renderable');
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'header', 'visChart']);
describe.skip('data table with index without time filter', function indexPatternCreation() {
const vizName1 = 'Visualization DataTable without time filter';
@@ -40,27 +40,27 @@ export default function({ getService, getPageObjects }) {
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
log.debug('Bucket = Split Rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes');
+ await PageObjects.visEditor.selectField('bytes');
log.debug('Interval = 2000');
- await PageObjects.visualize.setNumericInterval('2000');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
});
it('should allow applying changed params', async () => {
- await PageObjects.visualize.setNumericInterval('1', { append: true });
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.setInterval('1', { type: 'numeric', append: true });
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('20001');
- const isApplyButtonEnabled = await PageObjects.visualize.isApplyEnabled();
+ const isApplyButtonEnabled = await PageObjects.visEditor.isApplyEnabled();
expect(isApplyButtonEnabled).to.be(true);
});
it('should allow reseting changed params', async () => {
- await PageObjects.visualize.clickReset();
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.clickReset();
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('2000');
});
@@ -68,7 +68,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -102,12 +102,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average Bucket', 'metrics');
- await PageObjects.visualize.selectAggregation('Terms', 'metrics', 'buckets');
- await PageObjects.visualize.selectField('geo.src', 'metrics', 'buckets');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average Bucket', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Terms', 'metrics', 'buckets');
+ await PageObjects.visEditor.selectField('geo.src', 'metrics', 'buckets');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql(['14,004 1,412.6']);
});
@@ -118,12 +118,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
@@ -141,12 +141,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
'4,757',
@@ -161,7 +161,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('@timestamp', 'is between', '2015-09-19', '2015-09-21');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
@@ -169,7 +169,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.toggleFilterPinned('@timestamp');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
});
diff --git a/test/functional/apps/visualize/_embedding_chart.js b/test/functional/apps/visualize/_embedding_chart.js
index c16dc3b1279ff..940aa3eb5d462 100644
--- a/test/functional/apps/visualize/_embedding_chart.js
+++ b/test/functional/apps/visualize/_embedding_chart.js
@@ -24,7 +24,13 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const renderable = getService('renderable');
const embedding = getService('embedding');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('embedding', () => {
describe('a data table', () => {
@@ -33,22 +39,22 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Histogram');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.setNumericInterval('2000', undefined, 3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric', aggNth: 3 });
+ await PageObjects.visEditor.clickGo();
});
it('should allow opening table vis in embedded mode', async () => {
await embedding.openInEmbeddedMode();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20 00:00',
@@ -89,7 +95,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-21 00:00',
@@ -126,11 +132,11 @@ export default function({ getService, getPageObjects }) {
});
it('should allow to change timerange from the visualization in embedded mode', async () => {
- await PageObjects.visualize.filterOnTableCell(1, 7);
+ await PageObjects.visChart.filterOnTableCell(1, 7);
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'03:00',
diff --git a/test/functional/apps/visualize/_experimental_vis.js b/test/functional/apps/visualize/_experimental_vis.js
index ae364244b4f5c..2ce15cf913eff 100644
--- a/test/functional/apps/visualize/_experimental_vis.js
+++ b/test/functional/apps/visualize/_experimental_vis.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default ({ getService, getPageObjects }) => {
const log = getService('log');
- const PageObjects = getPageObjects(['common', 'visualize']);
+ const PageObjects = getPageObjects(['visualize']);
describe('visualize app', function() {
this.tags('smoke');
diff --git a/test/functional/apps/visualize/_gauge_chart.js b/test/functional/apps/visualize/_gauge_chart.js
index 2b9033d1ae9d2..7ebb4548f967b 100644
--- a/test/functional/apps/visualize/_gauge_chart.js
+++ b/test/functional/apps/visualize/_gauge_chart.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const inspector = getService('inspector');
const testSubjects = getService('testSubjects');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
// FLAKY: https://github.com/elastic/kibana/issues/45089
describe('gauge chart', function indexPatternCreation() {
@@ -50,24 +50,24 @@ export default function({ getService, getPageObjects }) {
// initial metric of "Count" is selected by default
return retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedCount).to.eql(metricValue);
});
});
it('should show Split Gauges', async function() {
log.debug('Bucket = Split Group');
- await PageObjects.visualize.clickBucket('Split group');
+ await PageObjects.visEditor.clickBucket('Split group');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
+ await PageObjects.visEditor.selectField('machine.os.raw');
log.debug('Size = 4');
- await PageObjects.visualize.setSize('4');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setSize('4');
+ await PageObjects.visEditor.clickGo();
await retry.try(async () => {
- expect(await PageObjects.visualize.getGaugeValue()).to.eql([
+ expect(await PageObjects.visChart.getGaugeValue()).to.eql([
'2,904',
'win 8',
'2,858',
@@ -83,34 +83,34 @@ export default function({ getService, getPageObjects }) {
it('should show correct values for fields with fieldFormatters', async function() {
const expectedTexts = ['2,904', 'win 8: Count', '0B', 'win 8: Min bytes'];
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.setSize('1');
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Min', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.setSize('1');
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Min', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedTexts).to.eql(metricValue);
});
});
it('should format the metric correctly in percentage mode', async function() {
await initGaugeVis();
- await PageObjects.visualize.clickMetricEditor();
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickOptionsTab();
+ await PageObjects.visEditor.clickMetricEditor();
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickOptionsTab();
await testSubjects.setValue('gaugeColorRange2__to', '10000');
await testSubjects.click('gaugePercentageMode');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
const expectedTexts = ['57.273%', 'Average bytes'];
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedTexts).to.eql(metricValue);
});
});
diff --git a/test/functional/apps/visualize/_heatmap_chart.js b/test/functional/apps/visualize/_heatmap_chart.js
index 226e490a6b232..2cea861d0f64d 100644
--- a/test/functional/apps/visualize/_heatmap_chart.js
+++ b/test/functional/apps/visualize/_heatmap_chart.js
@@ -22,7 +22,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('heatmap chart', function indexPatternCreation() {
this.tags('smoke');
@@ -36,20 +36,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// leaving Interval set to Auto
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -87,16 +87,16 @@ export default function({ getService, getPageObjects }) {
});
it('should show 4 color ranges as default colorNumbers param', async function() {
- const legends = await PageObjects.visualize.getLegendEntries();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = ['0 - 400', '400 - 800', '800 - 1,200', '1,200 - 1,600'];
expect(legends).to.eql(expectedLegends);
});
it('should show 6 color ranges if changed on options', async function() {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.changeHeatmapColorNumbers(6);
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.changeHeatmapColorNumbers(6);
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = [
'0 - 267',
'267 - 534',
@@ -108,23 +108,23 @@ export default function({ getService, getPageObjects }) {
expect(legends).to.eql(expectedLegends);
});
it('should show 6 custom color ranges', async function() {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.clickEnableCustomRanges();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.clickEnableCustomRanges();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
log.debug('customize 2 last ranges');
- await PageObjects.visualize.setCustomRangeByIndex(6, '650', '720');
- await PageObjects.visualize.setCustomRangeByIndex(7, '800', '905');
+ await PageObjects.visEditor.setCustomRangeByIndex(6, '650', '720');
+ await PageObjects.visEditor.setCustomRangeByIndex(7, '800', '905');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = [
'0 - 100',
'100 - 200',
diff --git a/test/functional/apps/visualize/_histogram_request_start.js b/test/functional/apps/visualize/_histogram_request_start.js
index a601e370a568f..a74fa8856a3b3 100644
--- a/test/functional/apps/visualize/_histogram_request_start.js
+++ b/test/functional/apps/visualize/_histogram_request_start.js
@@ -22,7 +22,13 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ ]);
describe('histogram agg onSearchRequestStart', function() {
before(async function() {
@@ -33,21 +39,21 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split Rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram');
+ await PageObjects.visEditor.selectField('machine.ram');
});
describe('interval parameter uses autoBounds', function() {
it('should use provided value when number of generated buckets is less than histogram:maxBars', async function() {
const providedInterval = 2400000000;
log.debug(`Interval = ${providedInterval}`);
- await PageObjects.visualize.setNumericInterval(providedInterval);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval(providedInterval, { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
await retry.try(async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
const dataArray = data.replace(/,/g, '').split('\n');
expect(dataArray.length).to.eql(20);
const bucketStart = parseInt(dataArray[0], 10);
@@ -60,11 +66,11 @@ export default function({ getService, getPageObjects }) {
it('should scale value to round number when number of generated buckets is greater than histogram:maxBars', async function() {
const providedInterval = 100;
log.debug(`Interval = ${providedInterval}`);
- await PageObjects.visualize.setNumericInterval(providedInterval);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval(providedInterval, { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
await PageObjects.common.sleep(1000); //fix this
await retry.try(async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
const dataArray = data.replace(/,/g, '').split('\n');
expect(dataArray.length).to.eql(20);
const bucketStart = parseInt(dataArray[0], 10);
diff --git a/test/functional/apps/visualize/_inspector.js b/test/functional/apps/visualize/_inspector.js
index 76b75f62b5f2a..84f955d9c7879 100644
--- a/test/functional/apps/visualize/_inspector.js
+++ b/test/functional/apps/visualize/_inspector.js
@@ -21,7 +21,7 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('inspector', function describeIndexTests() {
this.tags('smoke');
@@ -39,10 +39,10 @@ export default function({ getService, getPageObjects }) {
await inspector.expectTableHeaders(['Count']);
log.debug('Add Average Metric on machine.ram field');
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableHeaders(['Count', 'Average machine.ram']);
});
@@ -50,23 +50,23 @@ export default function({ getService, getPageObjects }) {
describe('filtering on inspector table values', function() {
before(async function() {
log.debug('Add X-axis terms agg on machine.os.raw');
- await PageObjects.visualize.clickBucket('X-axis');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOtherBucket(3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('X-axis');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOtherBucket(3);
+ await PageObjects.visEditor.clickGo();
});
beforeEach(async function() {
await inspector.open();
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
});
afterEach(async function() {
await inspector.close();
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
});
it('should allow filtering for values', async function() {
diff --git a/test/functional/apps/visualize/_line_chart.js b/test/functional/apps/visualize/_line_chart.js
index 6a0a21e76924d..becf66f0fd5b1 100644
--- a/test/functional/apps/visualize/_line_chart.js
+++ b/test/functional/apps/visualize/_line_chart.js
@@ -24,7 +24,13 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const retry = getService('retry');
const testSubjects = getService('testSubjects');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ ]);
describe('line charts', function() {
const vizName1 = 'Visualization LineChart';
@@ -37,14 +43,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split chart');
- await PageObjects.visualize.clickBucket('Split chart');
+ await PageObjects.visEditor.clickBucket('Split chart');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = extension');
- await PageObjects.visualize.selectField('extension.raw');
+ await PageObjects.visEditor.selectField('extension.raw');
log.debug('switch from Rows to Columns');
- await PageObjects.visualize.clickSplitDirection('Columns');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickSplitDirection('Columns');
+ await PageObjects.visEditor.clickGo();
};
before(initLineChart);
@@ -60,7 +66,7 @@ export default function({ getService, getPageObjects }) {
// sleep a bit before trying to get the chart data
await PageObjects.common.sleep(3000);
- const data = await PageObjects.visualize.getLineChartData();
+ const data = await PageObjects.visChart.getLineChartData();
log.debug('data=' + data);
const tolerance = 10; // the y-axis scale is 10000 so 10 is 0.1%
for (let x = 0; x < data.length; x++) {
@@ -91,10 +97,10 @@ export default function({ getService, getPageObjects }) {
const expectedChartData = ['png 1,373', 'php 445', 'jpg 9,109', 'gif 918', 'css 2,159'];
log.debug('Order By = Term');
- await PageObjects.visualize.selectOrderByMetric(2, '_key');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectOrderByMetric(2, '_key');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function() {
- const data = await PageObjects.visualize.getLineChartData();
+ const data = await PageObjects.visChart.getLineChartData();
log.debug('data=' + data);
const tolerance = 10; // the y-axis scale is 10000 so 10 is 0.1%
for (let x = 0; x < data.length; x++) {
@@ -172,7 +178,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
describe.skip('switch between Y axis scale types', () => {
@@ -180,13 +186,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -212,9 +218,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -240,36 +246,36 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000', '10,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['2,000', '4,000', '6,000', '8,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000', '10,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['2,000', '4,000', '6,000', '8,000'];
expect(labels).to.eql(expectedLabels);
});
diff --git a/test/functional/apps/visualize/_linked_saved_searches.js b/test/functional/apps/visualize/_linked_saved_searches.js
index 9bbe8c9d2147c..37ec3f06f2ecd 100644
--- a/test/functional/apps/visualize/_linked_saved_searches.js
+++ b/test/functional/apps/visualize/_linked_saved_searches.js
@@ -22,7 +22,14 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'discover', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'discover',
+ 'visualize',
+ 'header',
+ 'timePicker',
+ 'visChart',
+ ]);
describe('visualize app', function describeIndexTests() {
describe('linked saved searched', () => {
@@ -43,7 +50,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickSavedSearch(savedSearchName);
await PageObjects.timePicker.setDefaultAbsoluteRange();
await retry.waitFor('wait for count to equal 9,109', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '9,109';
});
});
@@ -54,7 +61,7 @@ export default function({ getService, getPageObjects }) {
'Sep 21, 2015 @ 10:00:00.000'
);
await retry.waitFor('wait for count to equal 3,950', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '3,950';
});
});
@@ -63,7 +70,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('bytes', 'is between', '100', '3000');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 707', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '707';
});
});
@@ -71,7 +78,7 @@ export default function({ getService, getPageObjects }) {
it('should allow unlinking from a linked search', async () => {
await PageObjects.visualize.clickUnlinkSavedSearch();
await retry.waitFor('wait for count to equal 707', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '707';
});
// The filter on the saved search should now be in the editor
@@ -82,7 +89,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.toggleFilterEnabled('extension.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 1,293', async () => {
- const unfilteredData = await PageObjects.visualize.getTableVisData();
+ const unfilteredData = await PageObjects.visChart.getTableVisData();
return unfilteredData.trim() === '1,293';
});
});
@@ -91,7 +98,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccess('Unlinked before saved');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 1,293', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '1,293';
});
});
diff --git a/test/functional/apps/visualize/_markdown_vis.js b/test/functional/apps/visualize/_markdown_vis.js
index 870c465f2de37..51c03c90f507b 100644
--- a/test/functional/apps/visualize/_markdown_vis.js
+++ b/test/functional/apps/visualize/_markdown_vis.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getPageObjects, getService }) {
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'header']);
const find = getService('find');
const inspector = getService('inspector');
const markdown = `
@@ -33,8 +33,8 @@ export default function({ getPageObjects, getService }) {
before(async function() {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickMarkdownWidget();
- await PageObjects.visualize.setMarkdownTxt(markdown);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setMarkdownTxt(markdown);
+ await PageObjects.visEditor.clickGo();
});
describe('markdown vis', () => {
@@ -43,29 +43,29 @@ export default function({ getPageObjects, getService }) {
});
it('should render markdown as html', async function() {
- const h1Txt = await PageObjects.visualize.getMarkdownBodyDescendentText('h1');
+ const h1Txt = await PageObjects.visChart.getMarkdownBodyDescendentText('h1');
expect(h1Txt).to.equal('Heading 1');
});
it('should not render html in markdown as html', async function() {
const expected = 'Heading 1\n
Inline HTML that should not be rendered as html
';
- const actual = await PageObjects.visualize.getMarkdownText();
+ const actual = await PageObjects.visChart.getMarkdownText();
expect(actual).to.equal(expected);
});
it('should auto apply changes if auto mode is turned on', async function() {
const markdown2 = '## Heading 2';
- await PageObjects.visualize.toggleAutoMode();
- await PageObjects.visualize.setMarkdownTxt(markdown2);
+ await PageObjects.visEditor.toggleAutoMode();
+ await PageObjects.visEditor.setMarkdownTxt(markdown2);
await PageObjects.header.waitUntilLoadingHasFinished();
- const h1Txt = await PageObjects.visualize.getMarkdownBodyDescendentText('h2');
+ const h1Txt = await PageObjects.visChart.getMarkdownBodyDescendentText('h2');
expect(h1Txt).to.equal('Heading 2');
});
it('should resize the editor', async function() {
const editorSidebar = await find.byCssSelector('.visEditor__sidebar');
const initialSize = await editorSidebar.getSize();
- await PageObjects.visualize.sizeUpEditor();
+ await PageObjects.visEditor.sizeUpEditor();
const afterSize = await editorSidebar.getSize();
expect(afterSize.width).to.be.greaterThan(initialSize.width);
});
diff --git a/test/functional/apps/visualize/_metric_chart.js b/test/functional/apps/visualize/_metric_chart.js
index 31140a1718cfe..6a95f7553943c 100644
--- a/test/functional/apps/visualize/_metric_chart.js
+++ b/test/functional/apps/visualize/_metric_chart.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const filterBar = getService('filterBar');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('metric chart', function() {
before(async function() {
@@ -45,21 +45,21 @@ export default function({ getService, getPageObjects }) {
// initial metric of "Count" is selected by default
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(expectedCount).to.eql(metricValue);
});
});
it('should show Average', async function() {
const avgMachineRam = ['13,104,036,080.615', 'Average machine.ram'];
- await PageObjects.visualize.clickMetricEditor();
+ await PageObjects.visEditor.clickMetricEditor();
log.debug('Aggregation = Average');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(avgMachineRam).to.eql(metricValue);
});
});
@@ -67,12 +67,12 @@ export default function({ getService, getPageObjects }) {
it('should show Sum', async function() {
const sumPhpMemory = ['85,865,880', 'Sum of phpmemory'];
log.debug('Aggregation = Sum');
- await PageObjects.visualize.selectAggregation('Sum', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Sum', 'metrics');
log.debug('Field = phpmemory');
- await PageObjects.visualize.selectField('phpmemory', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('phpmemory', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(sumPhpMemory).to.eql(metricValue);
});
});
@@ -81,12 +81,12 @@ export default function({ getService, getPageObjects }) {
const medianBytes = ['5,565.263', '50th percentile of bytes'];
// For now, only comparing the text label part of the metric
log.debug('Aggregation = Median');
- await PageObjects.visualize.selectAggregation('Median', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Median', 'metrics');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
// only comparing the text label!
expect(medianBytes[1]).to.eql(metricValue[1]);
});
@@ -95,12 +95,12 @@ export default function({ getService, getPageObjects }) {
it('should show Min', async function() {
const minTimestamp = ['Sep 20, 2015 @ 00:00:00.000', 'Min @timestamp'];
log.debug('Aggregation = Min');
- await PageObjects.visualize.selectAggregation('Min', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Min', 'metrics');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('@timestamp', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(minTimestamp).to.eql(metricValue);
});
});
@@ -111,12 +111,12 @@ export default function({ getService, getPageObjects }) {
'Max relatedContent.article:modified_time',
];
log.debug('Aggregation = Max');
- await PageObjects.visualize.selectAggregation('Max', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Max', 'metrics');
log.debug('Field = relatedContent.article:modified_time');
- await PageObjects.visualize.selectField('relatedContent.article:modified_time', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('relatedContent.article:modified_time', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(maxRelatedContentArticleModifiedTime).to.eql(metricValue);
});
});
@@ -124,12 +124,12 @@ export default function({ getService, getPageObjects }) {
it('should show Unique Count', async function() {
const uniqueCountClientip = ['1,000', 'Unique count of clientip'];
log.debug('Aggregation = Unique Count');
- await PageObjects.visualize.selectAggregation('Unique Count', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Unique Count', 'metrics');
log.debug('Field = clientip');
- await PageObjects.visualize.selectField('clientip', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('clientip', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(uniqueCountClientip).to.eql(metricValue);
});
});
@@ -153,12 +153,12 @@ export default function({ getService, getPageObjects }) {
];
log.debug('Aggregation = Percentiles');
- await PageObjects.visualize.selectAggregation('Percentiles', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Percentiles', 'metrics');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(percentileMachineRam).to.eql(metricValue);
});
});
@@ -166,14 +166,14 @@ export default function({ getService, getPageObjects }) {
it('should show Percentile Ranks', async function() {
const percentileRankBytes = ['2.036%', 'Percentile rank 99 of "memory"'];
log.debug('Aggregation = Percentile Ranks');
- await PageObjects.visualize.selectAggregation('Percentile Ranks', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Percentile Ranks', 'metrics');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('memory', 'metrics');
+ await PageObjects.visEditor.selectField('memory', 'metrics');
log.debug('Values = 99');
- await PageObjects.visualize.setValue('99');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setValue('99');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(percentileRankBytes).to.eql(metricValue);
});
});
@@ -183,7 +183,7 @@ export default function({ getService, getPageObjects }) {
let filterCount = 0;
await retry.try(async function tryingForTime() {
// click first metric bucket
- await PageObjects.visualize.clickMetricByIndex(0);
+ await PageObjects.visEditor.clickMetricByIndex(0);
filterCount = await filterBar.getFilterCount();
});
expect(filterCount).to.equal(0);
@@ -191,17 +191,17 @@ export default function({ getService, getPageObjects }) {
it('should allow filtering with buckets', async function() {
log.debug('Bucket = Split Group');
- await PageObjects.visualize.clickBucket('Split group');
+ await PageObjects.visEditor.clickBucket('Split group');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.clickGo();
let filterCount = 0;
await retry.try(async function tryingForTime() {
// click first metric bucket
- await PageObjects.visualize.clickMetricByIndex(0);
+ await PageObjects.visEditor.clickMetricByIndex(0);
filterCount = await filterBar.getFilterCount();
});
await filterBar.removeAllFilters();
diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js
index 03067bb2182c5..313a4e39e5030 100644
--- a/test/functional/apps/visualize/_pie_chart.js
+++ b/test/functional/apps/visualize/_pie_chart.js
@@ -24,7 +24,14 @@ export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const pieChart = getService('pieChart');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('pie chart', function() {
const vizName1 = 'Visualization PieChart';
@@ -36,24 +43,24 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Click field memory');
- await PageObjects.visualize.selectField('memory');
+ await PageObjects.visEditor.selectField('memory');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
log.debug('setNumericInterval 4000');
- await PageObjects.visualize.setNumericInterval('40000');
+ await PageObjects.visEditor.setInterval('40000', { type: 'numeric' });
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -93,15 +100,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleOtherBucket(2);
- await PageObjects.visualize.toggleMissingBucket(2);
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleOtherBucket(2);
+ await PageObjects.visEditor.toggleMissingBucket(2);
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
@@ -109,20 +116,20 @@ export default function({ getService, getPageObjects }) {
const expectedTableData = ['Missing', 'osx'];
await pieChart.filterOnPieSlice('Other');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should apply correct filter on other bucket by clicking on a legend', async () => {
const expectedTableData = ['Missing', 'osx'];
- await PageObjects.visualize.filterLegend('Other');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.filterLegend('Other');
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should show two levels of other buckets', async () => {
@@ -171,15 +178,15 @@ export default function({ getService, getPageObjects }) {
'Other',
];
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field geo.src');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.toggleOtherBucket(3);
- await PageObjects.visualize.toggleMissingBucket(3);
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.toggleOtherBucket(3);
+ await PageObjects.visEditor.toggleMissingBucket(3);
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
});
@@ -187,17 +194,17 @@ export default function({ getService, getPageObjects }) {
describe('disabled aggs', () => {
before(async () => {
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
});
it('should show correct result with one agg disabled', async () => {
const expectedTableData = ['win 8', 'win xp', 'win 7', 'ios', 'osx'];
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleDisabledAgg(2);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleDisabledAgg(2);
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
@@ -206,15 +213,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
const expectedTableData = ['win 8', 'win xp', 'win 7', 'ios', 'osx'];
await pieChart.expectPieChartLabels(expectedTableData);
});
it('should show correct result when agg is re-enabled', async () => {
- await PageObjects.visualize.toggleDisabledAgg(2);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleDisabledAgg(2);
+ await PageObjects.visEditor.clickGo();
const expectedTableData = [
'0',
@@ -291,24 +298,24 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"US"');
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"US"');
log.debug('Add new filter');
- await PageObjects.visualize.addNewFilterAggregation();
+ await PageObjects.visEditor.addNewFilterAggregation();
log.debug('Set the 2nd filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"CN"', 1);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"CN"', 1);
+ await PageObjects.visEditor.clickGo();
const emptyFromTime = 'Sep 19, 2016 @ 06:31:44.000';
const emptyToTime = 'Sep 23, 2016 @ 18:31:44.000';
log.debug(
'Switch to a different time range from "' + emptyFromTime + '" to "' + emptyToTime + '"'
);
await PageObjects.timePicker.setAbsoluteRange(emptyFromTime, emptyToTime);
- await PageObjects.visualize.waitForVisualization();
- await PageObjects.visualize.expectError();
+ await PageObjects.visChart.waitForVisualization();
+ await PageObjects.visChart.expectError();
});
});
describe('multi series slice', () => {
@@ -327,22 +334,22 @@ export default function({ getService, getPageObjects }) {
);
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Click field memory');
- await PageObjects.visualize.selectField('memory');
+ await PageObjects.visEditor.selectField('memory');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
log.debug('setNumericInterval 4000');
- await PageObjects.visualize.setNumericInterval('40000');
+ await PageObjects.visEditor.setInterval('40000', { type: 'numeric' });
log.debug('Toggle previous editor');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.clickGo();
});
it('should show correct chart', async () => {
@@ -428,11 +435,11 @@ export default function({ getService, getPageObjects }) {
'360,000',
'CN',
];
- await PageObjects.visualize.filterLegend('CN');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.filterLegend('CN');
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('geo.dest');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should still showing pie chart when a subseries have zero data', async function() {
@@ -442,21 +449,21 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"US"');
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"US"');
log.debug('Toggle previous editor');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('Add a new series, select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value of the aggregation id 3');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"UX"', 0, 3);
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"UX"', 0, 3);
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = ['geo.dest:"US"', 'geo.dest:"UX"'];
expect(legends).to.eql(expectedLegends);
});
@@ -469,15 +476,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split chart');
- await PageObjects.visualize.clickBucket('Split chart');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.clickBucket('Split chart');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('Add a new series, select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.clickGo();
});
it('shows correct split chart', async () => {
@@ -522,7 +529,7 @@ export default function({ getService, getPageObjects }) {
['ios', '478', 'CN', '478'],
['osx', '228', 'CN', '228'],
];
- await PageObjects.visualize.filterLegend('CN');
+ await PageObjects.visChart.filterLegend('CN');
await PageObjects.header.waitUntilLoadingHasFinished();
await inspector.open();
await inspector.setTablePageSize(50);
diff --git a/test/functional/apps/visualize/_point_series_options.js b/test/functional/apps/visualize/_point_series_options.js
index 2d496cb575db7..e7ce5808554b4 100644
--- a/test/functional/apps/visualize/_point_series_options.js
+++ b/test/functional/apps/visualize/_point_series_options.js
@@ -25,11 +25,12 @@ export default function({ getService, getPageObjects }) {
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const PageObjects = getPageObjects([
- 'common',
'visualize',
'header',
'pointSeries',
'timePicker',
+ 'visEditor',
+ 'visChart',
]);
const pointSeriesVis = PageObjects.pointSeries;
const inspector = getService('inspector');
@@ -42,18 +43,18 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// add another metrics
log.debug('Metric = Value Axis');
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
log.debug('Aggregation = Average');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
log.debug('Field = memory');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
// go to options page
log.debug('Going to axis options');
await pointSeriesVis.clickAxisOptions();
@@ -61,11 +62,11 @@ export default function({ getService, getPageObjects }) {
log.debug('adding axis');
await pointSeriesVis.clickAddAxis();
// set average count to use second value axis
- await PageObjects.visualize.toggleAccordion('visEditorSeriesAccordion3');
+ await PageObjects.visEditor.toggleAccordion('visEditorSeriesAccordion3');
log.debug('Average memory value axis - ValueAxis-2');
await pointSeriesVis.setSeriesAxis(1, 'ValueAxis-2');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
}
describe('point series', function describeIndexTests() {
@@ -129,14 +130,14 @@ export default function({ getService, getPageObjects }) {
];
await retry.try(async () => {
- const data = await PageObjects.visualize.getLineChartData('Count');
+ const data = await PageObjects.visChart.getLineChartData('Count');
log.debug('count data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues[0]);
});
await retry.try(async () => {
- const avgMemoryData = await PageObjects.visualize.getLineChartData(
+ const avgMemoryData = await PageObjects.visChart.getLineChartData(
'Average machine.ram',
'ValueAxis-2'
);
@@ -158,7 +159,7 @@ export default function({ getService, getPageObjects }) {
describe('multiple chart types', function() {
it('should change average series type to histogram', async function() {
await pointSeriesVis.setSeriesType(1, 'histogram');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const length = await pointSeriesVis.getHistogramSeries();
expect(length).to.be(1);
});
@@ -166,12 +167,12 @@ export default function({ getService, getPageObjects }) {
describe('grid lines', function() {
before(async function() {
- await pointSeriesVis.clickOptions();
+ await PageObjects.visEditor.clickOptionsTab();
});
it('should show category grid lines', async function() {
await pointSeriesVis.toggleGridCategoryLines();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const gridLines = await pointSeriesVis.getGridLines();
expect(gridLines.length).to.be(9);
gridLines.forEach(gridLine => {
@@ -182,7 +183,7 @@ export default function({ getService, getPageObjects }) {
it('should show value axis grid lines', async function() {
await pointSeriesVis.setGridValueAxis('ValueAxis-2');
await pointSeriesVis.toggleGridCategoryLines();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const gridLines = await pointSeriesVis.getGridLines();
expect(gridLines.length).to.be(9);
gridLines.forEach(gridLine => {
@@ -199,36 +200,36 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickLineChart();
await PageObjects.visualize.clickNewSearch();
- await PageObjects.visualize.selectYAxisAggregation('Average', 'bytes', customLabel, 1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions('ValueAxis-1');
+ await PageObjects.visEditor.selectYAxisAggregation('Average', 'bytes', customLabel, 1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions('ValueAxis-1');
});
it('should render a custom label when one is set', async function() {
- const title = await PageObjects.visualize.getYAxisTitle();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(customLabel);
});
it('should render a custom axis title when one is set, overriding the custom label', async function() {
await pointSeriesVis.setAxisTitle(axisTitle);
- await PageObjects.visualize.clickGo();
- const title = await PageObjects.visualize.getYAxisTitle();
+ await PageObjects.visEditor.clickGo();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(axisTitle);
});
it('should preserve saved axis titles after a vis is saved and reopened', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccess(visName);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await PageObjects.visualize.loadSavedVisualization(visName);
- await PageObjects.visualize.waitForRenderingCount();
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.setCustomLabel('test', 1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions('ValueAxis-1');
- const title = await PageObjects.visualize.getYAxisTitle();
+ await PageObjects.visChart.waitForRenderingCount();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.setCustomLabel('test', 1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions('ValueAxis-1');
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(axisTitle);
});
});
@@ -238,7 +239,7 @@ export default function({ getService, getPageObjects }) {
it('should show round labels in default timezone', async function() {
await initChart();
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels.join()).to.contain(expectedLabels.join());
});
@@ -248,7 +249,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.header.awaitKibanaChrome();
await initChart();
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels.join()).to.contain(expectedLabels.join());
});
@@ -258,10 +259,10 @@ export default function({ getService, getPageObjects }) {
const toTime = 'Sep 22, 2015 @ 16:08:34.554';
// note that we're setting the absolute time range while we're in 'America/Phoenix' tz
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
await retry.waitFor('wait for x-axis labels to match expected for Phoenix', async () => {
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
log.debug(`Labels: ${labels}`);
return (
labels.toString() === ['10:00', '11:00', '12:00', '13:00', '14:00', '15:00'].toString()
@@ -303,11 +304,11 @@ export default function({ getService, getPageObjects }) {
await browser.refresh();
// wait some time before trying to check for rendering count
await PageObjects.header.awaitKibanaChrome();
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
log.debug('getXAxisLabels');
await retry.waitFor('wait for x-axis labels to match expected for UTC', async () => {
- const labels2 = await PageObjects.visualize.getXAxisLabels();
+ const labels2 = await PageObjects.visChart.getXAxisLabels();
log.debug(`Labels: ${labels2}`);
return (
labels2.toString() === ['17:00', '18:00', '19:00', '20:00', '21:00', '22:00'].toString()
diff --git a/test/functional/apps/visualize/_region_map.js b/test/functional/apps/visualize/_region_map.js
index f6c81dab5921f..10cbd9913c70c 100644
--- a/test/functional/apps/visualize/_region_map.js
+++ b/test/functional/apps/visualize/_region_map.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const log = getService('log');
const find = getService('find');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'settings']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'timePicker']);
before(async function() {
log.debug('navigateToApp visualize');
@@ -34,12 +34,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Shape field');
- await PageObjects.visualize.clickBucket('Shape field');
+ await PageObjects.visEditor.clickBucket('Shape field');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = geo.src');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.clickGo();
});
describe('vector map', function indexPatternCreation() {
@@ -60,26 +60,26 @@ export default function({ getService, getPageObjects }) {
});
it('should change results after changing layer to world', async function() {
- await PageObjects.visualize.clickOptions();
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectLayer',
'World Countries'
);
//ensure all fields are there
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-2 code'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-3 code'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'name'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-2 code'
);
diff --git a/test/functional/apps/visualize/_tag_cloud.js b/test/functional/apps/visualize/_tag_cloud.js
index 97b8036b30503..4f921cec1fdf1 100644
--- a/test/functional/apps/visualize/_tag_cloud.js
+++ b/test/functional/apps/visualize/_tag_cloud.js
@@ -26,7 +26,16 @@ export default function({ getService, getPageObjects }) {
const browser = getService('browser');
const retry = getService('retry');
const find = getService('find');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'settings',
+ 'timePicker',
+ 'tagCloud',
+ ]);
describe('tag cloud chart', function() {
const vizName1 = 'Visualization tagCloud';
@@ -40,15 +49,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select Tags');
- await PageObjects.visualize.clickBucket('Tags');
+ await PageObjects.visEditor.clickBucket('Tags');
log.debug('Click aggregation Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field machine.ram');
await retry.try(async function tryingForTime() {
- await PageObjects.visualize.selectField(termsField);
+ await PageObjects.visEditor.selectField(termsField);
});
- await PageObjects.visualize.selectOrderByMetric(2, '_key');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectOrderByMetric(2, '_key');
+ await PageObjects.visEditor.clickGo();
});
it('should have inspector enabled', async function() {
@@ -56,7 +65,7 @@ export default function({ getService, getPageObjects }) {
});
it('should show correct tag cloud data', async function() {
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql([
'32,212,254,720',
@@ -69,22 +78,22 @@ export default function({ getService, getPageObjects }) {
it('should collapse the sidebar', async function() {
const editorSidebar = await find.byCssSelector('.collapsible-sidebar');
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
const afterSize = await editorSidebar.getSize();
expect(afterSize.width).to.be(0);
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
});
it('should still show all tags after sidebar has been collapsed', async function() {
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql([
'32,212,254,720',
@@ -100,7 +109,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.common.sleep(1000);
await browser.setWindowSize(1200, 800);
await PageObjects.common.sleep(1000);
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
expect(data).to.eql([
'32,212,254,720',
'21,474,836,480',
@@ -114,11 +123,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should show the tags and relative size', function() {
- return PageObjects.visualize.getTextSizes().then(function(results) {
+ return PageObjects.tagCloud.getTextSizes().then(function(results) {
log.debug('results here ' + results);
expect(results).to.eql(['72px', '63px', '25px', '32px', '18px']);
});
@@ -153,7 +162,7 @@ export default function({ getService, getPageObjects }) {
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
after(async function() {
@@ -168,15 +177,15 @@ export default function({ getService, getPageObjects }) {
});
it('should format tags with field formatter', async function() {
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql(['30GB', '20GB', '19GB', '18GB', '17GB']);
});
it('should apply filter with unformatted value', async function() {
- await PageObjects.visualize.selectTagCloudTag('30GB');
+ await PageObjects.tagCloud.selectTagCloudTag('30GB');
await PageObjects.header.waitUntilLoadingHasFinished();
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
expect(data).to.eql(['30GB']);
});
});
diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js
index e2946339b1f08..397eaeb0f3013 100644
--- a/test/functional/apps/visualize/_tile_map.js
+++ b/test/functional/apps/visualize/_tile_map.js
@@ -27,7 +27,14 @@ export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'settings']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ 'tileMap',
+ ]);
describe('tile map visualize app', function() {
describe('incomplete config', function describeIndexTests() {
@@ -45,8 +52,8 @@ export default function({ getService, getPageObjects }) {
it('should be able to zoom in twice', async () => {
//should not throw
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
});
});
@@ -61,14 +68,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Geo Coordinates');
- await PageObjects.visualize.clickBucket('Geo coordinates');
+ await PageObjects.visEditor.clickBucket('Geo coordinates');
log.debug('Click aggregation Geohash');
- await PageObjects.visualize.selectAggregation('Geohash');
+ await PageObjects.visEditor.selectAggregation('Geohash');
log.debug('Click field geo.coordinates');
await retry.try(async function tryingForTime() {
- await PageObjects.visualize.selectField('geo.coordinates');
+ await PageObjects.visEditor.selectField('geo.coordinates');
});
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
/**
@@ -106,9 +113,9 @@ export default function({ getService, getPageObjects }) {
['-', '8', '108', { lat: 18, lon: -157 }],
];
//level 1
- await PageObjects.visualize.clickMapZoomOut();
+ await PageObjects.tileMap.clickMapZoomOut();
//level 0
- await PageObjects.visualize.clickMapZoomOut();
+ await PageObjects.tileMap.clickMapZoomOut();
await inspector.open();
await inspector.setTablePageSize(50);
@@ -118,8 +125,8 @@ export default function({ getService, getPageObjects }) {
});
it('should not be able to zoom out beyond 0', async function() {
- await PageObjects.visualize.zoomAllTheWayOut();
- const enabled = await PageObjects.visualize.getMapZoomOutEnabled();
+ await PageObjects.tileMap.zoomAllTheWayOut();
+ const enabled = await PageObjects.tileMap.getMapZoomOutEnabled();
expect(enabled).to.be(false);
});
@@ -148,7 +155,7 @@ export default function({ getService, getPageObjects }) {
['-', 'b7', '167', { lat: 64, lon: -163 }],
];
- await PageObjects.visualize.clickMapFitDataBounds();
+ await PageObjects.tileMap.clickMapFitDataBounds();
await inspector.open();
const data = await inspector.getTableData();
await inspector.close();
@@ -164,8 +171,8 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('bytes', 'is between', '19980', '19990');
await filterBar.toggleFilterPinned('bytes');
- await PageObjects.visualize.zoomAllTheWayOut();
- await PageObjects.visualize.clickMapFitDataBounds();
+ await PageObjects.tileMap.zoomAllTheWayOut();
+ await PageObjects.tileMap.clickMapFitDataBounds();
await inspector.open();
const data = await inspector.getTableData();
@@ -178,15 +185,15 @@ export default function({ getService, getPageObjects }) {
it('Newly saved visualization retains map bounds', async () => {
const vizName1 = 'Visualization TileMap';
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
- const mapBounds = await PageObjects.visualize.getMapBounds();
+ const mapBounds = await PageObjects.tileMap.getMapBounds();
await inspector.close();
await PageObjects.visualize.saveVisualizationExpectSuccess(vizName1);
- const afterSaveMapBounds = await PageObjects.visualize.getMapBounds();
+ const afterSaveMapBounds = await PageObjects.tileMap.getMapBounds();
await inspector.close();
// For some reason the values are slightly different, so we can't check that they are equal. But we did
@@ -207,17 +214,17 @@ export default function({ getService, getPageObjects }) {
});
it('when not checked does not add filters to aggregation', async () => {
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.setIsFilteredByCollarCheckbox(false);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.setIsFilteredByCollarCheckbox(false);
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableHeaders(['geohash_grid', 'Count', 'Geo Centroid']);
await inspector.close();
});
after(async () => {
- await PageObjects.visualize.setIsFilteredByCollarCheckbox(true);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setIsFilteredByCollarCheckbox(true);
+ await PageObjects.visEditor.clickGo();
});
});
});
@@ -245,18 +252,18 @@ export default function({ getService, getPageObjects }) {
const zoomLevel = 9;
for (let i = 0; i < zoomLevel; i++) {
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
}
});
beforeEach(async function() {
- await PageObjects.visualize.clickMapZoomIn(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomIn(waitForLoading);
});
afterEach(async function() {
if (!last) {
await PageObjects.common.sleep(toastDefaultLife);
- await PageObjects.visualize.clickMapZoomOut(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomOut(waitForLoading);
}
});
@@ -270,11 +277,11 @@ export default function({ getService, getPageObjects }) {
it('should suppress zoom warning if suppress warnings button clicked', async () => {
last = true;
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await find.clickByCssSelector('[data-test-subj="suppressZoomWarnings"]');
- await PageObjects.visualize.clickMapZoomOut(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomOut(waitForLoading);
await testSubjects.waitForDeleted('suppressZoomWarnings');
- await PageObjects.visualize.clickMapZoomIn(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomIn(waitForLoading);
await testSubjects.missingOrFail('maxZoomWarning');
});
diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts
index 3ce12a49a1daa..0204e5d74bb80 100644
--- a/test/functional/apps/visualize/_tsvb_chart.ts
+++ b/test/functional/apps/visualize/_tsvb_chart.ts
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const log = getService('log');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker', 'visChart']);
describe('visual builder', function describeIndexTests() {
this.tags('smoke');
@@ -80,7 +80,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should verify gauge label and count display', async () => {
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const labelString = await PageObjects.visualBuilder.getGaugeLabel();
expect(labelString).to.be('Count');
const gaugeCount = await PageObjects.visualBuilder.getGaugeCount();
@@ -96,7 +96,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should verify topN label and count display', async () => {
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const labelString = await PageObjects.visualBuilder.getTopNLabel();
expect(labelString).to.be('Count');
const gaugeCount = await PageObjects.visualBuilder.getTopNCount();
diff --git a/test/functional/apps/visualize/_tsvb_table.ts b/test/functional/apps/visualize/_tsvb_table.ts
index a36b6facb3039..5808212559b18 100644
--- a/test/functional/apps/visualize/_tsvb_table.ts
+++ b/test/functional/apps/visualize/_tsvb_table.ts
@@ -21,7 +21,11 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
export default function({ getPageObjects }: FtrProviderContext) {
- const { visualBuilder, visualize } = getPageObjects(['visualBuilder', 'visualize']);
+ const { visualBuilder, visualize, visChart } = getPageObjects([
+ 'visualBuilder',
+ 'visualize',
+ 'visChart',
+ ]);
describe('visual builder', function describeIndexTests() {
describe('table', () => {
@@ -32,7 +36,7 @@ export default function({ getPageObjects }: FtrProviderContext) {
await visualBuilder.checkTableTabIsPresent();
await visualBuilder.selectGroupByField('machine.os.raw');
await visualBuilder.setColumnLabelValue('OS');
- await visualize.waitForVisualizationRenderingStabilized();
+ await visChart.waitForVisualizationRenderingStabilized();
});
it('should display correct values on changing group by field and column name', async () => {
diff --git a/test/functional/apps/visualize/_vega_chart.js b/test/functional/apps/visualize/_vega_chart.js
index 224dec7ef2a71..df0603c7f95f5 100644
--- a/test/functional/apps/visualize/_vega_chart.js
+++ b/test/functional/apps/visualize/_vega_chart.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['common', 'header', 'timePicker', 'visualize']);
+ const PageObjects = getPageObjects(['timePicker', 'visualize', 'visChart', 'vegaChart']);
const filterBar = getService('filterBar');
const inspector = getService('inspector');
const log = getService('log');
@@ -40,7 +40,7 @@ export default function({ getService, getPageObjects }) {
});
it.skip('should have some initial vega spec text', async function() {
- const vegaSpec = await PageObjects.visualize.getVegaSpec();
+ const vegaSpec = await PageObjects.vegaChart.getSpec();
expect(vegaSpec)
.to.contain('{')
.and.to.contain('data');
@@ -48,7 +48,7 @@ export default function({ getService, getPageObjects }) {
});
it('should have view and control containers', async function() {
- const view = await PageObjects.visualize.getVegaViewContainer();
+ const view = await PageObjects.vegaChart.getViewContainer();
expect(view).to.be.ok();
const size = await view.getSize();
expect(size)
@@ -57,7 +57,7 @@ export default function({ getService, getPageObjects }) {
expect(size.width).to.be.above(0);
expect(size.height).to.be.above(0);
- const controls = await PageObjects.visualize.getVegaControlContainer();
+ const controls = await PageObjects.vegaChart.getControlContainer();
expect(controls).to.be.ok();
});
});
@@ -73,9 +73,9 @@ export default function({ getService, getPageObjects }) {
});
it.skip('should render different data in response to filter change', async function() {
- await PageObjects.visualize.expectVisToMatchScreenshot('vega_chart');
+ await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart');
await filterBar.addFilter('@tags.raw', 'is', 'error');
- await PageObjects.visualize.expectVisToMatchScreenshot('vega_chart_filtered');
+ await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart_filtered');
});
});
});
diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js
index 9828c5718db17..a13ac3012e829 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart.js
@@ -23,8 +23,9 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
const inspector = getService('inspector');
+ const testSubjects = getService('testSubjects');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('vertical bar chart', function() {
const vizName1 = 'Visualization VerticalBarChart';
@@ -37,13 +38,13 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// leaving Interval set to Auto
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
};
before(initBarChart);
@@ -52,7 +53,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -91,7 +92,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -202,15 +203,15 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.clickDropPartialBuckets();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.clickDropPartialBuckets();
+ await PageObjects.visEditor.clickGo();
expectedChartValues = [
218,
@@ -278,7 +279,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -290,13 +291,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -322,9 +323,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -350,10 +351,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -369,18 +370,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -397,9 +398,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -408,11 +409,11 @@ export default function({ getService, getPageObjects }) {
describe('vertical bar in percent mode', async () => {
it('should show ticks with percentage values', async function() {
const axisId = 'ValueAxis-1';
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisMode('percentage');
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisMode('percentage');
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
expect(labels[0]).to.eql('0%');
expect(labels[labels.length - 1]).to.eql('100%');
});
@@ -422,36 +423,36 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['200', '404', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should allow custom sorting of series', async () => {
- await PageObjects.visualize.toggleOpenEditor(1, 'false');
- await PageObjects.visualize.selectCustomSortMetric(3, 'Min', 'bytes');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(1, 'false');
+ await PageObjects.visEditor.selectCustomSortMetric(3, 'Min', 'bytes');
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['404', '200', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should correctly filter by legend', async () => {
- await PageObjects.visualize.filterLegend('200');
- await PageObjects.visualize.waitForVisualization();
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visChart.filterLegend('200');
+ await PageObjects.visChart.waitForVisualization();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
const expectedEntries = ['200'];
expect(legendEntries).to.eql(expectedEntries);
await filterBar.removeFilter('response.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
});
@@ -459,18 +460,18 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
-
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = [
'200 - win 8',
@@ -489,18 +490,18 @@ export default function({ getService, getPageObjects }) {
'404 - win 8',
'404 - win xp',
];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show correct series when disabling first agg', async function() {
// this will avoid issues with the play tooltip covering the disable agg button
- await PageObjects.visualize.scrollSubjectIntoView('metricsAggGroup');
- await PageObjects.visualize.toggleDisabledAgg(3);
- await PageObjects.visualize.clickGo();
+ await testSubjects.scrollIntoView('metricsAggGroup');
+ await PageObjects.visEditor.toggleDisabledAgg(3);
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -509,24 +510,24 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.selectAggregation('Derivative', 'metrics');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.selectAggregation('Derivative', 'metrics');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['Derivative of Count'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show an error if last bucket aggregation is terms', async () => {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
- const errorMessage = await PageObjects.visualize.getBucketErrorMessage();
+ const errorMessage = await PageObjects.visEditor.getBucketErrorMessage();
expect(errorMessage).to.contain('Last bucket aggregation must be "Date Histogram"');
});
});
diff --git a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
index ddfe80635c509..5a7e86d1a107f 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
@@ -23,7 +23,7 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'header', 'visEditor', 'visChart']);
describe.skip('vertical bar chart with index without time filter', function() {
const vizName1 = 'Visualization VerticalBarChart without time filter';
@@ -38,13 +38,13 @@ export default function({ getService, getPageObjects }) {
);
await PageObjects.common.sleep(500);
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setCustomInterval('3h');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('3h', { type: 'custom' });
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
};
before(initBarChart);
@@ -53,7 +53,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -92,7 +92,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -133,13 +133,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -165,9 +165,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -193,10 +193,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -212,18 +212,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -240,9 +240,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -252,18 +252,18 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['200', '404', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -272,20 +272,20 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os');
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = [
@@ -305,17 +305,17 @@ export default function({ getService, getPageObjects }) {
'404 - win 8',
'404 - win xp',
];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show correct series when disabling first agg', async function() {
- await PageObjects.visualize.toggleDisabledAgg(3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleDisabledAgg(3);
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -324,17 +324,17 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.selectAggregation('Derivative', 'metrics');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.selectAggregation('Derivative', 'metrics');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['Derivative of Count'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
diff --git a/test/functional/apps/visualize/_visualize_listing.js b/test/functional/apps/visualize/_visualize_listing.js
index 63a8a8310d2c1..e277c3c7d104d 100644
--- a/test/functional/apps/visualize/_visualize_listing.js
+++ b/test/functional/apps/visualize/_visualize_listing.js
@@ -19,8 +19,9 @@
import expect from '@kbn/expect';
-export default function({ getPageObjects }) {
- const PageObjects = getPageObjects(['visualize', 'header', 'common']);
+export default function({ getService, getPageObjects }) {
+ const PageObjects = getPageObjects(['visualize', 'visEditor']);
+ const listingTable = getService('listingTable');
// FLAKY: https://github.com/elastic/kibana/issues/40912
describe.skip('visualize listing page', function describeIndexTests() {
@@ -36,7 +37,7 @@ export default function({ getPageObjects }) {
// type markdown is used for simplicity
await PageObjects.visualize.createSimpleMarkdownViz(vizName);
await PageObjects.visualize.gotoVisualizationLandingPage();
- const visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ const visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(1);
});
@@ -45,11 +46,11 @@ export default function({ getPageObjects }) {
await PageObjects.visualize.createSimpleMarkdownViz(vizName + '2');
await PageObjects.visualize.gotoVisualizationLandingPage();
- let visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ let visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(3);
await PageObjects.visualize.deleteAllVisualizations();
- visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(0);
});
});
@@ -60,45 +61,45 @@ export default function({ getPageObjects }) {
await PageObjects.visualize.gotoVisualizationLandingPage();
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickMarkdownWidget();
- await PageObjects.visualize.setMarkdownTxt('HELLO');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setMarkdownTxt('HELLO');
+ await PageObjects.visEditor.clickGo();
await PageObjects.visualize.saveVisualization('Hello World');
await PageObjects.visualize.gotoVisualizationLandingPage();
});
it('matches on the first word', async function() {
- await PageObjects.visualize.searchForItemWithName('Hello');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('Hello');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('matches the second word', async function() {
- await PageObjects.visualize.searchForItemWithName('World');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('World');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('matches the second word prefix', async function() {
- await PageObjects.visualize.searchForItemWithName('Wor');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('Wor');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('does not match mid word', async function() {
- await PageObjects.visualize.searchForItemWithName('orld');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('orld');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(0);
});
it('is case insensitive', async function() {
- await PageObjects.visualize.searchForItemWithName('hello world');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('hello world');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('is using AND operator', async function() {
- await PageObjects.visualize.searchForItemWithName('hello banana');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('hello banana');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(0);
});
});
diff --git a/test/functional/apps/visualize/input_control_vis/chained_controls.js b/test/functional/apps/visualize/input_control_vis/chained_controls.js
index 96d9dae519b51..b56a37218aba5 100644
--- a/test/functional/apps/visualize/input_control_vis/chained_controls.js
+++ b/test/functional/apps/visualize/input_control_vis/chained_controls.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const testSubjects = getService('testSubjects');
const find = getService('find');
const comboBox = getService('comboBox');
@@ -65,7 +65,7 @@ export default function({ getService, getPageObjects }) {
it('should create a seperate filter pill for parent control and child control', async () => {
await comboBox.set('listControlSelect1', '14.61.182.136');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasParentControlFilter = await filterBar.hasFilter('geo.src', 'BR');
expect(hasParentControlFilter).to.equal(true);
diff --git a/test/functional/apps/visualize/input_control_vis/dynamic_options.js b/test/functional/apps/visualize/input_control_vis/dynamic_options.js
index 2354855f12079..d78c780a728a7 100644
--- a/test/functional/apps/visualize/input_control_vis/dynamic_options.js
+++ b/test/functional/apps/visualize/input_control_vis/dynamic_options.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const comboBox = getService('comboBox');
describe('dynamic options', () => {
@@ -55,7 +55,7 @@ export default function({ getService, getPageObjects }) {
it('should not fetch new options when non-string is filtered', async () => {
await comboBox.set('fieldSelect-0', 'clientip');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const initialOptions = await comboBox.getOptionsList('listControlSelect0');
expect(
diff --git a/test/functional/apps/visualize/input_control_vis/input_control_options.js b/test/functional/apps/visualize/input_control_vis/input_control_options.js
index 1c3f63e94ae75..8e8891ac585b3 100644
--- a/test/functional/apps/visualize/input_control_vis/input_control_options.js
+++ b/test/functional/apps/visualize/input_control_vis/input_control_options.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const testSubjects = getService('testSubjects');
const inspector = getService('inspector');
const find = getService('find');
@@ -38,11 +38,11 @@ export default function({ getService, getPageObjects }) {
'Jan 1, 2017 @ 00:00:00.000',
'Jan 1, 2017 @ 00:00:00.000'
);
- await PageObjects.visualize.clickVisEditorTab('controls');
- await PageObjects.visualize.addInputControl();
+ await PageObjects.visEditor.clickVisEditorTab('controls');
+ await PageObjects.visEditor.addInputControl();
await comboBox.set('indexPatternSelect-0', 'logstash- ');
await comboBox.set('fieldSelect-0', FIELD_NAME);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should not have inspector enabled', async function() {
@@ -89,7 +89,7 @@ export default function({ getService, getPageObjects }) {
});
it('should add filter pill when submit button is clicked', async () => {
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilter).to.equal(true);
@@ -98,7 +98,7 @@ export default function({ getService, getPageObjects }) {
it('should replace existing filter pill(s) when new item is selected', async () => {
await comboBox.clear('listControlSelect0');
await comboBox.set('listControlSelect0', 'osx');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
await PageObjects.common.sleep(1000);
const hasOldFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
@@ -117,11 +117,11 @@ export default function({ getService, getPageObjects }) {
it('should clear form when Clear button is clicked but not remove filter pill', async () => {
await comboBox.set('listControlSelect0', 'ios');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilterBeforeClearBtnClicked = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilterBeforeClearBtnClicked).to.equal(true);
- await PageObjects.visualize.inputControlClear();
+ await PageObjects.visEditor.inputControlClear();
const hasValue = await comboBox.doesComboBoxHaveSelectedOptions('listControlSelect0');
expect(hasValue).to.equal(false);
@@ -130,7 +130,7 @@ export default function({ getService, getPageObjects }) {
});
it('should remove filter pill when cleared form is submitted', async () => {
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilter).to.equal(false);
});
@@ -138,17 +138,17 @@ export default function({ getService, getPageObjects }) {
describe('updateFiltersOnChange is true', () => {
before(async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.checkSwitch('inputControlEditorUpdateFiltersOnChangeCheckbox');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await PageObjects.visEditor.checkSwitch('inputControlEditorUpdateFiltersOnChangeCheckbox');
+ await PageObjects.visEditor.clickGo();
});
after(async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.uncheckSwitch(
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await PageObjects.visEditor.uncheckSwitch(
'inputControlEditorUpdateFiltersOnChangeCheckbox'
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should not display staging control buttons', async () => {
@@ -173,9 +173,9 @@ export default function({ getService, getPageObjects }) {
describe('useTimeFilter', () => {
it('should use global time filter when getting terms', async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.checkCheckbox('inputControlEditorUseTimeFilterCheckbox');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await testSubjects.setCheckbox('inputControlEditorUseTimeFilterCheckbox', 'check');
+ await PageObjects.visEditor.clickGo();
// Expect control to be disabled because no terms could be gathered with time filter applied
const input = await find.byCssSelector('[data-test-subj="inputControl0"] input');
diff --git a/test/functional/apps/visualize/input_control_vis/input_control_range.ts b/test/functional/apps/visualize/input_control_vis/input_control_range.ts
index 2d6550de5dec9..f48ba7b54daf1 100644
--- a/test/functional/apps/visualize/input_control_vis/input_control_range.ts
+++ b/test/functional/apps/visualize/input_control_vis/input_control_range.ts
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const find = getService('find');
- const { visualize } = getPageObjects(['visualize']);
+ const { visualize, visEditor } = getPageObjects(['visualize', 'visEditor']);
describe('input control range', () => {
before(async () => {
@@ -35,36 +35,22 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should add filter with scripted field', async () => {
- await visualize.addInputControl('range');
- await visualize.setFilterParams({
- indexPattern: 'kibana_sample_data_flights',
- field: 'hour_of_day',
- });
- await visualize.clickGo();
- await visualize.setFilterRange({
- min: '7',
- max: '10',
- });
- await visualize.inputControlSubmit();
+ await visEditor.addInputControl('range');
+ await visEditor.setFilterParams(0, 'kibana_sample_data_flights', 'hour_of_day');
+ await visEditor.clickGo();
+ await visEditor.setFilterRange(0, '7', '10');
+ await visEditor.inputControlSubmit();
const controlFilters = await find.allByCssSelector('[data-test-subj^="filter"]');
expect(controlFilters).to.have.length(1);
expect(await controlFilters[0].getVisibleText()).to.equal('hour_of_day: 7 to 10');
});
it('should add filter with price field', async () => {
- await visualize.addInputControl('range');
- await visualize.setFilterParams({
- aggNth: 1,
- indexPattern: 'kibana_sample_data_flights',
- field: 'AvgTicketPrice',
- });
- await visualize.clickGo();
- await visualize.setFilterRange({
- aggNth: 1,
- min: '400',
- max: '999',
- });
- await visualize.inputControlSubmit();
+ await visEditor.addInputControl('range');
+ await visEditor.setFilterParams(1, 'kibana_sample_data_flights', 'AvgTicketPrice');
+ await visEditor.clickGo();
+ await visEditor.setFilterRange(1, '400', '999');
+ await visEditor.inputControlSubmit();
const controlFilters = await find.allByCssSelector('[data-test-subj^="filter"]');
expect(controlFilters).to.have.length(2);
expect(await controlFilters[1].getVisibleText()).to.equal('AvgTicketPrice: $400 to $999');
diff --git a/test/functional/page_objects/index.ts b/test/functional/page_objects/index.ts
index 5a104c8d17bf2..5526243ea2bbd 100644
--- a/test/functional/page_objects/index.ts
+++ b/test/functional/page_objects/index.ts
@@ -39,7 +39,6 @@ import { NewsfeedPageProvider } from './newsfeed_page';
import { PointSeriesPageProvider } from './point_series_page';
// @ts-ignore not TS yet
import { SettingsPageProvider } from './settings_page';
-// @ts-ignore not TS yet
import { SharePageProvider } from './share_page';
// @ts-ignore not TS yet
import { ShieldPageProvider } from './shield_page';
@@ -48,8 +47,12 @@ import { TimePickerPageProvider } from './time_picker';
// @ts-ignore not TS yet
import { TimelionPageProvider } from './timelion_page';
import { VisualBuilderPageProvider } from './visual_builder_page';
-// @ts-ignore not TS yet
import { VisualizePageProvider } from './visualize_page';
+import { VisualizeEditorPageProvider } from './visualize_editor_page';
+import { VisualizeChartPageProvider } from './visualize_chart_page';
+import { TileMapPageProvider } from './tile_map_page';
+import { TagCloudPageProvider } from './tag_cloud_page';
+import { VegaChartPageProvider } from './vega_chart_page';
export const pageObjects = {
common: CommonPageProvider,
@@ -70,4 +73,9 @@ export const pageObjects = {
timePicker: TimePickerPageProvider,
visualBuilder: VisualBuilderPageProvider,
visualize: VisualizePageProvider,
+ visEditor: VisualizeEditorPageProvider,
+ visChart: VisualizeChartPageProvider,
+ tileMap: TileMapPageProvider,
+ tagCloud: TagCloudPageProvider,
+ vegaChart: VegaChartPageProvider,
};
diff --git a/test/functional/page_objects/point_series_page.js b/test/functional/page_objects/point_series_page.js
index 9172809eb73e5..74bf07b59bc38 100644
--- a/test/functional/page_objects/point_series_page.js
+++ b/test/functional/page_objects/point_series_page.js
@@ -23,10 +23,6 @@ export function PointSeriesPageProvider({ getService }) {
const find = getService('find');
class PointSeriesVis {
- async clickOptions() {
- return await testSubjects.click('visEditorTaboptions');
- }
-
async clickAxisOptions() {
return await testSubjects.click('visEditorTabadvanced');
}
diff --git a/test/functional/page_objects/share_page.ts b/test/functional/page_objects/share_page.ts
index 906effcb54a26..fc8db9b78a03f 100644
--- a/test/functional/page_objects/share_page.ts
+++ b/test/functional/page_objects/share_page.ts
@@ -19,10 +19,9 @@
import { FtrProviderContext } from '../ftr_provider_context';
-export function SharePageProvider({ getService, getPageObjects }: FtrProviderContext) {
+export function SharePageProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const find = getService('find');
- const PageObjects = getPageObjects(['visualize', 'common']);
const log = getService('log');
class SharePage {
@@ -78,7 +77,7 @@ export function SharePageProvider({ getService, getPageObjects }: FtrProviderCon
async checkShortenUrl() {
const shareForm = await testSubjects.find('shareUrlForm');
- await PageObjects.visualize.checkCheckbox('useShortUrl');
+ await testSubjects.setCheckbox('useShortUrl', 'check');
await shareForm.waitForDeletedByCssSelector('.euiLoadingSpinner');
}
diff --git a/test/functional/page_objects/tag_cloud_page.ts b/test/functional/page_objects/tag_cloud_page.ts
new file mode 100644
index 0000000000000..7d87caa39b2fb
--- /dev/null
+++ b/test/functional/page_objects/tag_cloud_page.ts
@@ -0,0 +1,52 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { FtrProviderContext } from '../ftr_provider_context';
+import { WebElementWrapper } from '../services/lib/web_element_wrapper';
+
+export function TagCloudPageProvider({ getService, getPageObjects }: FtrProviderContext) {
+ const find = getService('find');
+ const testSubjects = getService('testSubjects');
+ const { header, visChart } = getPageObjects(['header', 'visChart']);
+
+ class TagCloudPage {
+ public async selectTagCloudTag(tagDisplayText: string) {
+ await testSubjects.click(tagDisplayText);
+ await header.waitUntilLoadingHasFinished();
+ }
+
+ public async getTextTag() {
+ await visChart.waitForVisualization();
+ const elements = await find.allByCssSelector('text');
+ return await Promise.all(elements.map(async element => await element.getVisibleText()));
+ }
+
+ public async getTextSizes() {
+ const tags = await find.allByCssSelector('text');
+ async function returnTagSize(tag: WebElementWrapper) {
+ const style = await tag.getAttribute('style');
+ const fontSize = style.match(/font-size: ([^;]*);/);
+ return fontSize ? fontSize[1] : '';
+ }
+ return await Promise.all(tags.map(returnTagSize));
+ }
+ }
+
+ return new TagCloudPage();
+}
diff --git a/test/functional/page_objects/tile_map_page.ts b/test/functional/page_objects/tile_map_page.ts
new file mode 100644
index 0000000000000..b41578f782af4
--- /dev/null
+++ b/test/functional/page_objects/tile_map_page.ts
@@ -0,0 +1,102 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { FtrProviderContext } from '../ftr_provider_context';
+
+export function TileMapPageProvider({ getService, getPageObjects }: FtrProviderContext) {
+ const find = getService('find');
+ const testSubjects = getService('testSubjects');
+ const retry = getService('retry');
+ const log = getService('log');
+ const inspector = getService('inspector');
+ const { header } = getPageObjects(['header']);
+
+ class TileMapPage {
+ public async getZoomSelectors(zoomSelector: string) {
+ return await find.allByCssSelector(zoomSelector);
+ }
+
+ public async clickMapButton(zoomSelector: string, waitForLoading?: boolean) {
+ await retry.try(async () => {
+ const zooms = await this.getZoomSelectors(zoomSelector);
+ await Promise.all(zooms.map(async zoom => await zoom.click()));
+ if (waitForLoading) {
+ await header.waitUntilLoadingHasFinished();
+ }
+ });
+ }
+
+ public async getVisualizationRequest() {
+ log.debug('getVisualizationRequest');
+ await inspector.open();
+ await testSubjects.click('inspectorViewChooser');
+ await testSubjects.click('inspectorViewChooserRequests');
+ await testSubjects.click('inspectorRequestDetailRequest');
+ return await testSubjects.getVisibleText('inspectorRequestBody');
+ }
+
+ public async getMapBounds(): Promise