diff --git a/test/functional/apps/visualize/_vega_chart.ts b/test/functional/apps/visualize/_vega_chart.ts index 25906a4dffebb..62db1686806aa 100644 --- a/test/functional/apps/visualize/_vega_chart.ts +++ b/test/functional/apps/visualize/_vega_chart.ts @@ -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'); }); }); }); diff --git a/test/functional/page_objects/vega_chart_page.ts b/test/functional/page_objects/vega_chart_page.ts index 8535b62d435f2..b9906911b00f1 100644 --- a/test/functional/page_objects/vega_chart_page.ts +++ b/test/functional/page_objects/vega_chart_page.ts @@ -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() {