mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Reporting] Unskip Flaky Dashboard > Download CSV test (#121914)
* [Reporting] Unskip Flaky Dashboard > Download CSV test * restructure tests * back to ecommerce Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d2fd1503e9
commit
6363095884
3 changed files with 131 additions and 86 deletions
|
@ -1,6 +1,6 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`dashboard Reporting Download CSV E-Commerce Data Download CSV export of a saved search panel 1`] = `
|
||||
exports[`dashboard Reporting Download CSV Default Saved Search Data Download CSV export of a saved search panel 1`] = `
|
||||
"\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,23,564670,6,\\"Dec 11, 2016 @ 00:00:00.000, Dec 11, 2016 @ 00:00:00.000\\",\\"ZO0531205312, ZO0684706847\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,564710,6,\\"Dec 11, 2016 @ 00:00:00.000, Dec 11, 2016 @ 00:00:00.000\\",\\"ZO0263402634, ZO0499404994\\"
|
||||
|
@ -460,7 +460,7 @@ exports[`dashboard Reporting Download CSV E-Commerce Data Download CSV export of
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`dashboard Reporting Download CSV E-Commerce Data Downloads a filtered CSV export of a saved search panel 1`] = `
|
||||
exports[`dashboard Reporting Download CSV Default Saved Search Data Downloads a filtered CSV export of a saved search panel 1`] = `
|
||||
"\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,23,564670,6,\\"Dec 11, 2016 @ 00:00:00.000, Dec 11, 2016 @ 00:00:00.000\\",\\"ZO0531205312, ZO0684706847\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,52,564513,6,\\"Dec 11, 2016 @ 00:00:00.000, Dec 11, 2016 @ 00:00:00.000\\",\\"ZO0390003900, ZO0287902879\\"
|
||||
|
@ -562,39 +562,39 @@ exports[`dashboard Reporting Download CSV E-Commerce Data Downloads a filtered C
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`dashboard Reporting Download CSV E-Commerce Data Downloads filtered Discover saved search report 1`] = `
|
||||
"\\"order_date\\",\\"customer_first_name\\",\\"customer_last_name\\",\\"customer_full_name\\"
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",Betty,Reese,\\"Betty Reese\\"
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",Betty,Brewer,\\"Betty Brewer\\"
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",Betty,Bryant,\\"Betty Bryant\\"
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",Betty,Perkins,\\"Betty Perkins\\"
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",Betty,Stokes,\\"Betty Stokes\\"
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",Betty,Jackson,\\"Betty Jackson\\"
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",Betty,Farmer,\\"Betty Farmer\\"
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",Betty,Rivera,\\"Betty Rivera\\"
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",Betty,King,\\"Betty King\\"
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",Betty,Graham,\\"Betty Graham\\"
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",Betty,Allison,\\"Betty Allison\\"
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",Betty,Gilbert,\\"Betty Gilbert\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Jimenez,\\"Betty Jimenez\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Fletcher,\\"Betty Fletcher\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Mccarthy,\\"Betty Mccarthy\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Bryant,\\"Betty Bryant\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Maldonado,\\"Betty Maldonado\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Ruiz,\\"Betty Ruiz\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Morrison,\\"Betty Morrison\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Cross,\\"Betty Cross\\"
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",Betty,Swanson,\\"Betty Swanson\\"
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",Betty,Bryan,\\"Betty Bryan\\"
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",Betty,Thompson,\\"Betty Thompson\\"
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",Betty,Ramsey,\\"Betty Ramsey\\"
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",Betty,Webb,\\"Betty Webb\\"
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",Betty,Massey,\\"Betty Massey\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`dashboard Reporting Download CSV Field Formatters and Scripted Fields Download CSV export of a saved search panel 1`] = `
|
||||
"date,\\"_id\\",name,gender,value,year,\\"years_ago\\",\\"date_informal\\"
|
||||
\\"Jan 1, 1982 @ 00:00:00.000\\",\\"1982-Fethany-F\\",Fethany,F,780,1982,\\"37.00000000000000000000\\",\\"Jan 1st 82\\"
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`dashboard Reporting Download CSV Filtered Saved Search Downloads filtered Discover saved search report 1`] = `
|
||||
"\\"order_date\\",category,\\"customer_full_name\\",\\"taxful_total_price\\",currency
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",\\"Women's Accessories\\",\\"Betty Reese\\",\\"22.984\\",EUR
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Clothing\\",\\"Betty Brewer\\",\\"28.984\\",EUR
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",\\"Betty Bryant\\",68,EUR
|
||||
\\"Jun 25, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Perkins\\",\\"61.969\\",EUR
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Shoes\\",\\"Betty Stokes\\",86,EUR
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Jackson\\",\\"60.969\\",EUR
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Clothing\\",\\"Betty Farmer\\",\\"34.969\\",EUR
|
||||
\\"Jun 24, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Betty Rivera\\",102,EUR
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty King\\",84,EUR
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Accessories\\",\\"Betty Graham\\",\\"24.984\\",EUR
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",\\"Betty Allison\\",87,EUR
|
||||
\\"Jun 23, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Gilbert\\",\\"49.969\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Jimenez\\",\\"53.969\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Fletcher\\",\\"57.969\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Mccarthy\\",112,EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",\\"Betty Bryant\\",\\"49.969\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Maldonado\\",\\"29.984\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Ruiz\\",\\"61.969\\",EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Morrison\\",175,EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Shoes\\",\\"Betty Cross\\",94,EUR
|
||||
\\"Jun 22, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Betty Swanson\\",100,EUR
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",\\"Betty Bryan\\",77,EUR
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Betty Thompson\\",\\"58.969\\",EUR
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Betty Ramsey\\",103,EUR
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Accessories\\",\\"Betty Webb\\",84,EUR
|
||||
\\"Jun 21, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",\\"Betty Massey\\",66,EUR
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -17,8 +17,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const log = getService('log');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const reportingAPI = getService('reporting');
|
||||
const reporting = getService('reporting');
|
||||
const dashboardAddPanel = getService('dashboardAddPanel');
|
||||
const filterBar = getService('filterBar');
|
||||
const find = getService('find');
|
||||
const retry = getService('retry');
|
||||
|
@ -29,13 +29,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
'timePicker',
|
||||
'discover',
|
||||
]);
|
||||
const dashboardAddPanel = getService('dashboardAddPanel');
|
||||
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
const ecommerceDataPath = 'x-pack/test/functional/es_archives/reporting/ecommerce';
|
||||
const dashboardAllDataHiddenTitles = 'Ecom Dashboard Hidden Panel Titles';
|
||||
const dashboardPeriodOf2DaysData = 'Ecom Dashboard - 3 Day Period';
|
||||
const dashboardWithScriptedFieldsSearch = 'names dashboard';
|
||||
const navigateToDashboardApp = async () => {
|
||||
log.debug('in navigateToDashboardApp');
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await retry.tryForTime(10000, async () => {
|
||||
expect(await PageObjects.dashboard.onDashboardLandingPage()).to.be(true);
|
||||
});
|
||||
};
|
||||
|
||||
const getCsvPath = (name: string) =>
|
||||
path.resolve(REPO_ROOT, `target/functional-tests/downloads/${name}.csv`);
|
||||
|
@ -79,20 +80,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
}
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/120433
|
||||
describe.skip('E-Commerce Data', () => {
|
||||
describe('Default Saved Search Data', () => {
|
||||
const dashboardAllDataHiddenTitles = 'Ecom Dashboard Hidden Panel Titles';
|
||||
const dashboardPeriodOf2DaysData = 'Ecom Dashboard - 3 Day Period';
|
||||
|
||||
before(async () => {
|
||||
await esArchiver.load(ecommerceDataPath);
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await reporting.initEcommerce();
|
||||
await navigateToDashboardApp();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload(ecommerceDataPath);
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await reporting.teardownEcommerce();
|
||||
});
|
||||
|
||||
it('Download CSV export of a saved search panel', async function () {
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await PageObjects.dashboard.loadSavedDashboard(dashboardPeriodOf2DaysData);
|
||||
await clickActionsMenu('EcommerceData');
|
||||
await clickDownloadCsv();
|
||||
|
@ -102,7 +103,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('Downloads a filtered CSV export of a saved search panel', async function () {
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await PageObjects.dashboard.loadSavedDashboard(dashboardPeriodOf2DaysData);
|
||||
|
||||
// add a filter
|
||||
|
@ -116,7 +116,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('Gets the correct filename if panel titles are hidden', async () => {
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await PageObjects.dashboard.loadSavedDashboard(dashboardAllDataHiddenTitles);
|
||||
const savedSearchPanel = await find.byCssSelector(
|
||||
'[data-test-embeddable-id="94eab06f-60ac-4a85-b771-3a8ed475c9bb"]'
|
||||
|
@ -129,53 +128,50 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const csvFile = await getDownload(getCsvPath('Ecommerce Data')); // file exists with proper name
|
||||
expect(csvFile).to.not.be(null);
|
||||
});
|
||||
});
|
||||
|
||||
it('Downloads filtered Discover saved search report', async () => {
|
||||
const setTimeRange = async () => {
|
||||
const fromTime = 'Jun 20, 2019 @ 23:56:51.374';
|
||||
const toTime = 'Jun 25, 2019 @ 16:18:51.821';
|
||||
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
|
||||
};
|
||||
describe('Filtered Saved Search', () => {
|
||||
const TEST_SEARCH_TITLE = 'Customer Betty';
|
||||
const TEST_DASHBOARD_TITLE = 'Filtered Search Data';
|
||||
const setTimeRange = async () => {
|
||||
const fromTime = 'Jun 20, 2019 @ 23:56:51.374';
|
||||
const toTime = 'Jun 25, 2019 @ 16:18:51.821';
|
||||
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
|
||||
};
|
||||
|
||||
PageObjects.common.navigateToApp('discover');
|
||||
await setTimeRange();
|
||||
await PageObjects.discover.selectIndexPattern('ecommerce');
|
||||
await PageObjects.discover.clickNewSearchButton();
|
||||
|
||||
await PageObjects.discover.clickFieldListItemAdd('customer_first_name');
|
||||
await PageObjects.discover.clickFieldListItemAdd('customer_last_name');
|
||||
await PageObjects.discover.clickFieldListItemAdd('customer_full_name');
|
||||
await filterBar.addFilter('customer_first_name', 'is', 'Betty');
|
||||
await PageObjects.discover.saveSearch('search-by-name');
|
||||
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await PageObjects.dashboard.gotoDashboardLandingPage();
|
||||
before(async () => {
|
||||
await reporting.initEcommerce();
|
||||
await navigateToDashboardApp();
|
||||
log.info(`Creating empty dashboard`);
|
||||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await setTimeRange();
|
||||
await dashboardAddPanel.addSavedSearch('search-by-name');
|
||||
await PageObjects.dashboard.saveDashboard('filtered-result');
|
||||
log.info(`Adding "${TEST_SEARCH_TITLE}" to dashboard`);
|
||||
await dashboardAddPanel.addSavedSearch(TEST_SEARCH_TITLE);
|
||||
await PageObjects.dashboard.saveDashboard(TEST_DASHBOARD_TITLE);
|
||||
});
|
||||
|
||||
await PageObjects.dashboard.clickCancelOutOfEditMode();
|
||||
await clickActionsMenu('search-by-name');
|
||||
after(async () => {
|
||||
await reporting.teardownEcommerce();
|
||||
await esArchiver.emptyKibanaIndex();
|
||||
});
|
||||
|
||||
it('Downloads filtered Discover saved search report', async () => {
|
||||
await clickActionsMenu(TEST_SEARCH_TITLE.replace(/ /g, ''));
|
||||
await clickDownloadCsv();
|
||||
|
||||
const csvFile = await getDownload(getCsvPath('search-by-name'));
|
||||
const csvFile = await getDownload(getCsvPath(TEST_SEARCH_TITLE));
|
||||
expectSnapshot(csvFile).toMatch();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Field Formatters and Scripted Fields', () => {
|
||||
before(async () => {
|
||||
await reportingAPI.initLogs();
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
});
|
||||
after(async () => {
|
||||
await reportingAPI.teardownLogs();
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
});
|
||||
const dashboardWithScriptedFieldsSearch = 'names dashboard';
|
||||
|
||||
it('Download CSV export of a saved search panel', async () => {
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
before(async () => {
|
||||
await reporting.initLogs();
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
|
||||
await navigateToDashboardApp();
|
||||
await PageObjects.dashboard.loadSavedDashboard(dashboardWithScriptedFieldsSearch);
|
||||
await PageObjects.timePicker.setAbsoluteRange(
|
||||
'Nov 26, 1981 @ 21:54:15.526',
|
||||
|
@ -183,11 +179,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
);
|
||||
|
||||
await PageObjects.common.sleep(1000);
|
||||
|
||||
await filterBar.addFilter('name.keyword', 'is', 'Fethany');
|
||||
|
||||
await PageObjects.common.sleep(1000);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await reporting.teardownLogs();
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/hugedata');
|
||||
});
|
||||
|
||||
it('Download CSV export of a saved search panel', async () => {
|
||||
await clickActionsMenu('namessearch');
|
||||
await clickDownloadCsv();
|
||||
|
||||
|
|
|
@ -763,3 +763,47 @@
|
|||
"updated_at": "2020-09-09T18:10:58.011Z",
|
||||
"version": "WzI4LDJd"
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"columns": [
|
||||
"category",
|
||||
"customer_full_name",
|
||||
"taxful_total_price",
|
||||
"currency"
|
||||
],
|
||||
"description": "",
|
||||
"grid": {},
|
||||
"hideChart": false,
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"customer_first_name\",\"params\":{\"query\":\"Betty\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"customer_first_name\":\"Betty\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"sort": [
|
||||
[
|
||||
"order_date",
|
||||
"desc"
|
||||
]
|
||||
],
|
||||
"title": "Customer Betty"
|
||||
},
|
||||
"coreMigrationVersion": "8.1.0",
|
||||
"id": "ffc52150-6377-11ec-8099-3da0733c6cce",
|
||||
"migrationVersion": {
|
||||
"search": "8.0.0"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"id": "aac3e500-f2c7-11ea-8250-fb138aa491e7",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
},
|
||||
{
|
||||
"id": "aac3e500-f2c7-11ea-8250-fb138aa491e7",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"type": "search",
|
||||
"updated_at": "2021-12-22T22:39:18.507Z",
|
||||
"version": "WzEzMDQsMV0="
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue