switch to es archiver fixtures instead of sample data (#91397)
This commit is contained in:
parent
52cd0d94d5
commit
22bb8d39f0
|
@ -11,15 +11,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'home', 'lens']);
|
||||
const a11y = getService('a11y');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const listingTable = getService('listingTable');
|
||||
|
||||
describe('Lens', () => {
|
||||
const lensChartName = 'MyLensChart';
|
||||
before(async () => {
|
||||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
|
||||
useActualUrl: true,
|
||||
});
|
||||
await PageObjects.home.addSampleDataSet('flights');
|
||||
await esArchiver.loadIfNeeded('logstash_functional');
|
||||
await esArchiver.loadIfNeeded('lens/basic');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -28,6 +27,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await listingTable.checkListingSelectAllCheckbox();
|
||||
await listingTable.clickDeleteSelected();
|
||||
await PageObjects.common.clickConfirmOnModal();
|
||||
await esArchiver.unload('logstash_functional');
|
||||
await esArchiver.unload('lens/basic');
|
||||
});
|
||||
|
||||
it('lens', async () => {
|
||||
|
@ -41,17 +42,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.visualize.navigateToNewVisualization();
|
||||
await PageObjects.visualize.clickVisType('lens');
|
||||
await PageObjects.timePicker.ensureHiddenNoDataPopover();
|
||||
await PageObjects.lens.goToTimeRange();
|
||||
|
||||
await PageObjects.lens.configureDimension({
|
||||
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
|
||||
operation: 'terms',
|
||||
field: 'DestCityName',
|
||||
field: 'ip',
|
||||
});
|
||||
|
||||
await PageObjects.lens.configureDimension({
|
||||
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension',
|
||||
operation: 'avg',
|
||||
field: 'AvgTicketPrice',
|
||||
field: 'bytes',
|
||||
});
|
||||
|
||||
await a11y.testAppSnapshot();
|
||||
|
@ -76,6 +78,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.visualize.navigateToNewVisualization();
|
||||
await PageObjects.visualize.clickVisType('lens');
|
||||
await PageObjects.timePicker.ensureHiddenNoDataPopover();
|
||||
await PageObjects.lens.goToTimeRange();
|
||||
|
||||
await PageObjects.lens.openDimensionEditor('lnsXY_xDimensionPanel > lns-empty-dimension');
|
||||
await a11y.testAppSnapshot();
|
||||
|
@ -96,13 +99,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.lens.configureDimension({
|
||||
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
|
||||
operation: 'date_histogram',
|
||||
field: 'timestamp',
|
||||
field: '@timestamp',
|
||||
});
|
||||
|
||||
await PageObjects.lens.configureDimension({
|
||||
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension',
|
||||
operation: 'avg',
|
||||
field: 'AvgTicketPrice',
|
||||
field: 'bytes',
|
||||
});
|
||||
|
||||
await testSubjects.click('lnsSuggestion-barChart > lnsSuggestion');
|
||||
|
@ -118,7 +121,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
{
|
||||
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
|
||||
operation: 'terms',
|
||||
field: 'DestCityName',
|
||||
field: 'ip',
|
||||
},
|
||||
1
|
||||
);
|
||||
|
@ -127,7 +130,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
{
|
||||
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension',
|
||||
operation: 'median',
|
||||
field: 'FlightTimeMin',
|
||||
field: 'bytes',
|
||||
},
|
||||
1
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue