Skip to content

Commit

Permalink
remove non-needed code
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Nov 7, 2024
1 parent 37afb90 commit 0e808a2
Show file tree
Hide file tree
Showing 44 changed files with 62 additions and 216 deletions.
5 changes: 1 addition & 4 deletions x-pack/test/functional/apps/lens/group1/smokescreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down
8 changes: 1 addition & 7 deletions x-pack/test/functional/apps/lens/group2/field_formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
});

Expand Down
4 changes: 0 additions & 4 deletions x-pack/test/functional/apps/lens/group2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
Expand All @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/functional/apps/lens/group2/layer_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/lens/group2/partition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await security.testUser.restoreDefaults();
await timePicker.resetDefaultAbsoluteRangeViaUiSettings();
});

describe('Navigation search', () => {
Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/functional/apps/lens/group2/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 1 addition & 9 deletions x-pack/test/functional/apps/lens/group2/table_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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');
Expand Down
21 changes: 8 additions & 13 deletions x-pack/test/functional/apps/lens/group3/add_to_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/lens/group3/epoch_millis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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 () => {
Expand Down
10 changes: 1 addition & 9 deletions x-pack/test/functional/apps/lens/group3/runtime_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 1 addition & 9 deletions x-pack/test/functional/apps/lens/group3/terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/lens/group4/chart_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/lens/group4/color_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/functional/apps/lens/group4/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion x-pack/test/functional/apps/lens/group4/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
],
{ skipBrowserRefresh: true }
);
await timePicker.setDefaultAbsoluteRangeViaUiSettings();
});
after(async () => {
await security.testUser.restoreDefaults();
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/lens/group4/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +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 browser = getService('browser');
const filterBarService = getService('filterBar');
const queryBar = getService('queryBar');

describe('lens share tests', () => {
before(async () => {
await visualize.gotoVisualizationLandingPage();
await timePicker.setDefaultAbsoluteRangeViaUiSettings();
});

afterEach(async () => {
Expand Down
21 changes: 8 additions & 13 deletions x-pack/test/functional/apps/lens/group4/show_underlying_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down
Loading

0 comments on commit 0e808a2

Please sign in to comment.