|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the Elastic License |
| 4 | + * 2.0; you may not use this file except in compliance with the Elastic License |
| 5 | + * 2.0. |
| 6 | + */ |
| 7 | + |
| 8 | +import { FtrProviderContext } from '../../../ftr_provider_context'; |
| 9 | + |
| 10 | +export default function ({ getService, getPageObjects }: FtrProviderContext) { |
| 11 | + const { visualize, lens, timePicker } = getPageObjects(['visualize', 'lens', 'timePicker']); |
| 12 | + const testSubjects = getService('testSubjects'); |
| 13 | + const inspector = getService('inspector'); |
| 14 | + |
| 15 | + describe('Inspector', () => { |
| 16 | + it('should allow switch between table page', async () => { |
| 17 | + await visualize.navigateToNewVisualization(); |
| 18 | + await visualize.clickVisType('lens'); |
| 19 | + await timePicker.setDefaultAbsoluteRange(); |
| 20 | + |
| 21 | + await lens.configureDimension({ |
| 22 | + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', |
| 23 | + operation: 'date_histogram', |
| 24 | + field: '@timestamp', |
| 25 | + }); |
| 26 | + |
| 27 | + await lens.configureDimension({ |
| 28 | + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', |
| 29 | + operation: 'average', |
| 30 | + field: 'bytes', |
| 31 | + }); |
| 32 | + |
| 33 | + await lens.configureDimension({ |
| 34 | + dimension: 'lnsXY_splitDimensionPanel > lns-empty-dimension', |
| 35 | + operation: 'terms', |
| 36 | + field: 'geo.dest', |
| 37 | + }); |
| 38 | + |
| 39 | + await inspector.open('lnsApp_inspectButton'); |
| 40 | + await inspector.setTablePageSize(10); |
| 41 | + |
| 42 | + await inspector.expectTableData([ |
| 43 | + ['BT', '2015-09-19 06:00', '-'], |
| 44 | + ['BT', '2015-09-19 09:00', '-'], |
| 45 | + ['BT', '2015-09-19 12:00', '-'], |
| 46 | + ['BT', '2015-09-19 15:00', '-'], |
| 47 | + ['BT', '2015-09-19 18:00', '-'], |
| 48 | + ['BT', '2015-09-19 21:00', '-'], |
| 49 | + ['BT', '2015-09-20 00:00', '-'], |
| 50 | + ['BT', '2015-09-20 03:00', '-'], |
| 51 | + ['BT', '2015-09-20 06:00', '-'], |
| 52 | + ['BT', '2015-09-20 09:00', '-'], |
| 53 | + ]); |
| 54 | + await testSubjects.click('pagination-button-1'); |
| 55 | + await inspector.expectTableData([ |
| 56 | + ['BT', '2015-09-20 12:00', '-'], |
| 57 | + ['BT', '2015-09-20 15:00', '-'], |
| 58 | + ['BT', '2015-09-20 18:00', '-'], |
| 59 | + ['BT', '2015-09-20 21:00', '-'], |
| 60 | + ['BT', '2015-09-21 00:00', '-'], |
| 61 | + ['BT', '2015-09-21 03:00', '-'], |
| 62 | + ['BT', '2015-09-21 06:00', '-'], |
| 63 | + ['BT', '2015-09-21 09:00', '-'], |
| 64 | + ['BT', '2015-09-21 12:00', '-'], |
| 65 | + ['BT', '2015-09-21 15:00', '-'], |
| 66 | + ]); |
| 67 | + }); |
| 68 | + }); |
| 69 | +} |
0 commit comments