From 0e808a2b33423dc0a966a1d435b5d4e040fbe338 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Wed, 6 Nov 2024 14:53:06 +0100 Subject: [PATCH] remove non-needed code --- .../apps/lens/group1/smokescreen.ts | 5 +---- .../apps/lens/group2/field_formatters.ts | 8 +------ .../test/functional/apps/lens/group2/index.ts | 4 ---- .../apps/lens/group2/layer_actions.ts | 5 +---- .../functional/apps/lens/group2/partition.ts | 4 ++-- .../apps/lens/group2/persistent_context.ts | 1 + .../test/functional/apps/lens/group2/table.ts | 5 +---- .../apps/lens/group2/table_dashboard.ts | 10 +-------- .../apps/lens/group3/add_to_dashboard.ts | 21 +++++++------------ .../lens/group3/dashboard_inline_editing.ts | 6 +----- .../apps/lens/group3/epoch_millis.ts | 3 +-- .../apps/lens/group3/runtime_fields.ts | 10 +-------- .../test/functional/apps/lens/group3/terms.ts | 10 +-------- .../functional/apps/lens/group4/chart_data.ts | 3 +-- .../apps/lens/group4/color_mapping.ts | 3 +-- .../functional/apps/lens/group4/colors.ts | 5 +---- .../functional/apps/lens/group4/dashboard.ts | 1 - .../test/functional/apps/lens/group4/share.ts | 3 +-- .../apps/lens/group4/show_underlying_data.ts | 21 +++++++------------ .../group4/show_underlying_data_dashboard.ts | 6 +----- .../functional/apps/lens/group4/time_shift.ts | 7 ++----- .../apps/lens/group5/drag_and_drop.ts | 14 +++---------- .../functional/apps/lens/group5/formula.ts | 10 +-------- .../test/functional/apps/lens/group5/gauge.ts | 3 +-- .../functional/apps/lens/group5/heatmap.ts | 8 +------ .../functional/apps/lens/group5/tagcloud.ts | 4 +--- .../apps/lens/group6/annotations.ts | 14 +------------ .../apps/lens/group6/disable_auto_apply.ts | 5 +---- .../functional/apps/lens/group6/inspector.ts | 3 +-- .../apps/lens/group6/legacy_metric.ts | 10 +-------- .../apps/lens/group6/lens_reporting.ts | 6 ++---- .../apps/lens/group6/lens_tagging.ts | 8 +------ .../functional/apps/lens/group6/metric.ts | 10 +-------- .../apps/lens/group6/reference_lines.ts | 5 +---- .../functional/apps/lens/group6/rollup.ts | 4 +--- .../apps/lens/group6/workspace_size.ts | 3 +-- .../apps/lens/open_in_lens/agg_based/gauge.ts | 4 +--- .../apps/lens/open_in_lens/agg_based/goal.ts | 4 +--- .../lens/open_in_lens/agg_based/heatmap.ts | 4 +--- .../lens/open_in_lens/agg_based/metric.ts | 4 +--- .../lens/open_in_lens/agg_based/navigation.ts | 3 +-- .../apps/lens/open_in_lens/agg_based/pie.ts | 2 +- .../apps/lens/open_in_lens/agg_based/table.ts | 4 +--- .../apps/lens/open_in_lens/agg_based/xy.ts | 5 ++--- 44 files changed, 62 insertions(+), 216 deletions(-) diff --git a/x-pack/test/functional/apps/lens/group1/smokescreen.ts b/x-pack/test/functional/apps/lens/group1/smokescreen.ts index 5cb1e3583db6c..68d9f1ee9345d 100644 --- a/x-pack/test/functional/apps/lens/group1/smokescreen.ts +++ b/x-pack/test/functional/apps/lens/group1/smokescreen.ts @@ -10,7 +10,7 @@ import { range } from 'lodash'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const find = getService('find'); const listingTable = getService('listingTable'); const testSubjects = getService('testSubjects'); @@ -20,9 +20,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const config = getService('config'); describe('lens smokescreen tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should allow creation of lens xy chart', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group2/field_formatters.ts b/x-pack/test/functional/apps/lens/group2/field_formatters.ts index e7007c7e24604..e5fe83c72cc45 100644 --- a/x-pack/test/functional/apps/lens/group2/field_formatters.ts +++ b/x-pack/test/functional/apps/lens/group2/field_formatters.ts @@ -10,12 +10,7 @@ import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, header, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'header', - 'timePicker', - ]); + const { visualize, lens, header } = getPageObjects(['visualize', 'lens', 'header']); const retry = getService('retry'); const fieldEditor = getService('fieldEditor'); const dataViews = getService('dataViews'); @@ -25,7 +20,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await lens.switchToVisualization('lnsDatatable'); }); diff --git a/x-pack/test/functional/apps/lens/group2/index.ts b/x-pack/test/functional/apps/lens/group2/index.ts index 8d74dd4930b89..f8e123839e2b8 100644 --- a/x-pack/test/functional/apps/lens/group2/index.ts +++ b/x-pack/test/functional/apps/lens/group2/index.ts @@ -13,7 +13,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext const log = getService('log'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const { timePicker } = getPageObjects(['timePicker']); describe('lens app - group 2', () => { const esArchive = 'x-pack/test/functional/es_archives/logstash_functional'; @@ -36,8 +35,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext fixtureDirs = localFixtures; indexPatternString = localIndexPatternString; await esNode.load(esArchive); - // changing the timepicker default here saves us from having to set it in Discover (~8s) - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update({ defaultIndex: indexPatternString, 'dateFormat:tz': 'UTC', @@ -48,7 +45,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext after(async () => { await esNode.unload(esArchive); - await timePicker.resetDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.importExport.unload(fixtureDirs.lensBasic); await kibanaServer.importExport.unload(fixtureDirs.lensDefault); await kibanaServer.savedObjects.cleanStandardList(); diff --git a/x-pack/test/functional/apps/lens/group2/layer_actions.ts b/x-pack/test/functional/apps/lens/group2/layer_actions.ts index dc3e669d18a26..4417a5ecbadec 100644 --- a/x-pack/test/functional/apps/lens/group2/layer_actions.ts +++ b/x-pack/test/functional/apps/lens/group2/layer_actions.ts @@ -9,15 +9,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const find = getService('find'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); describe('lens layer actions tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should allow creation of lens xy chart', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group2/partition.ts b/x-pack/test/functional/apps/lens/group2/partition.ts index 02f1c58f70d52..f828c65eab284 100644 --- a/x-pack/test/functional/apps/lens/group2/partition.ts +++ b/x-pack/test/functional/apps/lens/group2/partition.ts @@ -9,14 +9,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const testSubjects = getService('testSubjects'); describe('lens partition charts', () => { before(async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); + await lens.goToTimeRange(); }); it('should be able to nest up to 3 levels for Pie charts', async () => { diff --git a/x-pack/test/functional/apps/lens/group2/persistent_context.ts b/x-pack/test/functional/apps/lens/group2/persistent_context.ts index cb3c2037f651d..db91d2d53c0e6 100644 --- a/x-pack/test/functional/apps/lens/group2/persistent_context.ts +++ b/x-pack/test/functional/apps/lens/group2/persistent_context.ts @@ -36,6 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await timePicker.resetDefaultAbsoluteRangeViaUiSettings(); }); describe('Navigation search', () => { diff --git a/x-pack/test/functional/apps/lens/group2/table.ts b/x-pack/test/functional/apps/lens/group2/table.ts index d1531cf231461..c359039bae343 100644 --- a/x-pack/test/functional/apps/lens/group2/table.ts +++ b/x-pack/test/functional/apps/lens/group2/table.ts @@ -9,16 +9,13 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const listingTable = getService('listingTable'); const find = getService('find'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); describe('lens datatable', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should able to sort a table by a column', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsXYvis'); diff --git a/x-pack/test/functional/apps/lens/group2/table_dashboard.ts b/x-pack/test/functional/apps/lens/group2/table_dashboard.ts index 77291fe347f52..097bd1539ff81 100644 --- a/x-pack/test/functional/apps/lens/group2/table_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group2/table_dashboard.ts @@ -9,12 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { lens, visualize, dashboard, timePicker } = getPageObjects([ - 'lens', - 'visualize', - 'dashboard', - 'timePicker', - ]); + const { lens, visualize, dashboard } = getPageObjects(['lens', 'visualize', 'dashboard']); const listingTable = getService('listingTable'); const retry = getService('retry'); @@ -40,9 +35,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; describe('lens table on dashboard', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should sort a table by column in dashboard edit mode', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsXYvis'); diff --git a/x-pack/test/functional/apps/lens/group3/add_to_dashboard.ts b/x-pack/test/functional/apps/lens/group3/add_to_dashboard.ts index 11be375ba6066..433fc2dbc943f 100644 --- a/x-pack/test/functional/apps/lens/group3/add_to_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group3/add_to_dashboard.ts @@ -9,16 +9,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { dashboard, visualize, lens, timeToVisualize, common, header, timePicker } = - getPageObjects([ - 'dashboard', - 'visualize', - 'lens', - 'timeToVisualize', - 'common', - 'header', - 'timePicker', - ]); + const { dashboard, visualize, lens, timeToVisualize, common, header } = getPageObjects([ + 'dashboard', + 'visualize', + 'lens', + 'timeToVisualize', + 'common', + 'header', + ]); const find = getService('find'); const listingTable = getService('listingTable'); const dashboardAddPanel = getService('dashboardAddPanel'); @@ -62,9 +60,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; describe('lens add-to-dashboards tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should allow new lens to be added by value to a new dashboard', async () => { await createNewLens(); await lens.save('New Lens from Modal', false, false, false, 'new'); diff --git a/x-pack/test/functional/apps/lens/group3/dashboard_inline_editing.ts b/x-pack/test/functional/apps/lens/group3/dashboard_inline_editing.ts index bee26829d1b65..3790c22c377be 100644 --- a/x-pack/test/functional/apps/lens/group3/dashboard_inline_editing.ts +++ b/x-pack/test/functional/apps/lens/group3/dashboard_inline_editing.ts @@ -7,12 +7,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { dashboard, visualize, lens, timeToVisualize, timePicker } = getPageObjects([ + const { dashboard, visualize, lens, timeToVisualize } = getPageObjects([ 'dashboard', 'visualize', 'lens', 'timeToVisualize', - 'timePicker', ]); const find = getService('find'); const log = getService('log'); @@ -43,9 +42,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; describe('lens inline editing tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should allow inline editing of a by value visualization', async () => { await createNewLens(); await lens.save('New Lens from Modal', false, false, false, 'new'); diff --git a/x-pack/test/functional/apps/lens/group3/epoch_millis.ts b/x-pack/test/functional/apps/lens/group3/epoch_millis.ts index 4be779b818286..23a1254c1aa24 100644 --- a/x-pack/test/functional/apps/lens/group3/epoch_millis.ts +++ b/x-pack/test/functional/apps/lens/group3/epoch_millis.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -19,7 +19,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/lens/epoch_millis.json' ); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); }); after(async () => { diff --git a/x-pack/test/functional/apps/lens/group3/runtime_fields.ts b/x-pack/test/functional/apps/lens/group3/runtime_fields.ts index bc742cf8686e7..26c2134a68e10 100644 --- a/x-pack/test/functional/apps/lens/group3/runtime_fields.ts +++ b/x-pack/test/functional/apps/lens/group3/runtime_fields.ts @@ -9,21 +9,13 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, header, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'header', - 'timePicker', - ]); + const { visualize, lens, header } = getPageObjects(['visualize', 'lens', 'header']); const filterBar = getService('filterBar'); const fieldEditor = getService('fieldEditor'); const retry = getService('retry'); const dataViews = getService('dataViews'); describe('lens runtime fields', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should be able to add runtime field and use it', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group3/terms.ts b/x-pack/test/functional/apps/lens/group3/terms.ts index 17db9a2d56252..5c7f2c8669381 100644 --- a/x-pack/test/functional/apps/lens/group3/terms.ts +++ b/x-pack/test/functional/apps/lens/group3/terms.ts @@ -10,12 +10,7 @@ import moment from 'moment'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, common, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'common', - 'timePicker', - ]); + const { visualize, lens, common } = getPageObjects(['visualize', 'lens', 'common']); const elasticChart = getService('elasticChart'); const testSubjects = getService('testSubjects'); const comboBox = getService('comboBox'); @@ -26,9 +21,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); describe('lens terms', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); describe('lens multi terms suite', () => { it('should allow creation of lens xy chart with multi terms categories', async () => { await visualize.navigateToNewVisualization(); diff --git a/x-pack/test/functional/apps/lens/group4/chart_data.ts b/x-pack/test/functional/apps/lens/group4/chart_data.ts index a9f2e7e776bbd..3b3a51c289473 100644 --- a/x-pack/test/functional/apps/lens/group4/chart_data.ts +++ b/x-pack/test/functional/apps/lens/group4/chart_data.ts @@ -11,12 +11,11 @@ import { range } from 'lodash'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const elasticChart = getService('elasticChart'); describe('lens chart data', () => { before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test/functional/apps/lens/group4/color_mapping.ts b/x-pack/test/functional/apps/lens/group4/color_mapping.ts index d22f505410939..008ffa1cb53e1 100644 --- a/x-pack/test/functional/apps/lens/group4/color_mapping.ts +++ b/x-pack/test/functional/apps/lens/group4/color_mapping.ts @@ -15,12 +15,11 @@ import { import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const elasticChart = getService('elasticChart'); describe('lens color mapping', () => { before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test/functional/apps/lens/group4/colors.ts b/x-pack/test/functional/apps/lens/group4/colors.ts index 7dc06bbd6cb85..5c5bbea4ba2c5 100644 --- a/x-pack/test/functional/apps/lens/group4/colors.ts +++ b/x-pack/test/functional/apps/lens/group4/colors.ts @@ -8,12 +8,9 @@ import { ElasticBrandPalette } from '@kbn/coloring'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); describe('lens color palette tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should allow to pick legacy color palette in xy chart', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group4/dashboard.ts b/x-pack/test/functional/apps/lens/group4/dashboard.ts index d2a180179fdc7..670ee2cb22da5 100644 --- a/x-pack/test/functional/apps/lens/group4/dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/dashboard.ts @@ -50,7 +50,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ], { skipBrowserRefresh: true } ); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); }); after(async () => { await security.testUser.restoreDefaults(); diff --git a/x-pack/test/functional/apps/lens/group4/share.ts b/x-pack/test/functional/apps/lens/group4/share.ts index 5972a77f3195d..94634b093dcc3 100644 --- a/x-pack/test/functional/apps/lens/group4/share.ts +++ b/x-pack/test/functional/apps/lens/group4/share.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const browser = getService('browser'); const filterBarService = getService('filterBar'); const queryBar = getService('queryBar'); @@ -17,7 +17,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('lens share tests', () => { before(async () => { await visualize.gotoVisualizationLandingPage(); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); }); afterEach(async () => { diff --git a/x-pack/test/functional/apps/lens/group4/show_underlying_data.ts b/x-pack/test/functional/apps/lens/group4/show_underlying_data.ts index 843caca698b80..18bd3bb830bba 100644 --- a/x-pack/test/functional/apps/lens/group4/show_underlying_data.ts +++ b/x-pack/test/functional/apps/lens/group4/show_underlying_data.ts @@ -8,16 +8,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, common, header, discover, unifiedFieldList, timePicker } = - getPageObjects([ - 'visualize', - 'lens', - 'common', - 'header', - 'discover', - 'unifiedFieldList', - 'timePicker', - ]); + const { visualize, lens, common, header, discover, unifiedFieldList } = getPageObjects([ + 'visualize', + 'lens', + 'common', + 'header', + 'discover', + 'unifiedFieldList', + ]); const queryBar = getService('queryBar'); const filterBar = getService('filterBar'); const listingTable = getService('listingTable'); @@ -26,9 +24,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); describe('show underlying data', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should show the open button for a compatible saved visualization', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsXYvis'); diff --git a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts index 99e7020d6ce18..40169ef15ccfe 100644 --- a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts @@ -11,14 +11,13 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; const OPEN_IN_DISCOVER_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, dashboard, header, discover, common, timePicker } = getPageObjects([ + const { visualize, lens, dashboard, header, discover, common } = getPageObjects([ 'visualize', 'lens', 'dashboard', 'header', 'discover', 'common', - 'timePicker', ]); const listingTable = getService('listingTable'); @@ -31,9 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); describe('lens show underlying data from dashboard', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should show the open button for a compatible saved visualization', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsXYvis'); diff --git a/x-pack/test/functional/apps/lens/group4/time_shift.ts b/x-pack/test/functional/apps/lens/group4/time_shift.ts index 9de55809ea906..de341945b3f45 100644 --- a/x-pack/test/functional/apps/lens/group4/time_shift.ts +++ b/x-pack/test/functional/apps/lens/group4/time_shift.ts @@ -8,13 +8,10 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); +export default function ({ getPageObjects }: FtrProviderContext) { + const { visualize, lens } = getPageObjects(['visualize', 'lens']); describe('time shift', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should able to configure a shifted metric', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group5/drag_and_drop.ts b/x-pack/test/functional/apps/lens/group5/drag_and_drop.ts index 0b20775870693..1950edc28a9e9 100644 --- a/x-pack/test/functional/apps/lens/group5/drag_and_drop.ts +++ b/x-pack/test/functional/apps/lens/group5/drag_and_drop.ts @@ -9,20 +9,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, header, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'header', - 'timePicker', - ]); + const { visualize, lens, header } = getPageObjects(['visualize', 'lens', 'header']); const listingTable = getService('listingTable'); const xyChartContainer = 'xyVisChart'; describe('lens drag and drop tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); describe('basic drag and drop', () => { it('should construct a bar chart when dropping a field to create top values chart', async () => { await visualize.navigateToNewVisualization(); @@ -34,13 +26,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); expect(await lens.getChartTypeFromChartSwitcher()).to.eql('Bar'); }); - it('should construct a line chart when dropping a time field to create a date histogram chart', async () => { + it('should construct a bar chart when dropping a time field to create a date histogram chart', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await header.waitUntilLoadingHasFinished(); await lens.dragFieldToWorkspace('@timestamp', xyChartContainer); expect(await lens.getDimensionTriggerText('lnsXY_xDimensionPanel')).to.eql('@timestamp'); - expect(await lens.getChartTypeFromChartSwitcher()).to.eql('Line'); + expect(await lens.getChartTypeFromChartSwitcher()).to.eql('Bar'); }); it('should allow dropping fields to existing and empty dimension triggers', async () => { diff --git a/x-pack/test/functional/apps/lens/group5/formula.ts b/x-pack/test/functional/apps/lens/group5/formula.ts index 0ad2d3a6c5854..c12551bed35f6 100644 --- a/x-pack/test/functional/apps/lens/group5/formula.ts +++ b/x-pack/test/functional/apps/lens/group5/formula.ts @@ -9,12 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, common, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'common', - 'timePicker', - ]); + const { visualize, lens, common } = getPageObjects(['visualize', 'lens', 'common']); const find = getService('find'); const listingTable = getService('listingTable'); const browser = getService('browser'); @@ -24,9 +19,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dataViews = getService('dataViews'); describe('lens formula', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should transition from count to formula', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsXYvis'); diff --git a/x-pack/test/functional/apps/lens/group5/gauge.ts b/x-pack/test/functional/apps/lens/group5/gauge.ts index eea38d486833d..6aab255337e7e 100644 --- a/x-pack/test/functional/apps/lens/group5/gauge.ts +++ b/x-pack/test/functional/apps/lens/group5/gauge.ts @@ -10,13 +10,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const elasticChart = getService('elasticChart'); const testSubjects = getService('testSubjects'); describe('lens gauge', () => { before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test/functional/apps/lens/group5/heatmap.ts b/x-pack/test/functional/apps/lens/group5/heatmap.ts index dfd5bfe2242c5..7abcba0cb0780 100644 --- a/x-pack/test/functional/apps/lens/group5/heatmap.ts +++ b/x-pack/test/functional/apps/lens/group5/heatmap.ts @@ -9,12 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, common, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'common', - 'timePicker', - ]); + const { visualize, lens, common } = getPageObjects(['visualize', 'lens', 'common']); const elasticChart = getService('elasticChart'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); @@ -24,7 +19,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await lens.configureDimension({ dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', diff --git a/x-pack/test/functional/apps/lens/group5/tagcloud.ts b/x-pack/test/functional/apps/lens/group5/tagcloud.ts index f6b5f0531e5a9..bab136bcc1c52 100644 --- a/x-pack/test/functional/apps/lens/group5/tagcloud.ts +++ b/x-pack/test/functional/apps/lens/group5/tagcloud.ts @@ -9,19 +9,17 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, header, tagCloud, timePicker } = getPageObjects([ + const { visualize, lens, header, tagCloud } = getPageObjects([ 'visualize', 'lens', 'header', 'tagCloud', - 'timePicker', ]); const elasticChart = getService('elasticChart'); const filterBar = getService('filterBar'); describe('lens tagcloud', () => { before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test/functional/apps/lens/group6/annotations.ts b/x-pack/test/functional/apps/lens/group6/annotations.ts index 694093fc9d39e..6738a0c7fd459 100644 --- a/x-pack/test/functional/apps/lens/group6/annotations.ts +++ b/x-pack/test/functional/apps/lens/group6/annotations.ts @@ -9,12 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker, tagManagement } = getPageObjects([ - 'visualize', - 'lens', - 'timePicker', - 'tagManagement', - ]); + const { visualize, lens, tagManagement } = getPageObjects(['visualize', 'lens', 'tagManagement']); const find = getService('find'); const retry = getService('retry'); const toastsService = getService('toasts'); @@ -22,13 +17,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const listingTable = getService('listingTable'); describe('lens annotations tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); - after(async () => { - await timePicker.resetDefaultAbsoluteRangeViaUiSettings(); - }); - it('should show a disabled annotation layer button if there is no date histogram in data layer', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group6/disable_auto_apply.ts b/x-pack/test/functional/apps/lens/group6/disable_auto_apply.ts index 376340f204a25..56d182e007135 100644 --- a/x-pack/test/functional/apps/lens/group6/disable_auto_apply.ts +++ b/x-pack/test/functional/apps/lens/group6/disable_auto_apply.ts @@ -9,15 +9,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { lens, visualize, timePicker } = getPageObjects(['lens', 'visualize', 'timePicker']); + const { lens, visualize } = getPageObjects(['lens', 'visualize']); const browser = getService('browser'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); describe('lens disable auto-apply tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should persist auto-apply setting across page refresh', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group6/inspector.ts b/x-pack/test/functional/apps/lens/group6/inspector.ts index 3f2715f4f4d05..a21abe85fe73e 100644 --- a/x-pack/test/functional/apps/lens/group6/inspector.ts +++ b/x-pack/test/functional/apps/lens/group6/inspector.ts @@ -8,14 +8,13 @@ import expect from '@kbn/expect'; import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const elasticChart = getService('elasticChart'); const inspector = getService('inspector'); const testSubjects = getService('testSubjects'); describe('lens inspector', () => { before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); await elasticChart.setNewChartUiDebugFlag(true); diff --git a/x-pack/test/functional/apps/lens/group6/legacy_metric.ts b/x-pack/test/functional/apps/lens/group6/legacy_metric.ts index 1a6f7b61b19e1..5385422a7bfef 100644 --- a/x-pack/test/functional/apps/lens/group6/legacy_metric.ts +++ b/x-pack/test/functional/apps/lens/group6/legacy_metric.ts @@ -9,21 +9,13 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, header, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'header', - 'timePicker', - ]); + const { visualize, lens, header } = getPageObjects(['visualize', 'lens', 'header']); const listingTable = getService('listingTable'); const retry = getService('retry'); const filterBar = getService('filterBar'); const testSubjects = getService('testSubjects'); describe('lens legacy metric', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should render a numeric metric', async () => { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('Artistpreviouslyknownaslens'); diff --git a/x-pack/test/functional/apps/lens/group6/lens_reporting.ts b/x-pack/test/functional/apps/lens/group6/lens_reporting.ts index 7ed7569644e7c..5096a94a1af3b 100644 --- a/x-pack/test/functional/apps/lens/group6/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/group6/lens_reporting.ts @@ -9,12 +9,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { common, dashboard, lens, reporting, timePicker, visualize } = getPageObjects([ + const { common, dashboard, lens, reporting, visualize } = getPageObjects([ 'common', 'dashboard', 'lens', 'reporting', - 'timePicker', 'visualize', ]); const es = getService('es'); @@ -29,7 +28,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/lens/reporting' ); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await security.testUser.setRoles( [ 'test_logstash_reader', @@ -43,7 +41,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await kibanaServer.savedObjects.cleanStandardList(); - await timePicker.resetDefaultAbsoluteRangeViaUiSettings(); await es.deleteByQuery({ index: '.reporting-*', refresh: true, @@ -78,6 +75,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.gotoVisualizationLandingPage(); await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); + await lens.goToTimeRange(); await lens.configureDimension({ dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', diff --git a/x-pack/test/functional/apps/lens/group6/lens_tagging.ts b/x-pack/test/functional/apps/lens/group6/lens_tagging.ts index 37657b38e6f1b..b6b441249f21f 100644 --- a/x-pack/test/functional/apps/lens/group6/lens_tagging.ts +++ b/x-pack/test/functional/apps/lens/group6/lens_tagging.ts @@ -16,13 +16,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const find = getService('find'); const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); - const { tagManagement, header, dashboard, visualize, lens, timePicker } = getPageObjects([ + const { tagManagement, header, dashboard, visualize, lens } = getPageObjects([ 'tagManagement', 'header', 'dashboard', 'visualize', 'lens', - 'timePicker', ]); const lensTag = 'extreme-lens-tag'; @@ -31,16 +30,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('lens tagging', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await dashboard.navigateToApp(); await dashboard.preserveCrossAppState(); await dashboard.clickNewDashboard(); }); - after(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); - it('adds a new tag to a Lens visualization', async () => { // create lens await dashboardAddPanel.clickCreateNewLink(); diff --git a/x-pack/test/functional/apps/lens/group6/metric.ts b/x-pack/test/functional/apps/lens/group6/metric.ts index 6e914649d4f0b..03ca571c48d00 100644 --- a/x-pack/test/functional/apps/lens/group6/metric.ts +++ b/x-pack/test/functional/apps/lens/group6/metric.ts @@ -9,12 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, common, timePicker } = getPageObjects([ - 'visualize', - 'lens', - 'common', - 'timePicker', - ]); + const { visualize, lens, common } = getPageObjects(['visualize', 'lens', 'common']); const testSubjects = getService('testSubjects'); const filterBar = getService('filterBar'); const retry = getService('retry'); @@ -78,9 +73,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; describe('lens metric', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should render a metric', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group6/reference_lines.ts b/x-pack/test/functional/apps/lens/group6/reference_lines.ts index 309d4d005aeec..b1d4a3e77ee3c 100644 --- a/x-pack/test/functional/apps/lens/group6/reference_lines.ts +++ b/x-pack/test/functional/apps/lens/group6/reference_lines.ts @@ -9,15 +9,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const find = getService('find'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); describe('lens reference lines tests', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - }); it('should show a disabled reference layer button if no data dimension is defined', async () => { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); diff --git a/x-pack/test/functional/apps/lens/group6/rollup.ts b/x-pack/test/functional/apps/lens/group6/rollup.ts index 923edcfb54eaa..0e37a4672d1a6 100644 --- a/x-pack/test/functional/apps/lens/group6/rollup.ts +++ b/x-pack/test/functional/apps/lens/group6/rollup.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const find = getService('find'); const listingTable = getService('listingTable'); const esArchiver = getService('esArchiver'); @@ -22,13 +22,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/rollup/config.json' ); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/lens/rollup/data'); await kibanaServer.savedObjects.cleanStandardList(); - await timePicker.resetDefaultAbsoluteRangeViaUiSettings(); }); it('should allow creation of lens xy chart', async () => { diff --git a/x-pack/test/functional/apps/lens/group6/workspace_size.ts b/x-pack/test/functional/apps/lens/group6/workspace_size.ts index d9b054ffbe5df..9ae8f21cebf69 100644 --- a/x-pack/test/functional/apps/lens/group6/workspace_size.ts +++ b/x-pack/test/functional/apps/lens/group6/workspace_size.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const browser = getService('browser'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); @@ -44,7 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.navigateToNewVisualization(); await visualize.clickVisType('lens'); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); // Detect here if the Chrome bug is present, and adjust the aspect ratio accordingly if not if (!within(width, DEFAULT_WINDOW_SIZE[0]) || !within(height, DEFAULT_WINDOW_SIZE[1])) { const { width: containerWidth, height: containerHeight } = diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts index 8a0cd091bb85d..14a172a70a0ce 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts @@ -10,10 +10,9 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, lens, timePicker, visEditor, visChart } = getPageObjects([ + const { visualize, lens, visEditor, visChart } = getPageObjects([ 'visualize', 'lens', - 'timePicker', 'visEditor', 'visChart', ]); @@ -32,7 +31,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickGauge(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); await elasticChart.setNewChartUiDebugFlag(true); }); diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts index 9d547f60c3def..cdeb8c3f0c325 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts @@ -9,11 +9,10 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, lens, visChart, timePicker, visEditor } = getPageObjects([ + const { visualize, lens, visChart, visEditor } = getPageObjects([ 'visualize', 'lens', 'visChart', - 'timePicker', 'visEditor', ]); @@ -30,7 +29,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickGoal(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should show the "Edit Visualization in Lens" menu item', async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts index dbc02a11c9c80..64f3863bcdd1f 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts @@ -9,11 +9,10 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects }: FtrProviderContext) { - const { visualize, lens, visChart, timePicker, visEditor } = getPageObjects([ + const { visualize, lens, visChart, visEditor } = getPageObjects([ 'visualize', 'lens', 'visChart', - 'timePicker', 'visEditor', ]); @@ -28,7 +27,6 @@ export default function ({ getPageObjects }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickHeatmapChart(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should show the "Edit Visualization in Lens" menu item if no X-axis was specified', async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts index 8d966bf24e7a2..c211f5bf49019 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts @@ -9,12 +9,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visEditor, visualize, lens, timePicker, visChart } = getPageObjects([ + const { visEditor, visualize, lens, visChart } = getPageObjects([ 'visEditor', 'visualize', 'visChart', 'lens', - 'timePicker', ]); const testSubjects = getService('testSubjects'); @@ -31,7 +30,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickMetric(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should show the "Edit Visualization in Lens" menu item', async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/navigation.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/navigation.ts index 1eb41d6dc86c8..d76a2ec0154bc 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/navigation.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/navigation.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); + const { visualize, lens } = getPageObjects(['visualize', 'lens']); const testSubjects = getService('testSubjects'); const retry = getService('retry'); @@ -20,7 +20,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickLineChart(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should let the user return back to Visualize if no changes were made', async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts index 5d075a5bca88b..bff13856e64df 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts @@ -13,8 +13,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'visualize', 'lens', 'visEditor', - 'timePicker', 'header', + 'timePicker', ]); const pieChart = getService('pieChart'); diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts index 56a4ad07285f5..a48485c2f8470 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts @@ -9,11 +9,10 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, visEditor, lens, timePicker, header } = getPageObjects([ + const { visualize, visEditor, lens, header } = getPageObjects([ 'visualize', 'lens', 'visEditor', - 'timePicker', 'header', ]); @@ -31,7 +30,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickDataTable(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should not allow converting of unsupported aggregations', async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts index c615bb9a1b52f..5b9df27008d8b 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts @@ -9,11 +9,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const { visualize, visEditor, lens, timePicker, header, visChart } = getPageObjects([ + const { visualize, visEditor, lens, header, visChart } = getPageObjects([ 'visualize', 'lens', 'visEditor', - 'timePicker', + 'header', 'visChart', ]); @@ -32,7 +32,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visualize.navigateToNewAggBasedVisualization(); await visualize.clickLineChart(); await visualize.clickNewSearch(); - await timePicker.setDefaultAbsoluteRange(); }); it('should show the "Edit Visualization in Lens" menu item', async () => {