Skip to content

Commit

Permalink
Fix/re enable skipped functional tests (#41238) (#41442)
Browse files Browse the repository at this point in the history
* [home/_sample_data] unskip tests

* [visualize/_tsvb_chart] unskip switch index pattern test

* unskip nodes filter test

* run specific groups 10x times

* Revert "run specific groups 10x times"

This reverts commit ad7302f.
  • Loading branch information
dmlemeshko committed Jul 18, 2019
1 parent 7e740ae commit a5c5901
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 35 deletions.
28 changes: 12 additions & 16 deletions test/functional/apps/home/_sample_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import expect from '@kbn/expect';
export default function ({ getService, getPageObjects }) {
const retry = getService('retry');
const find = getService('find');
const log = getService('log');
const pieChart = getService('pieChart');
const renderable = getService('renderable');
const dashboardExpect = getService('dashboardExpect');
Expand Down Expand Up @@ -94,27 +95,22 @@ export default function ({ getService, getPageObjects }) {
});


it.skip('pie charts rendered', async () => {
await pieChart.expectPieSliceCount(4);
});
it('should render visualizations', async () => {
await PageObjects.home.launchSampleDataSet('flights');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();

it.skip('area, bar and heatmap charts rendered', async () => {
log.debug('Checking pie charts rendered');
await pieChart.expectPieSliceCount(4);
log.debug('Checking area, bar and heatmap charts rendered');
await dashboardExpect.seriesElementCount(15);
});

it.skip('saved searches render', async () => {
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(50);
});

it.skip('input controls render', async () => {
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
});

it.skip('tag cloud renders', async () => {
log.debug('Checking tag cloud rendered');
await dashboardExpect.tagCloudWithValuesFound(['Sunny', 'Rain', 'Clear', 'Cloudy', 'Hail']);
});

it.skip('vega chart renders', async () => {
log.debug('Checking vega chart rendered');
const tsvb = await find.existsByCssSelector('.vgaVis__view');
expect(tsvb).to.be(true);
});
Expand Down
15 changes: 5 additions & 10 deletions test/functional/apps/visualize/_tsvb_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,27 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe.skip('switch index patterns', () => {
before(async () => {
describe('switch index patterns', () => {
beforeEach(async () => {
log.debug('Load kibana_sample_data_flights data');
await esArchiver.loadIfNeeded('kibana_sample_data_flights');
await PageObjects.visualBuilder.resetPage(
'2015-09-19 06:31:44.000',
'2018-10-31 00:0:00.000'
);
await PageObjects.visualBuilder.resetPage();
await PageObjects.visualBuilder.clickMetric();
await PageObjects.visualBuilder.checkMetricTabIsPresent();
});
after(async () => {
await esArchiver.unload('kibana_sample_data_flights');
});
it('should be able to switch between index patterns', async () => {
const expectedMetricValue = '156';
const value = await PageObjects.visualBuilder.getMetricValue();
log.debug(`metric value: ${value}`);
expect(value).to.eql(expectedMetricValue);
expect(value).to.eql('156');
await PageObjects.visualBuilder.clickMetricPanelOptions();
const fromTime = '2018-10-22 00:00:00.000';
const toTime = '2018-10-28 23:59:59.999';
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.visualBuilder.setIndexPatternValue('kibana_sample_data_flights');
await PageObjects.visualBuilder.selectIndexPatternTimeField('timestamp');
const newValue = await PageObjects.visualBuilder.getMetricValue();
log.debug(`metric value: ${newValue}`);
expect(newValue).to.eql('10');
});
});
Expand Down
9 changes: 2 additions & 7 deletions test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
}

public async clickMetricPanelOptions() {
const button = await testSubjects.find('metricEditorPanelOptionsBtn');
await button.click();
await testSubjects.click('metricEditorPanelOptionsBtn');
await PageObjects.header.waitUntilLoadingHasFinished();
}

Expand All @@ -401,11 +400,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
}

public async selectIndexPatternTimeField(timeField: string) {
const el = await testSubjects.find('comboBoxSearchInput');
await el.clearValue();
await el.type(timeField);
await el.pressKeys(browser.keys.RETURN);
await PageObjects.header.waitUntilLoadingHasFinished();
await comboBox.set('metricsIndexPatternFieldsSelect', timeField);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ export default function ({ getService, getPageObjects }) {
});
});

// Skip until https://github.com/elastic/eui/issues/1318 is implemented
it.skip('should filter for specific indices', async () => {
it('should filter for specific indices', async () => {
await nodesList.setFilter('01');
const rows = await nodesList.getRows();
expect(rows.length).to.be(1);
Expand Down

0 comments on commit a5c5901

Please sign in to comment.