Skip to content

Commit

Permalink
relax tests and remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jul 17, 2020
1 parent f42ab29 commit 68bcb46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
29 changes: 6 additions & 23 deletions test/functional/apps/visualize/_vega_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await PageObjects.vegaChart.typeInSpec('"config": { "kibana": {"renderer": "svg"} },');
await PageObjects.visEditor.clickGo();
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
expect(await PageObjects.vegaChart.getYAxisLabels()).to.eql([
'0',
'200',
'400',
'600',
'800',
'1,000',
'1,200',
'1,400',
'1,600',
]);
const fullDataLabels = await PageObjects.vegaChart.getYAxisLabels();
expect(fullDataLabels[0]).to.eql('0');
expect(fullDataLabels[fullDataLabels.length - 1]).to.eql('1,600');
await filterBar.addFilter('@tags.raw', 'is', 'error');
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
expect(await PageObjects.vegaChart.getYAxisLabels()).to.eql([
'0',
'10',
'20',
'30',
'40',
'50',
'60',
'70',
'80',
'90',
]);
const filteredDataLabels = await PageObjects.vegaChart.getYAxisLabels();
expect(filteredDataLabels[0]).to.eql('0');
expect(filteredDataLabels[filteredDataLabels.length - 1]).to.eql('90');
});
});
});
Expand Down
7 changes: 1 addition & 6 deletions test/functional/page_objects/vega_chart_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,17 @@
* under the License.
*/

import expect from '@kbn/expect';
import { Key } from 'selenium-webdriver';
import { FtrProviderContext } from '../ftr_provider_context';
import { pageObjects } from '.';

export function VegaChartPageProvider({
getService,
getPageObjects,
updateBaselines,
}: FtrProviderContext & { updateBaselines: boolean }) {
const find = getService('find');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const screenshot = getService('screenshots');
const log = getService('log');
const { visEditor, visChart, common } = getPageObjects(['common', 'visEditor', 'visChart']);
const { common } = getPageObjects(['common']);

class VegaChartPage {
public async getSpec() {
Expand Down

0 comments on commit 68bcb46

Please sign in to comment.