From a658664f4f57be7c7c55d92a5d4b36bd4f3ddc8a Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 11:40:46 -0700 Subject: [PATCH 01/19] remove custom kibana server settings for reporting in default x-pack test config --- x-pack/test/functional/config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index 0de3df6a04ed8..e9889a4c69f0d 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -83,9 +83,6 @@ export default async function ({ readConfigFile }) { '--server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d', '--xpack.maps.showMapsInspectorAdapter=true', '--xpack.maps.preserveDrawingBuffer=true', - '--xpack.reporting.roles.enabled=false', // use the non-deprecated access control model for Reporting - '--xpack.reporting.queue.pollInterval=3000', // make it explicitly the default - '--xpack.reporting.csv.maxSizeBytes=2850', // small-ish limit for cutting off a 1999 byte report '--usageCollection.maximumWaitTimeForAllCollectorsInS=1', '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions '--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"', From 2890901ad283f52a4b9227ccf8803005dab36f0e Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 11:44:48 -0700 Subject: [PATCH 02/19] have tests use the deprecated built-in role granting reporting access --- x-pack/test/functional/apps/canvas/reports.ts | 12 +--------- .../apps/dashboard/reporting/screenshots.ts | 23 +------------------ .../functional/apps/lens/lens_reporting.ts | 12 +--------- .../reporting_management/report_listing.ts | 12 +--------- 4 files changed, 4 insertions(+), 55 deletions(-) diff --git a/x-pack/test/functional/apps/canvas/reports.ts b/x-pack/test/functional/apps/canvas/reports.ts index 32dd89e025855..2f6228eb1f4c8 100644 --- a/x-pack/test/functional/apps/canvas/reports.ts +++ b/x-pack/test/functional/apps/canvas/reports.ts @@ -21,17 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Canvas PDF Report Generation', () => { before('initialize tests', async () => { log.debug('ReportingPage:initTests'); - await security.role.create('test_reporting_user', { - elasticsearch: { cluster: [], indices: [], run_as: [] }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { canvas: ['minimal_read', 'generate_report'] }, - }, - ], - }); - await security.testUser.setRoles(['kibana_admin', 'test_reporting_user']); + await security.testUser.setRoles(['kibana_admin', 'reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled await kibanaServer.importExport.load(archive); await browser.setWindowSize(1600, 850); }); diff --git a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts index 312eba7bd6380..bc5a0ccdbbb4f 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts @@ -39,28 +39,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.load(ecommerceSOPath); await browser.setWindowSize(1600, 850); - await security.role.create('test_reporting_user', { - elasticsearch: { - cluster: [], - indices: [ - { - names: ['ecommerce'], - privileges: ['read'], - field_security: { grant: ['*'], except: [] }, - }, - ], - run_as: [], - }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { dashboard: ['minimal_all', 'generate_report'] }, - }, - ], - }); - - await security.testUser.setRoles(['test_reporting_user']); + await security.testUser.setRoles(['reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled }); after('clean up archives', async () => { await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce'); diff --git a/x-pack/test/functional/apps/lens/lens_reporting.ts b/x-pack/test/functional/apps/lens/lens_reporting.ts index fb4c501baaf80..b909b9ce31a44 100644 --- a/x-pack/test/functional/apps/lens/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/lens_reporting.ts @@ -18,18 +18,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('lens reporting', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/lens/reporting'); - await security.role.create('test_reporting_user', { - elasticsearch: { cluster: [], indices: [], run_as: [] }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { dashboard: ['minimal_read', 'generate_report'] }, - }, - ], - }); await security.testUser.setRoles( - ['test_logstash_reader', 'global_dashboard_read', 'test_reporting_user'], + ['test_logstash_reader', 'global_dashboard_read', 'reporting_user'], // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled false ); }); diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index dee09cf678992..46953f8c5e8d0 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -20,17 +20,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Listing of Reports', function () { before(async () => { - await security.role.create('test_reporting_user', { - elasticsearch: { cluster: [], indices: [], run_as: [] }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { canvas: ['minimal_read', 'generate_report'] }, - }, - ], - }); - await security.testUser.setRoles(['kibana_admin', 'test_reporting_user']); + await security.testUser.setRoles(['kibana_admin', 'reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); }); From dd5ff4d5346e6565e0b01f668334115cf5c277f6 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 11:49:28 -0700 Subject: [PATCH 03/19] restore test user default privilege for canvas --- .../apps/canvas/feature_controls/canvas_security.ts | 2 +- x-pack/test/functional/config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts index 3b5e30e994b71..5a73f31c8427f 100644 --- a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts +++ b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts @@ -33,7 +33,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { kibana: [ { feature: { - canvas: ['minimal_all'], + canvas: ['all'], }, spaces: ['*'], }, diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index e9889a4c69f0d..87a21f815bfd4 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -237,8 +237,8 @@ export default async function ({ readConfigFile }) { kibana: [ { feature: { - canvas: ['minimal_all'], - visualize: ['minimal_all'], + canvas: ['all'], + visualize: ['all'], }, spaces: ['*'], }, From 41a79c77fbf923a067ffc093000bb028a5b13427 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 12:02:50 -0700 Subject: [PATCH 04/19] fix app privileges in tests --- x-pack/test/functional/apps/canvas/reports.ts | 16 +++++++++++- .../apps/dashboard/reporting/screenshots.ts | 26 ++++++++++++++++++- .../functional/apps/lens/lens_reporting.ts | 6 ++++- .../reporting_management/report_listing.ts | 16 +++++++++++- 4 files changed, 60 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/apps/canvas/reports.ts b/x-pack/test/functional/apps/canvas/reports.ts index 2f6228eb1f4c8..d1609ad76b243 100644 --- a/x-pack/test/functional/apps/canvas/reports.ts +++ b/x-pack/test/functional/apps/canvas/reports.ts @@ -21,7 +21,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Canvas PDF Report Generation', () => { before('initialize tests', async () => { log.debug('ReportingPage:initTests'); - await security.testUser.setRoles(['kibana_admin', 'reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + await security.role.create('test_canvas_user', { + elasticsearch: { cluster: [], indices: [], run_as: [] }, + kibana: [ + { + spaces: ['*'], + base: [], + feature: { canvas: ['read'] }, + }, + ], + }); + await security.testUser.setRoles([ + 'kibana_admin', // FIXME remove this + 'test_canvas_user', + 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + ]); await kibanaServer.importExport.load(archive); await browser.setWindowSize(1600, 850); }); diff --git a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts index bc5a0ccdbbb4f..57a2355a4f12e 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts @@ -39,7 +39,31 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.load(ecommerceSOPath); await browser.setWindowSize(1600, 850); - await security.testUser.setRoles(['reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + await security.role.create('test_dashboard_user', { + elasticsearch: { + cluster: [], + indices: [ + { + names: ['ecommerce'], + privileges: ['read'], + field_security: { grant: ['*'], except: [] }, + }, + ], + run_as: [], + }, + kibana: [ + { + spaces: ['*'], + base: [], + feature: { dashboard: ['minimal_all'] }, // no sub-feature privileges needed + }, + ], + }); + + await security.testUser.setRoles([ + 'test_dashboard_user', + 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See the xpack.reporting.roles.enabled setting + ]); }); after('clean up archives', async () => { await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce'); diff --git a/x-pack/test/functional/apps/lens/lens_reporting.ts b/x-pack/test/functional/apps/lens/lens_reporting.ts index b909b9ce31a44..bd0c003ff3f45 100644 --- a/x-pack/test/functional/apps/lens/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/lens_reporting.ts @@ -19,7 +19,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/lens/reporting'); await security.testUser.setRoles( - ['test_logstash_reader', 'global_dashboard_read', 'reporting_user'], // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + [ + 'test_logstash_reader', + 'global_dashboard_read', + 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + ], false ); }); diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index 46953f8c5e8d0..d96250cd5c314 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -20,7 +20,21 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Listing of Reports', function () { before(async () => { - await security.testUser.setRoles(['kibana_admin', 'reporting_user']); // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + await security.role.create('test_canvas_user', { + elasticsearch: { cluster: [], indices: [], run_as: [] }, + kibana: [ + { + spaces: ['*'], + base: [], + feature: { canvas: ['read'] }, + }, + ], + }); + await security.testUser.setRoles([ + 'kibana_admin', // FIXME remove this + 'test_canvas_user', + 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + ]); await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); }); From 2eb6c71af93b213e3243390e2c14671c2eb1b933 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 12:10:43 -0700 Subject: [PATCH 05/19] fix test_user not able to access canvas in the dashboard test --- x-pack/test/functional/apps/dashboard/reporting/screenshots.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts index 57a2355a4f12e..dfbe1b691afd8 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts @@ -31,6 +31,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Dashboard Reporting Screenshots', () => { before('initialize tests', async () => { + await PageObjects.common.navigateToApp('dashboard'); + await kibanaServer.uiSettings.replace({ defaultIndex: '5193f870-d861-11e9-a311-0fa548c5f953', }); @@ -78,7 +80,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Print PDF button', () => { it('is available if new', async () => { - await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await PageObjects.reporting.openPdfReportingPanel(); expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); From 312f4792f3886fc99e3591e4ccbacaec44cf5761 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 12:16:46 -0700 Subject: [PATCH 06/19] simplify some tests setup --- x-pack/test/functional/apps/canvas/reports.ts | 1 - .../apps/reporting_management/report_listing.ts | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/x-pack/test/functional/apps/canvas/reports.ts b/x-pack/test/functional/apps/canvas/reports.ts index d1609ad76b243..468430c390030 100644 --- a/x-pack/test/functional/apps/canvas/reports.ts +++ b/x-pack/test/functional/apps/canvas/reports.ts @@ -32,7 +32,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ], }); await security.testUser.setRoles([ - 'kibana_admin', // FIXME remove this 'test_canvas_user', 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled ]); diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index d96250cd5c314..1291fb686d8b1 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -20,19 +20,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Listing of Reports', function () { before(async () => { - await security.role.create('test_canvas_user', { - elasticsearch: { cluster: [], indices: [], run_as: [] }, - kibana: [ - { - spaces: ['*'], - base: [], - feature: { canvas: ['read'] }, - }, - ], - }); await security.testUser.setRoles([ - 'kibana_admin', // FIXME remove this - 'test_canvas_user', + 'kibana_admin', // to access stack management 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled ]); await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); From 8dd5d9f350bc94a83dade5ddb19cffdf7f2f1b11 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 12:29:28 -0700 Subject: [PATCH 07/19] update csv export timerange and snapshot --- .../reporting/__snapshots__/download_csv.snap | 25 ------------------- .../apps/dashboard/reporting/download_csv.ts | 11 +++++--- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap b/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap index 10384b865c82e..32da3cebd8aa2 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap +++ b/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap @@ -1,26 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dashboard Reporting Download CSV E-Commerce 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 -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,46,591299,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0229002290, ZO0674406744\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,36,591133,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0529905299, ZO0617006170\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,13,591175,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0299402994, ZO0433504335\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,14,591149,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0584905849, ZO0578405784\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,27,591754,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0335803358, ZO0325903259\\" -" -`; - exports[`dashboard Reporting Download CSV E-Commerce 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 \\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" @@ -44,10 +23,6 @@ exports[`dashboard Reporting Download CSV E-Commerce Data Downloads a filtered C 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, 1984 @ 00:00:00.000\\",\\"1984-Fethany-F\\",Fethany,F,5,1984,\\"35.00000000000000000000\\",\\"Jan 1st 84\\" -\\"Jan 1, 1983 @ 00:00:00.000\\",\\"1983-Fethany-F\\",Fethany,F,\\"1,043\\",1983,\\"36.00000000000000000000\\",\\"Jan 1st 83\\" \\"Jan 1, 1982 @ 00:00:00.000\\",\\"1982-Fethany-F\\",Fethany,F,780,1982,\\"37.00000000000000000000\\",\\"Jan 1st 82\\" -\\"Jan 1, 1981 @ 00:00:00.000\\",\\"1981-Fethany-F\\",Fethany,F,655,1981,\\"38.00000000000000000000\\",\\"Jan 1st 81\\" -\\"Jan 1, 1980 @ 00:00:00.000\\",\\"1980-Fethany-F\\",Fethany,F,702,1980,\\"39.00000000000000000000\\",\\"Jan 1st 80\\" " `; diff --git a/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts b/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts index 94540aa8b4c46..31ef52049c076 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts @@ -83,7 +83,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await clickDownloadCsv(); const csvFile = await getDownload(getCsvPath('Ecommerce Data')); - expectSnapshot(csvFile).toMatch(); + const lines = csvFile.split('\n'); + expect(csvFile.length).to.be(782100); + expectSnapshot(lines.length).toMatchInline(`4677`); + expectSnapshot(lines[lines.length - 2]).toMatchInline( + `"\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\""` + ); }); it('Downloads a filtered CSV export of a saved search panel', async function () { @@ -128,8 +133,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.loadSavedDashboard('names dashboard'); await PageObjects.timePicker.setAbsoluteRange( - 'Jan 01, 1980 @ 00:00:00.000', - 'Dec 31, 1984 @ 23:59:59.000' + 'Nov 26, 1981 @ 21:54:15.526', + 'Mar 5, 1982 @ 18:17:44.821' ); await PageObjects.common.sleep(1000); From 4254945f5dcae08563334ddb502c2d9833ad339a Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 13:15:30 -0700 Subject: [PATCH 08/19] update fn tests for app privileges --- .../api_integration/apis/security/license_downgrade.ts | 1 - .../functional/apps/dashboard/reporting/screenshots.ts | 3 +-- .../apps/discover/feature_controls/discover_security.ts | 8 +------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/x-pack/test/api_integration/apis/security/license_downgrade.ts b/x-pack/test/api_integration/apis/security/license_downgrade.ts index dcdcc039bc9d6..a56bb5908ca05 100644 --- a/x-pack/test/api_integration/apis/security/license_downgrade.ts +++ b/x-pack/test/api_integration/apis/security/license_downgrade.ts @@ -26,7 +26,6 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', - 'generate_report', ]; const trialPrivileges = await supertest .get('/api/security/privileges') diff --git a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts index dfbe1b691afd8..57a2355a4f12e 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts @@ -31,8 +31,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Dashboard Reporting Screenshots', () => { before('initialize tests', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await kibanaServer.uiSettings.replace({ defaultIndex: '5193f870-d861-11e9-a311-0fa548c5f953', }); @@ -80,6 +78,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Print PDF button', () => { it('is available if new', async () => { + await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await PageObjects.reporting.openPdfReportingPanel(); expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts index 83ad18ed369ae..8a2355fee52f3 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts @@ -112,7 +112,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.share.clickShareTopNavButton(); }); - it('shows CSV reports', async () => { + it('does show CSV reports', async () => { await PageObjects.share.clickShareTopNavButton(); await testSubjects.existOrFail('sharePanel-CSVReports'); await PageObjects.share.clickShareTopNavButton(); @@ -229,12 +229,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.share.clickShareTopNavButton(); }); - it(`doesn't show CSV reports`, async () => { - await PageObjects.share.clickShareTopNavButton(); - await testSubjects.missingOrFail('sharePanel-CSVReports'); - await PageObjects.share.clickShareTopNavButton(); - }); - it('allows loading a saved query via the saved query management component', async () => { await savedQueryManagementComponent.loadSavedQuery('OKJpgs'); const queryString = await queryBar.getQueryString(); From 6e0bed7902d98f2dfecd8082944a86d765d72815 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 13:22:10 -0700 Subject: [PATCH 09/19] fix feature controls test --- .../apps/management/feature_controls/management_security.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/management/feature_controls/management_security.ts b/x-pack/test/functional/apps/management/feature_controls/management_security.ts index edca9b64d4fca..b47afc4cda6e4 100644 --- a/x-pack/test/functional/apps/management/feature_controls/management_security.ts +++ b/x-pack/test/functional/apps/management/feature_controls/management_security.ts @@ -64,7 +64,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(sections).to.have.length(2); expect(sections[0]).to.eql({ sectionId: 'insightsAndAlerting', - sectionLinks: ['triggersActions', 'reporting'], + sectionLinks: ['triggersActions'], }); expect(sections[1]).to.eql({ sectionId: 'kibana', From 4a0c8a13e086dea27b8eb91d01882f1872c27eac Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 8 Sep 2021 13:36:01 -0700 Subject: [PATCH 10/19] Update discover_security.ts --- .../apps/discover/feature_controls/discover_security.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts index 8a2355fee52f3..9b954c0a094f3 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts @@ -112,7 +112,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.share.clickShareTopNavButton(); }); - it('does show CSV reports', async () => { + it('shows CSV reports', async () => { await PageObjects.share.clickShareTopNavButton(); await testSubjects.existOrFail('sharePanel-CSVReports'); await PageObjects.share.clickShareTopNavButton(); From 2431ded1604913dac1054d59121c72d9f3f8b296 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 17:36:48 -0700 Subject: [PATCH 11/19] fix reporting tests --- x-pack/test/api_integration/config.ts | 3 + .../reporting/__snapshots__/download_csv.snap | 21 ------ .../apps/dashboard/reporting/download_csv.ts | 75 +++++++++++++++++-- .../reporting_and_security.config.ts | 1 + .../reporting_and_security.config.ts | 1 + 5 files changed, 72 insertions(+), 29 deletions(-) diff --git a/x-pack/test/api_integration/config.ts b/x-pack/test/api_integration/config.ts index 9721a1827caf3..a4cbd28eef136 100644 --- a/x-pack/test/api_integration/config.ts +++ b/x-pack/test/api_integration/config.ts @@ -35,6 +35,9 @@ export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProvi '--xpack.data_enhanced.search.sessions.trackingInterval=5s', // shorten trackingInterval for quicker testing '--xpack.data_enhanced.search.sessions.cleanupInterval=5s', // shorten cleanupInterval for quicker testing '--xpack.ruleRegistry.write.enabled=true', + '--xpack.reporting.roles.enabled=false', // use the non-deprecated access control model for Reporting + '--xpack.reporting.queue.pollInterval=3000', // make it explicitly the default + '--xpack.reporting.csv.maxSizeBytes=2850', // small-ish limit for cutting off a 1999 byte report ], }, esTestCluster: { diff --git a/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap b/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap index 32da3cebd8aa2..98dc901eaf306 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap +++ b/x-pack/test/functional/apps/dashboard/reporting/__snapshots__/download_csv.snap @@ -1,26 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dashboard Reporting Download CSV E-Commerce 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 -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,46,591299,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0229002290, ZO0674406744\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,36,591133,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0529905299, ZO0617006170\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,13,591175,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0299402994, ZO0433504335\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,14,591149,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0584905849, ZO0578405784\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,27,591754,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0335803358, ZO0325903259\\" -" -`; - 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\\" diff --git a/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts b/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts index 31ef52049c076..2d6812c61e554 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/download_csv.ts @@ -83,12 +83,39 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await clickDownloadCsv(); const csvFile = await getDownload(getCsvPath('Ecommerce Data')); - const lines = csvFile.split('\n'); - expect(csvFile.length).to.be(782100); - expectSnapshot(lines.length).toMatchInline(`4677`); - expectSnapshot(lines[lines.length - 2]).toMatchInline( - `"\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\""` - ); + const lines = csvFile.trim().split('\n'); + expectSnapshot(csvFile.length).toMatchInline(`782100`); + expectSnapshot(lines.length).toMatchInline(`4676`); + + // instead of matching all 4676 lines of CSV text, this verifies the first 10 and last 10 lines + expectSnapshot(lines.slice(0, 10)).toMatchInline(` + Array [ + "\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\"", + ] + `); + expectSnapshot(lines.slice(-10)).toMatchInline(` + Array [ + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,24,550580,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0144801448, ZO0219602196\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,33,551324,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0316803168, ZO0566905669\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,51,551355,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0313403134, ZO0561205612\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Accessories\\",EUR,28,550957,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0133101331, ZO0189401894\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,39,551154,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0466704667, ZO0617306173\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Accessories\\",EUR,27,551204,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0212602126, ZO0200702007\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,45,550466,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0260702607, ZO0363203632\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,15,550503,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0587505875, ZO0566405664\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Shoes\\",EUR,27,550538,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0699406994, ZO0246202462\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\"", + ] + `); }); it('Downloads a filtered CSV export of a saved search panel', async function () { @@ -96,13 +123,45 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); // add a filter - await filterBar.addFilter('currency', 'is', 'EUR'); + await filterBar.addFilter('category', 'is', `Men's Shoes`); await clickActionsMenu('EcommerceData'); await clickDownloadCsv(); const csvFile = await getDownload(getCsvPath('Ecommerce Data')); - expectSnapshot(csvFile).toMatch(); + const lines = csvFile.trim().split('\n'); + expectSnapshot(csvFile.length).toMatchInline(`165557`); + expectSnapshot(lines.length).toMatchInline(`945`); + + // instead of matching all 4676 lines of CSV text, this verifies the first 10 and last 10 lines + expectSnapshot(lines.slice(0, 10)).toMatchInline(` + Array [ + "\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,4,591148,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0290302903, ZO0513705137\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,14,591562,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0544305443, ZO0108001080\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,30,591411,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0693506935, ZO0532405324\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,38,722629,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0424204242, ZO0403504035, ZO0506705067, ZO0395603956\\"", + ] + `); + expectSnapshot(lines.slice(-10)).toMatchInline(` + Array [ + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,37,550425,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0256602566, ZO0516305163\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,52,719265,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0619506195, ZO0297802978, ZO0125001250, ZO0693306933\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,34,550990,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0404404044, ZO0570605706\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,7,550663,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0399703997, ZO0560905609\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,34,551697,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0387903879, ZO0693206932\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,9,550784,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0683206832, ZO0687706877\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,15,550412,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0508905089, ZO0681206812\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,23,551556,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0512405124, ZO0551405514\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,550473,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0688006880, ZO0450504505\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\"", + ] + `); }); it('Gets the correct filename if panel titles are hidden', async () => { diff --git a/x-pack/test/reporting_api_integration/reporting_and_security.config.ts b/x-pack/test/reporting_api_integration/reporting_and_security.config.ts index 0d1839c7a138f..b5f75ed7d501c 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security.config.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security.config.ts @@ -36,6 +36,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--xpack.reporting.capture.networkPolicy.rules=${JSON.stringify(testPolicyRules)}`, `--xpack.reporting.capture.maxAttempts=1`, `--xpack.reporting.csv.maxSizeBytes=6000`, + '--xpack.reporting.roles.enabled=false', // Reporting access control is implemented by sub-feature application privileges ], }, }; diff --git a/x-pack/test/reporting_functional/reporting_and_security.config.ts b/x-pack/test/reporting_functional/reporting_and_security.config.ts index 536695b4c6dc9..3037aeacde033 100644 --- a/x-pack/test/reporting_functional/reporting_and_security.config.ts +++ b/x-pack/test/reporting_functional/reporting_and_security.config.ts @@ -25,6 +25,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...functionalConfig.get('kbnTestServer.serverArgs'), `--xpack.reporting.capture.maxAttempts=1`, `--xpack.reporting.csv.maxSizeBytes=6000`, + '--xpack.reporting.roles.enabled=false', // Reporting access control is implemented by sub-feature application privileges ], }, services: { From c091869912cf80a2398a1cc52d4f0f1ba69921d0 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 17:49:45 -0700 Subject: [PATCH 12/19] test using defaults in the security privilege test --- .../api_integration/apis/security/privileges.ts | 14 ++------------ x-pack/test/api_integration/config.ts | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index bbb0fc60cb3ce..d39d9e599bcc8 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -26,7 +26,7 @@ export default function ({ getService }: FtrProviderContext) { features: { graph: ['all', 'read'], savedObjectsTagging: ['all', 'read'], - canvas: ['all', 'read', 'minimal_all', 'minimal_read', 'generate_report'], + canvas: ['all', 'read'], maps: ['all', 'read'], fleet: ['all', 'read'], actions: ['all', 'read'], @@ -45,16 +45,8 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', - 'generate_report', - ], - visualize: [ - 'all', - 'read', - 'minimal_all', - 'minimal_read', - 'url_create', - 'generate_report', ], + visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], dashboard: [ 'all', 'read', @@ -62,8 +54,6 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', - 'generate_report', - 'download_csv_report', ], dev_tools: ['all', 'read'], advancedSettings: ['all', 'read'], diff --git a/x-pack/test/api_integration/config.ts b/x-pack/test/api_integration/config.ts index a4cbd28eef136..9721a1827caf3 100644 --- a/x-pack/test/api_integration/config.ts +++ b/x-pack/test/api_integration/config.ts @@ -35,9 +35,6 @@ export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProvi '--xpack.data_enhanced.search.sessions.trackingInterval=5s', // shorten trackingInterval for quicker testing '--xpack.data_enhanced.search.sessions.cleanupInterval=5s', // shorten cleanupInterval for quicker testing '--xpack.ruleRegistry.write.enabled=true', - '--xpack.reporting.roles.enabled=false', // use the non-deprecated access control model for Reporting - '--xpack.reporting.queue.pollInterval=3000', // make it explicitly the default - '--xpack.reporting.csv.maxSizeBytes=2850', // small-ish limit for cutting off a 1999 byte report ], }, esTestCluster: { From 70f5b8f617e0235af91c8be8de54817f903844bd Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 19:49:24 -0700 Subject: [PATCH 13/19] fix read-only privileges with url_create Permalinks --- .../apps/discover/feature_controls/discover_security.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts index 9b954c0a094f3..2010bfd56d2af 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts @@ -316,7 +316,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('Permalinks shows create short-url button', async () => { - await PageObjects.share.clickShareTopNavButton(); + await PageObjects.share.openShareMenuItem('Permalinks'); await PageObjects.share.createShortUrlExistOrFail(); // close the menu await PageObjects.share.clickShareTopNavButton(); From 2dda799f5399ad9e81c2f38a8d71b7150a643013 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 19:56:32 -0700 Subject: [PATCH 14/19] fix security api anonymous --- .../tests/anonymous/capabilities.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts index 47d942db947f5..f757ab2b1e794 100644 --- a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts +++ b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts @@ -56,8 +56,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -65,7 +63,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -79,7 +76,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -91,8 +87,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -100,7 +94,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -114,7 +107,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -126,8 +118,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -135,7 +125,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -149,7 +138,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, From bf353a1ddf6715957a70b2af6fbd0f5871753b54 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 22:10:58 -0700 Subject: [PATCH 15/19] fix anonymous capabilities tests --- .../tests/anonymous/capabilities.ts | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts index f757ab2b1e794..db9715f7e48d5 100644 --- a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts +++ b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts @@ -168,8 +168,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -177,7 +175,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -191,7 +188,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -203,8 +199,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -212,7 +206,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -226,7 +219,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -238,8 +230,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -247,7 +237,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -261,7 +250,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -310,8 +298,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": true, "showWriteControls": false, @@ -319,7 +305,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": true, @@ -333,7 +318,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": true, @@ -347,8 +331,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -356,7 +338,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -370,7 +351,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -384,8 +364,6 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, - "downloadCsv": false, - "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -393,7 +371,6 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, - "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -407,7 +384,6 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, - "generateScreenshot": false, "save": false, "saveQuery": false, "show": true, From 59d03d349812fc3f0d427e00dd3a76ae2f61a7c8 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 22:24:18 -0700 Subject: [PATCH 16/19] fix discover csv export tests --- .../discover/__snapshots__/reporting.snap | 432 +++++++++++++++++- .../functional/apps/discover/reporting.ts | 23 +- 2 files changed, 435 insertions(+), 20 deletions(-) diff --git a/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap b/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap index c7666bf00dd53..3993b2a93e433 100644 --- a/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap +++ b/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap @@ -64,25 +64,421 @@ exports[`discover Discover CSV Export Generate CSV: archived search generates a `; exports[`discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default 1`] = ` -"\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user -3AMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,\\"Sultan Al\\",\\"Sultan Al\\",\\"Sultan Al Boone\\",\\"Sultan Al Boone\\",MALE,19,Boone,Boone,\\"(empty)\\",Saturday,5,\\"sultan al@boone-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{ - \\"\\"coordinates\\"\\": [ - 54.4, - 24.5 - ], - \\"\\"type\\"\\": \\"\\"Point\\"\\" -}\\",\\"Abu Dhabi\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Jul 12, 2019 @ 00:00:00.000\\",716724,\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"42.375, 33, 10.344, 6.109\\",\\"80, 60, 21.984, 11.992\\",\\"23,975, 6,338, 14,116, 15,290\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"1, 1, 1, 1\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",\\"0, 0, 0, 0\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"0, 0, 0, 0\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",174,174,4,4,order,sultan -" +Array [ + "\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user", + "3AMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,\\"Sultan Al\\",\\"Sultan Al\\",\\"Sultan Al Boone\\",\\"Sultan Al Boone\\",MALE,19,Boone,Boone,\\"(empty)\\",Saturday,5,\\"sultan al@boone-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 54.4,", + " 24.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Abu Dhabi\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Jul 12, 2019 @ 00:00:00.000\\",716724,\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"42.375, 33, 10.344, 6.109\\",\\"80, 60, 21.984, 11.992\\",\\"23,975, 6,338, 14,116, 15,290\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"1, 1, 1, 1\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",\\"0, 0, 0, 0\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"0, 0, 0, 0\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",174,174,4,4,order,sultan", + "9gMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",EUR,Pia,Pia,\\"Pia Richards\\",\\"Pia Richards\\",FEMALE,45,Richards,Richards,\\"(empty)\\",Saturday,5,\\"pia@richards-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591503,\\"sold_product_591503_14761, sold_product_591503_11632\\",\\"sold_product_591503_14761, sold_product_591503_11632\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Tigress Enterprises, Pyramidustries\\",\\"10.703, 9.867\\",\\"20.984, 20.984\\",\\"14,761, 11,632\\",\\"Classic heels - blue, Summer dress - coral/pink\\",\\"Classic heels - blue, Summer dress - coral/pink\\",\\"1, 1\\",\\"ZO0006400064, ZO0150601506\\",\\"0, 0\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"0, 0\\",\\"ZO0006400064, ZO0150601506\\",\\"41.969\\",\\"41.969\\",2,2,order,pia", + "BgMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing\\",\\"Women's Clothing\\",EUR,Brigitte,Brigitte,\\"Brigitte Meyer\\",\\"Brigitte Meyer\\",FEMALE,12,Meyer,Meyer,\\"(empty)\\",Saturday,5,\\"brigitte@meyer-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Spherecords, Tigress Enterprises\\",\\"Spherecords, Tigress Enterprises\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591709,\\"sold_product_591709_20734, sold_product_591709_7539\\",\\"sold_product_591709_20734, sold_product_591709_7539\\",\\"7.988, 33\\",\\"7.988, 33\\",\\"Women's Clothing, Women's Clothing\\",\\"Women's Clothing, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Spherecords, Tigress Enterprises\\",\\"Spherecords, Tigress Enterprises\\",\\"3.6, 17.484\\",\\"7.988, 33\\",\\"20,734, 7,539\\",\\"Basic T-shirt - dark blue, Summer dress - scarab\\",\\"Basic T-shirt - dark blue, Summer dress - scarab\\",\\"1, 1\\",\\"ZO0638206382, ZO0038800388\\",\\"0, 0\\",\\"7.988, 33\\",\\"7.988, 33\\",\\"0, 0\\",\\"ZO0638206382, ZO0038800388\\",\\"40.969\\",\\"40.969\\",2,2,order,brigitte", + "KQMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Abd,Abd,\\"Abd Mccarthy\\",\\"Abd Mccarthy\\",MALE,52,Mccarthy,Mccarthy,\\"(empty)\\",Saturday,5,\\"abd@mccarthy-family.zzz\\",Cairo,Africa,EG,\\"{", + " \\"\\"coordinates\\"\\": [", + " 31.3,", + " 30.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Cairo Governorate\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590937,\\"sold_product_590937_14438, sold_product_590937_23607\\",\\"sold_product_590937_14438, sold_product_590937_23607\\",\\"28.984, 12.992\\",\\"28.984, 12.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"13.344, 6.109\\",\\"28.984, 12.992\\",\\"14,438, 23,607\\",\\"Jumper - dark grey multicolor, Print T-shirt - black\\",\\"Jumper - dark grey multicolor, Print T-shirt - black\\",\\"1, 1\\",\\"ZO0297602976, ZO0565605656\\",\\"0, 0\\",\\"28.984, 12.992\\",\\"28.984, 12.992\\",\\"0, 0\\",\\"ZO0297602976, ZO0565605656\\",\\"41.969\\",\\"41.969\\",2,2,order,abd", + "KgMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Robert,Robert,\\"Robert Banks\\",\\"Robert Banks\\",MALE,29,Banks,Banks,\\"(empty)\\",Saturday,5,\\"robert@banks-family.zzz\\",\\"-\\",Asia,SA,\\"{", + " \\"\\"coordinates\\"\\": [", + " 45,", + " 25", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",\\"Elitelligence, Oceanavigations\\",\\"Elitelligence, Oceanavigations\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590976,\\"sold_product_590976_21270, sold_product_590976_13220\\",\\"sold_product_590976_21270, sold_product_590976_13220\\",\\"11.992, 24.984\\",\\"11.992, 24.984\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Oceanavigations\\",\\"Elitelligence, Oceanavigations\\",\\"6.23, 12.25\\",\\"11.992, 24.984\\",\\"21,270, 13,220\\",\\"Print T-shirt - white, Chinos - dark grey\\",\\"Print T-shirt - white, Chinos - dark grey\\",\\"1, 1\\",\\"ZO0561405614, ZO0281602816\\",\\"0, 0\\",\\"11.992, 24.984\\",\\"11.992, 24.984\\",\\"0, 0\\",\\"ZO0561405614, ZO0281602816\\",\\"36.969\\",\\"36.969\\",2,2,order,robert", + "awMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Jim,Jim,\\"Jim Hansen\\",\\"Jim Hansen\\",MALE,41,Hansen,Hansen,\\"(empty)\\",Saturday,5,\\"jim@hansen-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Low Tide Media\\",\\"Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591636,\\"sold_product_591636_1295, sold_product_591636_6498\\",\\"sold_product_591636_1295, sold_product_591636_6498\\",\\"50, 50\\",\\"50, 50\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Low Tide Media\\",\\"Low Tide Media, Low Tide Media\\",\\"25, 27.484\\",\\"50, 50\\",\\"1,295, 6,498\\",\\"Smart lace-ups - dark brown, Suit jacket - dark blue\\",\\"Smart lace-ups - dark brown, Suit jacket - dark blue\\",\\"1, 1\\",\\"ZO0385003850, ZO0408604086\\",\\"0, 0\\",\\"50, 50\\",\\"50, 50\\",\\"0, 0\\",\\"ZO0385003850, ZO0408604086\\",100,100,2,2,order,jim", + "eQMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes\\",\\"Men's Shoes\\",EUR,Thad,Thad,\\"Thad Lamb\\",\\"Thad Lamb\\",MALE,30,Lamb,Lamb,\\"(empty)\\",Saturday,5,\\"thad@lamb-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Elitelligence,Elitelligence,\\"Jul 12, 2019 @ 00:00:00.000\\",591539,\\"sold_product_591539_15260, sold_product_591539_14221\\",\\"sold_product_591539_15260, sold_product_591539_14221\\",\\"20.984, 18.984\\",\\"20.984, 18.984\\",\\"Men's Shoes, Men's Shoes\\",\\"Men's Shoes, Men's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"10.078, 10.25\\",\\"20.984, 18.984\\",\\"15,260, 14,221\\",\\"Casual lace-ups - dark blue, Trainers - navy\\",\\"Casual lace-ups - dark blue, Trainers - navy\\",\\"1, 1\\",\\"ZO0505605056, ZO0513605136\\",\\"0, 0\\",\\"20.984, 18.984\\",\\"20.984, 18.984\\",\\"0, 0\\",\\"ZO0505605056, ZO0513605136\\",\\"39.969\\",\\"39.969\\",2,2,order,thad", + "egMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Jim,Jim,\\"Jim Bryant\\",\\"Jim Bryant\\",MALE,41,Bryant,Bryant,\\"(empty)\\",Saturday,5,\\"jim@bryant-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Oceanavigations,Oceanavigations,\\"Jul 12, 2019 @ 00:00:00.000\\",591598,\\"sold_product_591598_20597, sold_product_591598_2774\\",\\"sold_product_591598_20597, sold_product_591598_2774\\",\\"10.992, 85\\",\\"10.992, 85\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Oceanavigations\\",\\"Oceanavigations, Oceanavigations\\",\\"5.93, 45.875\\",\\"10.992, 85\\",\\"20,597, 2,774\\",\\"Tie - brown/black , Classic coat - black\\",\\"Tie - brown/black , Classic coat - black\\",\\"1, 1\\",\\"ZO0276702767, ZO0291702917\\",\\"0, 0\\",\\"10.992, 85\\",\\"10.992, 85\\",\\"0, 0\\",\\"ZO0276702767, ZO0291702917\\",96,96,2,2,order,jim", + "fwMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing\\",\\"Women's Clothing\\",EUR,Betty,Betty,\\"Betty Roberson\\",\\"Betty Roberson\\",FEMALE,44,Roberson,Roberson,\\"(empty)\\",Saturday,5,\\"betty@roberson-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.7", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Tigress Enterprises\\",\\"Tigress Enterprises\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590927,\\"sold_product_590927_15436, sold_product_590927_22598\\",\\"sold_product_590927_15436, sold_product_590927_22598\\",\\"28.984, 28.984\\",\\"28.984, 28.984\\",\\"Women's Clothing, Women's Clothing\\",\\"Women's Clothing, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises, Tigress Enterprises\\",\\"Tigress Enterprises, Tigress Enterprises\\",\\"14.781, 14.781\\",\\"28.984, 28.984\\",\\"15,436, 22,598\\",\\"Jersey dress - anthra/black, Shift dress - black\\",\\"Jersey dress - anthra/black, Shift dress - black\\",\\"1, 1\\",\\"ZO0046600466, ZO0050800508\\",\\"0, 0\\",\\"28.984, 28.984\\",\\"28.984, 28.984\\",\\"0, 0\\",\\"ZO0046600466, ZO0050800508\\",\\"57.969\\",\\"57.969\\",2,2,order,betty", + "gAMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing, Men's Shoes\\",\\"Men's Clothing, Men's Shoes\\",EUR,Robbie,Robbie,\\"Robbie Hubbard\\",\\"Robbie Hubbard\\",MALE,48,Hubbard,Hubbard,\\"(empty)\\",Saturday,5,\\"robbie@hubbard-family.zzz\\",Dubai,Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 55.3,", + " 25.3", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Dubai,\\"Low Tide Media, Angeldale\\",\\"Low Tide Media, Angeldale\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590970,\\"sold_product_590970_11228, sold_product_590970_12060\\",\\"sold_product_590970_11228, sold_product_590970_12060\\",\\"24.984, 50\\",\\"24.984, 50\\",\\"Men's Clothing, Men's Shoes\\",\\"Men's Clothing, Men's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Angeldale\\",\\"Low Tide Media, Angeldale\\",\\"12, 25.984\\",\\"24.984, 50\\",\\"11,228, 12,060\\",\\"Tracksuit top - offwhite multicolor, Lace-ups - black/red\\",\\"Tracksuit top - offwhite multicolor, Lace-ups - black/red\\",\\"1, 1\\",\\"ZO0455604556, ZO0680806808\\",\\"0, 0\\",\\"24.984, 50\\",\\"24.984, 50\\",\\"0, 0\\",\\"ZO0455604556, ZO0680806808\\",75,75,2,2,order,robbie", + "6AMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",EUR,Abigail,Abigail,\\"Abigail Willis\\",\\"Abigail Willis\\",FEMALE,46,Willis,Willis,\\"(empty)\\",Saturday,5,\\"abigail@willis-family.zzz\\",Birmingham,Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -1.9,", + " 52.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Birmingham,\\"Tigress Enterprises MAMA, Angeldale\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591299,\\"sold_product_591299_19895, sold_product_591299_5787\\",\\"sold_product_591299_19895, sold_product_591299_5787\\",\\"33, 85\\",\\"33, 85\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"17.156, 44.188\\",\\"33, 85\\",\\"19,895, 5,787\\",\\"Summer dress - black/offwhite, Ankle boots - black\\",\\"Summer dress - black/offwhite, Ankle boots - black\\",\\"1, 1\\",\\"ZO0229002290, ZO0674406744\\",\\"0, 0\\",\\"33, 85\\",\\"33, 85\\",\\"0, 0\\",\\"ZO0229002290, ZO0674406744\\",118,118,2,2,order,abigail", + "6QMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Boris,Boris,\\"Boris Greene\\",\\"Boris Greene\\",MALE,36,Greene,Greene,\\"(empty)\\",Saturday,5,\\"boris@greene-family.zzz\\",\\"-\\",Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -0.1,", + " 51.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",\\"Elitelligence, Spritechnologies\\",\\"Elitelligence, Spritechnologies\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591133,\\"sold_product_591133_19496, sold_product_591133_20143\\",\\"sold_product_591133_19496, sold_product_591133_20143\\",\\"24.984, 10.992\\",\\"24.984, 10.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Spritechnologies\\",\\"Elitelligence, Spritechnologies\\",\\"12.742, 5.711\\",\\"24.984, 10.992\\",\\"19,496, 20,143\\",\\"Tracksuit bottoms - mottled grey, Sports shirt - black\\",\\"Tracksuit bottoms - mottled grey, Sports shirt - black\\",\\"1, 1\\",\\"ZO0529905299, ZO0617006170\\",\\"0, 0\\",\\"24.984, 10.992\\",\\"24.984, 10.992\\",\\"0, 0\\",\\"ZO0529905299, ZO0617006170\\",\\"35.969\\",\\"35.969\\",2,2,order,boris", + "6gMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Jackson,Jackson,\\"Jackson Conner\\",\\"Jackson Conner\\",MALE,13,Conner,Conner,\\"(empty)\\",Saturday,5,\\"jackson@conner-family.zzz\\",\\"Los Angeles\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -118.2,", + " 34.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",California,\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591175,\\"sold_product_591175_23703, sold_product_591175_11555\\",\\"sold_product_591175_23703, sold_product_591175_11555\\",\\"28.984, 65\\",\\"28.984, 65\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"13.922, 31.844\\",\\"28.984, 65\\",\\"23,703, 11,555\\",\\"Sweatshirt - grey multicolor, Short coat - dark blue\\",\\"Sweatshirt - grey multicolor, Short coat - dark blue\\",\\"1, 1\\",\\"ZO0299402994, ZO0433504335\\",\\"0, 0\\",\\"28.984, 65\\",\\"28.984, 65\\",\\"0, 0\\",\\"ZO0299402994, ZO0433504335\\",94,94,2,2,order,jackson", + "7QMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yuri,Yuri,\\"Yuri Cross\\",\\"Yuri Cross\\",MALE,21,Cross,Cross,\\"(empty)\\",Saturday,5,\\"yuri@cross-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591297,\\"sold_product_591297_21234, sold_product_591297_17466\\",\\"sold_product_591297_21234, sold_product_591297_17466\\",\\"75, 28.984\\",\\"75, 28.984\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"36.75, 13.344\\",\\"75, 28.984\\",\\"21,234, 17,466\\",\\"Lace-up boots - brown, Jumper - multicoloured\\",\\"Lace-up boots - brown, Jumper - multicoloured\\",\\"1, 1\\",\\"ZO0257502575, ZO0451704517\\",\\"0, 0\\",\\"75, 28.984\\",\\"75, 28.984\\",\\"0, 0\\",\\"ZO0257502575, ZO0451704517\\",104,104,2,2,order,yuri", + "7gMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Irwin,Irwin,\\"Irwin Ramsey\\",\\"Irwin Ramsey\\",MALE,14,Ramsey,Ramsey,\\"(empty)\\",Saturday,5,\\"irwin@ramsey-family.zzz\\",Bogotu00e1,\\"South America\\",CO,\\"{", +] +`; + +exports[`discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default 2`] = ` +Array [ + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Dubai,\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale\\",\\"Jun 12, 2019 @ 00:00:00.000\\",731056,\\"sold_product_731056_22440, sold_product_731056_13969, sold_product_731056_20215, sold_product_731056_23401\\",\\"sold_product_731056_22440, sold_product_731056_13969, sold_product_731056_20215, sold_product_731056_23401\\",\\"33, 20.984, 75, 13.992\\",\\"33, 20.984, 75, 13.992\\",\\"Women's Clothing, Women's Accessories, Women's Shoes, Women's Accessories\\",\\"Women's Clothing, Women's Accessories, Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale, Pyramidustries\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale, Pyramidustries\\",\\"15.18, 10.289, 39, 6.719\\",\\"33, 20.984, 75, 13.992\\",\\"22,440, 13,969, 20,215, 23,401\\",\\"Jersey dress - fan/black, Across body bag - Blue Violety, Boots - black, Hat - nude\\",\\"Jersey dress - fan/black, Across body bag - Blue Violety, Boots - black, Hat - nude\\",\\"1, 1, 1, 1\\",\\"ZO0230102301, ZO0210602106, ZO0679006790, ZO0187301873\\",\\"0, 0, 0, 0\\",\\"33, 20.984, 75, 13.992\\",\\"33, 20.984, 75, 13.992\\",\\"0, 0, 0, 0\\",\\"ZO0230102301, ZO0210602106, ZO0679006790, ZO0187301873\\",143,143,4,4,order,rabbia", + "4AMtOW0BH63Xcmy453H9,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yahya,Yahya,\\"Yahya Pope\\",\\"Yahya Pope\\",MALE,23,Pope,Pope,\\"(empty)\\",Thursday,3,\\"yahya@pope-family.zzz\\",Marrakesh,Africa,MA,\\"{", + " \\"\\"coordinates\\"\\": [", + " -8,", + " 31.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Marrakech-Tensift-Al Haouz\\",Elitelligence,Elitelligence,\\"Jun 12, 2019 @ 00:00:00.000\\",551556,\\"sold_product_551556_1583, sold_product_551556_11991\\",\\"sold_product_551556_1583, sold_product_551556_11991\\",\\"33, 7.988\\",\\"33, 7.988\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"17.813, 3.76\\",\\"33, 7.988\\",\\"1,583, 11,991\\",\\"High-top trainers - black, Basic T-shirt - black\\",\\"High-top trainers - black, Basic T-shirt - black\\",\\"1, 1\\",\\"ZO0512405124, ZO0551405514\\",\\"0, 0\\",\\"33, 7.988\\",\\"33, 7.988\\",\\"0, 0\\",\\"ZO0512405124, ZO0551405514\\",\\"40.969\\",\\"40.969\\",2,2,order,yahya", + "4QMtOW0BH63Xcmy453H9,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,George,George,\\"George Morrison\\",\\"George Morrison\\",MALE,32,Morrison,Morrison,\\"(empty)\\",Thursday,3,\\"george@morrison-family.zzz\\",Birmingham,Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -1.9,", + " 52.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Birmingham,\\"Spritechnologies, Elitelligence\\",\\"Spritechnologies, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551609,\\"sold_product_551609_3728, sold_product_551609_23435\\",\\"sold_product_551609_3728, sold_product_551609_23435\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Spritechnologies, Elitelligence\\",\\"Spritechnologies, Elitelligence\\",\\"10.703, 10.289\\",\\"20.984, 20.984\\",\\"3,728, 23,435\\",\\"Base layer - khaki, Shirt - red\\",\\"Base layer - khaki, Shirt - red\\",\\"1, 1\\",\\"ZO0630606306, ZO0524705247\\",\\"0, 0\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"0, 0\\",\\"ZO0630606306, ZO0524705247\\",\\"41.969\\",\\"41.969\\",2,2,order,george", + "\\"_wMtOW0BH63Xcmy453H9\\",ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yuri,Yuri,\\"Yuri Morris\\",\\"Yuri Morris\\",MALE,21,Morris,Morris,\\"(empty)\\",Thursday,3,\\"yuri@morris-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Angeldale, Low Tide Media\\",\\"Angeldale, Low Tide Media\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550473,\\"sold_product_550473_20161, sold_product_550473_6991\\",\\"sold_product_550473_20161, sold_product_550473_6991\\",\\"65, 38\\",\\"65, 38\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Angeldale, Low Tide Media\\",\\"Angeldale, Low Tide Media\\",\\"30.547, 20.125\\",\\"65, 38\\",\\"20,161, 6,991\\",\\"Lace-up boots - dark tan, Jumper - dark blue\\",\\"Lace-up boots - dark tan, Jumper - dark blue\\",\\"1, 1\\",\\"ZO0688006880, ZO0450504505\\",\\"0, 0\\",\\"65, 38\\",\\"65, 38\\",\\"0, 0\\",\\"ZO0688006880, ZO0450504505\\",103,103,2,2,order,yuri", + "AAMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",EUR,Brigitte,Brigitte,\\"Brigitte Long\\",\\"Brigitte Long\\",FEMALE,12,Long,Long,\\"(empty)\\",Thursday,3,\\"brigitte@long-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",550542,\\"sold_product_550542_11839, sold_product_550542_21052\\",\\"sold_product_550542_11839, sold_product_550542_21052\\",\\"24.984, 9.992\\",\\"24.984, 9.992\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"12.992, 4.898\\",\\"24.984, 9.992\\",\\"11,839, 21,052\\",\\"High heeled sandals - cognac, Snood - black/red/green/yellow\\",\\"High heeled sandals - cognac, Snood - black/red/green/yellow\\",\\"1, 1\\",\\"ZO0137301373, ZO0192601926\\",\\"0, 0\\",\\"24.984, 9.992\\",\\"24.984, 9.992\\",\\"0, 0\\",\\"ZO0137301373, ZO0192601926\\",\\"34.969\\",\\"34.969\\",2,2,order,brigitte", + "AQMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",EUR,rania,rania,\\"rania Barnes\\",\\"rania Barnes\\",FEMALE,24,Barnes,Barnes,\\"(empty)\\",Thursday,3,\\"rania@barnes-family.zzz\\",Cairo,Africa,EG,\\"{", + " \\"\\"coordinates\\"\\": [", + " 31.3,", + " 30.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Cairo Governorate\\",\\"Pyramidustries, Pyramidustries active\\",\\"Pyramidustries, Pyramidustries active\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550580,\\"sold_product_550580_20312, sold_product_550580_10155\\",\\"sold_product_550580_20312, sold_product_550580_10155\\",\\"50, 16.984\\",\\"50, 16.984\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries active\\",\\"Pyramidustries, Pyramidustries active\\",\\"24, 8.656\\",\\"50, 16.984\\",\\"20,312, 10,155\\",\\"Lace-up boots - cognac, Sports shirt - black\\",\\"Lace-up boots - cognac, Sports shirt - black\\",\\"1, 1\\",\\"ZO0144801448, ZO0219602196\\",\\"0, 0\\",\\"50, 16.984\\",\\"50, 16.984\\",\\"0, 0\\",\\"ZO0144801448, ZO0219602196\\",67,67,2,2,order,rani", + "BwMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,\\"Abdulraheem Al\\",\\"Abdulraheem Al\\",\\"Abdulraheem Al Tyler\\",\\"Abdulraheem Al Tyler\\",MALE,33,Tyler,Tyler,\\"(empty)\\",Thursday,3,\\"abdulraheem al@tyler-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 54.4,", + " 24.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Abu Dhabi\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551324,\\"sold_product_551324_14742, sold_product_551324_19089\\",\\"sold_product_551324_14742, sold_product_551324_19089\\",\\"33, 12.992\\",\\"33, 12.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"15.18, 7.012\\",\\"33, 12.992\\",\\"14,742, 19,089\\",\\"Laptop bag - brown, Vest - white/dark blue\\",\\"Laptop bag - brown, Vest - white/dark blue\\",\\"1, 1\\",\\"ZO0316803168, ZO0566905669\\",\\"0, 0\\",\\"33, 12.992\\",\\"33, 12.992\\",\\"0, 0\\",\\"ZO0316803168, ZO0566905669\\",\\"45.969\\",\\"45.969\\",2,2,order,abdulraheem", + "mwMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,Marwan,Marwan,\\"Marwan James\\",\\"Marwan James\\",MALE,51,James,James,\\"(empty)\\",Thursday,3,\\"marwan@james-family.zzz\\",Marrakesh,Africa,MA,\\"{", + " \\"\\"coordinates\\"\\": [", + " -8,", + " 31.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Marrakech-Tensift-Al Haouz\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551355,\\"sold_product_551355_21057, sold_product_551355_23405\\",\\"sold_product_551355_21057, sold_product_551355_23405\\",\\"13.992, 11.992\\",\\"13.992, 11.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"6.859, 5.762\\",\\"13.992, 11.992\\",\\"21,057, 23,405\\",\\"Scarf - navy/grey, Basic T-shirt - blue\\",\\"Scarf - navy/grey, Basic T-shirt - blue\\",\\"1, 1\\",\\"ZO0313403134, ZO0561205612\\",\\"0, 0\\",\\"13.992, 11.992\\",\\"13.992, 11.992\\",\\"0, 0\\",\\"ZO0313403134, ZO0561205612\\",\\"25.984\\",\\"25.984\\",2,2,order,marwan", + "twMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",EUR,Sonya,Sonya,\\"Sonya Mccormick\\",\\"Sonya Mccormick\\",FEMALE,28,Mccormick,Mccormick,\\"(empty)\\",Thursday,3,\\"sonya@mccormick-family.zzz\\",Bogotu00e1,\\"South America\\",CO,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74.1,", + " 4.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Bogota D.C.\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",550957,\\"sold_product_550957_22980, sold_product_550957_19828\\",\\"sold_product_550957_22980, sold_product_550957_19828\\",\\"24.984, 16.984\\",\\"24.984, 16.984\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"11.5, 9.172\\",\\"24.984, 16.984\\",\\"22,980, 19,828\\",\\"Classic heels - petrol, Watch - nude\\",\\"Classic heels - petrol, Watch - nude\\",\\"1, 1\\",\\"ZO0133101331, ZO0189401894\\",\\"0, 0\\",\\"24.984, 16.984\\",\\"24.984, 16.984\\",\\"0, 0\\",\\"ZO0133101331, ZO0189401894\\",\\"41.969\\",\\"41.969\\",2,2,order,sonya", + "7AMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,Kamal,Kamal,\\"Kamal Hansen\\",\\"Kamal Hansen\\",MALE,39,Hansen,Hansen,\\"(empty)\\",Thursday,3,\\"kamal@hansen-family.zzz\\",Istanbul,Asia,TR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 29,", + " 41", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Istanbul,\\"Low Tide Media, Spritechnologies\\",\\"Low Tide Media, Spritechnologies\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551154,\\"sold_product_551154_13181, sold_product_551154_23660\\",\\"sold_product_551154_13181, sold_product_551154_23660\\",\\"42, 11.992\\",\\"42, 11.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Spritechnologies\\",\\"Low Tide Media, Spritechnologies\\",\\"21, 6.109\\",\\"42, 11.992\\",\\"13,181, 23,660\\",\\"Briefcase - navy, Sports shirt - Seashell\\",\\"Briefcase - navy, Sports shirt - Seashell\\",\\"1, 1\\",\\"ZO0466704667, ZO0617306173\\",\\"0, 0\\",\\"42, 11.992\\",\\"42, 11.992\\",\\"0, 0\\",\\"ZO0466704667, ZO0617306173\\",\\"53.969\\",\\"53.969\\",2,2,order,kamal", + "7QMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Accessories\\",\\"Women's Clothing, Women's Accessories\\",EUR,Elyssa,Elyssa,\\"Elyssa Graves\\",\\"Elyssa Graves\\",FEMALE,27,Graves,Graves,\\"(empty)\\",Thursday,3,\\"elyssa@graves-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",551204,\\"sold_product_551204_16805, sold_product_551204_12896\\",\\"sold_product_551204_16805, sold_product_551204_12896\\",\\"13.992, 20.984\\",\\"13.992, 20.984\\",\\"Women's Clothing, Women's Accessories\\",\\"Women's Clothing, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"7.129, 9.656\\",\\"13.992, 20.984\\",\\"16,805, 12,896\\",\\"Bustier - white, Across body bag - cognac\\",\\"Bustier - white, Across body bag - cognac\\",\\"1, 1\\",\\"ZO0212602126, ZO0200702007\\",\\"0, 0\\",\\"13.992, 20.984\\",\\"13.992, 20.984\\",\\"0, 0\\",\\"ZO0212602126, ZO0200702007\\",\\"34.969\\",\\"34.969\\",2,2,order,elyssa", + "7gMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",EUR,Pia,Pia,\\"Pia Rose\\",\\"Pia Rose\\",FEMALE,45,Rose,Rose,\\"(empty)\\",Thursday,3,\\"pia@rose-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Oceanavigations, Primemaster\\",\\"Oceanavigations, Primemaster\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550466,\\"sold_product_550466_19198, sold_product_550466_16409\\",\\"sold_product_550466_19198, sold_product_550466_16409\\",\\"50, 100\\",\\"50, 100\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Primemaster\\",\\"Oceanavigations, Primemaster\\",\\"24, 52\\",\\"50, 100\\",\\"19,198, 16,409\\",\\"Summer dress - grey, Boots - passion\\",\\"Summer dress - grey, Boots - passion\\",\\"1, 1\\",\\"ZO0260702607, ZO0363203632\\",\\"0, 0\\",\\"50, 100\\",\\"50, 100\\",\\"0, 0\\",\\"ZO0260702607, ZO0363203632\\",150,150,2,2,order,pia", + "7wMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Wagdi,Wagdi,\\"Wagdi Boone\\",\\"Wagdi Boone\\",MALE,15,Boone,Boone,\\"(empty)\\",Thursday,3,\\"wagdi@boone-family.zzz\\",\\"-\\",Asia,SA,\\"{", + " \\"\\"coordinates\\"\\": [", + " 45,", + " 25", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",Elitelligence,Elitelligence,\\"Jun 12, 2019 @ 00:00:00.000\\",550503,\\"sold_product_550503_13211, sold_product_550503_24369\\",\\"sold_product_550503_13211, sold_product_550503_24369\\",\\"34, 11.992\\",\\"34, 11.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"15.641, 6.109\\",\\"34, 11.992\\",\\"13,211, 24,369\\",\\"Tracksuit top - black, Print T-shirt - khaki\\",\\"Tracksuit top - black, Print T-shirt - khaki\\",\\"1, 1\\",\\"ZO0587505875, ZO0566405664\\",\\"0, 0\\",\\"34, 11.992\\",\\"34, 11.992\\",\\"0, 0\\",\\"ZO0587505875, ZO0566405664\\",\\"45.969\\",\\"45.969\\",2,2,order,wagdi", + "8AMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Accessories, Women's Shoes\\",\\"Women's Accessories, Women's Shoes\\",EUR,Elyssa,Elyssa,\\"Elyssa Hale\\",\\"Elyssa Hale\\",FEMALE,27,Hale,Hale,\\"(empty)\\",Thursday,3,\\"elyssa@hale-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Angeldale, Oceanavigations\\",\\"Angeldale, Oceanavigations\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550538,\\"sold_product_550538_15047, sold_product_550538_18189\\",\\"sold_product_550538_15047, sold_product_550538_18189\\",\\"75, 60\\",\\"75, 60\\",\\"Women's Accessories, Women's Shoes\\",\\"Women's Accessories, Women's Shoes\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Angeldale, Oceanavigations\\",\\"Angeldale, Oceanavigations\\",\\"34.5, 28.797\\",\\"75, 60\\",\\"15,047, 18,189\\",\\"Handbag - black, Ankle boots - grey\\",\\"Handbag - black, Ankle boots - grey\\",\\"1, 1\\",\\"ZO0699406994, ZO0246202462\\",\\"0, 0\\",\\"75, 60\\",\\"75, 60\\",\\"0, 0\\",\\"ZO0699406994, ZO0246202462\\",135,135,2,2,order,elyssa", + "8QMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Jackson,Jackson,\\"Jackson Love\\",\\"Jackson Love\\",MALE,13,Love,Love,\\"(empty)\\",Thursday,3,\\"jackson@love-family.zzz\\",\\"Los Angeles\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -118.2,", + " 34.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",California,\\"Low Tide Media\\",\\"Low Tide Media\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550568,\\"sold_product_550568_17210, sold_product_550568_12524\\",\\"sold_product_550568_17210, sold_product_550568_12524\\",\\"50, 24.984\\",\\"50, 24.984\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Low Tide Media\\",\\"Low Tide Media, Low Tide Media\\",\\"25, 12.492\\",\\"50, 24.984\\",\\"17,210, 12,524\\",\\"Casual lace-ups - navy, Jumper - dark grey multicolor\\",\\"Casual lace-ups - navy, Jumper - dark grey multicolor\\",\\"1, 1\\",\\"ZO0388403884, ZO0447604476\\",\\"0, 0\\",\\"50, 24.984\\",\\"50, 24.984\\",\\"0, 0\\",\\"ZO0388403884, ZO0447604476\\",75,75,2,2,order,jackson", +] `; exports[`discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: discover:searchFieldsFromSource 1`] = ` -"\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user -3AMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,\\"Sultan Al\\",\\"Sultan Al\\",\\"Sultan Al Boone\\",\\"Sultan Al Boone\\",MALE,19,Boone,Boone,\\"(empty)\\",Saturday,5,\\"sultan al@boone-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{ - \\"\\"coordinates\\"\\": [ - 54.4, - 24.5 - ], - \\"\\"type\\"\\": \\"\\"Point\\"\\" -}\\",\\"Abu Dhabi\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Jul 12, 2019 @ 00:00:00.000\\",716724,\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"42.375, 33, 10.344, 6.109\\",\\"80, 60, 21.984, 11.992\\",\\"23,975, 6,338, 14,116, 15,290\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"1, 1, 1, 1\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",\\"0, 0, 0, 0\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"0, 0, 0, 0\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",174,174,4,4,order,sultan -" +Array [ + "\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user", + "3AMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,\\"Sultan Al\\",\\"Sultan Al\\",\\"Sultan Al Boone\\",\\"Sultan Al Boone\\",MALE,19,Boone,Boone,\\"(empty)\\",Saturday,5,\\"sultan al@boone-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 54.4,", + " 24.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Abu Dhabi\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Angeldale, Oceanavigations, Microlutions\\",\\"Jul 12, 2019 @ 00:00:00.000\\",716724,\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"sold_product_716724_23975, sold_product_716724_6338, sold_product_716724_14116, sold_product_716724_15290\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"Angeldale, Oceanavigations, Microlutions, Oceanavigations\\",\\"42.375, 33, 10.344, 6.109\\",\\"80, 60, 21.984, 11.992\\",\\"23,975, 6,338, 14,116, 15,290\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"Winter boots - cognac, Trenchcoat - black, Watch - black, Hat - light grey multicolor\\",\\"1, 1, 1, 1\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",\\"0, 0, 0, 0\\",\\"80, 60, 21.984, 11.992\\",\\"80, 60, 21.984, 11.992\\",\\"0, 0, 0, 0\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\",174,174,4,4,order,sultan", + "9gMtOW0BH63Xcmy432DJ,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",EUR,Pia,Pia,\\"Pia Richards\\",\\"Pia Richards\\",FEMALE,45,Richards,Richards,\\"(empty)\\",Saturday,5,\\"pia@richards-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591503,\\"sold_product_591503_14761, sold_product_591503_11632\\",\\"sold_product_591503_14761, sold_product_591503_11632\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises, Pyramidustries\\",\\"Tigress Enterprises, Pyramidustries\\",\\"10.703, 9.867\\",\\"20.984, 20.984\\",\\"14,761, 11,632\\",\\"Classic heels - blue, Summer dress - coral/pink\\",\\"Classic heels - blue, Summer dress - coral/pink\\",\\"1, 1\\",\\"ZO0006400064, ZO0150601506\\",\\"0, 0\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"0, 0\\",\\"ZO0006400064, ZO0150601506\\",\\"41.969\\",\\"41.969\\",2,2,order,pia", + "BgMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing\\",\\"Women's Clothing\\",EUR,Brigitte,Brigitte,\\"Brigitte Meyer\\",\\"Brigitte Meyer\\",FEMALE,12,Meyer,Meyer,\\"(empty)\\",Saturday,5,\\"brigitte@meyer-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Spherecords, Tigress Enterprises\\",\\"Spherecords, Tigress Enterprises\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591709,\\"sold_product_591709_20734, sold_product_591709_7539\\",\\"sold_product_591709_20734, sold_product_591709_7539\\",\\"7.988, 33\\",\\"7.988, 33\\",\\"Women's Clothing, Women's Clothing\\",\\"Women's Clothing, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Spherecords, Tigress Enterprises\\",\\"Spherecords, Tigress Enterprises\\",\\"3.6, 17.484\\",\\"7.988, 33\\",\\"20,734, 7,539\\",\\"Basic T-shirt - dark blue, Summer dress - scarab\\",\\"Basic T-shirt - dark blue, Summer dress - scarab\\",\\"1, 1\\",\\"ZO0638206382, ZO0038800388\\",\\"0, 0\\",\\"7.988, 33\\",\\"7.988, 33\\",\\"0, 0\\",\\"ZO0638206382, ZO0038800388\\",\\"40.969\\",\\"40.969\\",2,2,order,brigitte", + "KQMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Abd,Abd,\\"Abd Mccarthy\\",\\"Abd Mccarthy\\",MALE,52,Mccarthy,Mccarthy,\\"(empty)\\",Saturday,5,\\"abd@mccarthy-family.zzz\\",Cairo,Africa,EG,\\"{", + " \\"\\"coordinates\\"\\": [", + " 31.3,", + " 30.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Cairo Governorate\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590937,\\"sold_product_590937_14438, sold_product_590937_23607\\",\\"sold_product_590937_14438, sold_product_590937_23607\\",\\"28.984, 12.992\\",\\"28.984, 12.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"13.344, 6.109\\",\\"28.984, 12.992\\",\\"14,438, 23,607\\",\\"Jumper - dark grey multicolor, Print T-shirt - black\\",\\"Jumper - dark grey multicolor, Print T-shirt - black\\",\\"1, 1\\",\\"ZO0297602976, ZO0565605656\\",\\"0, 0\\",\\"28.984, 12.992\\",\\"28.984, 12.992\\",\\"0, 0\\",\\"ZO0297602976, ZO0565605656\\",\\"41.969\\",\\"41.969\\",2,2,order,abd", + "KgMtOW0BH63Xcmy432LJ,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Robert,Robert,\\"Robert Banks\\",\\"Robert Banks\\",MALE,29,Banks,Banks,\\"(empty)\\",Saturday,5,\\"robert@banks-family.zzz\\",\\"-\\",Asia,SA,\\"{", + " \\"\\"coordinates\\"\\": [", + " 45,", + " 25", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",\\"Elitelligence, Oceanavigations\\",\\"Elitelligence, Oceanavigations\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590976,\\"sold_product_590976_21270, sold_product_590976_13220\\",\\"sold_product_590976_21270, sold_product_590976_13220\\",\\"11.992, 24.984\\",\\"11.992, 24.984\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Oceanavigations\\",\\"Elitelligence, Oceanavigations\\",\\"6.23, 12.25\\",\\"11.992, 24.984\\",\\"21,270, 13,220\\",\\"Print T-shirt - white, Chinos - dark grey\\",\\"Print T-shirt - white, Chinos - dark grey\\",\\"1, 1\\",\\"ZO0561405614, ZO0281602816\\",\\"0, 0\\",\\"11.992, 24.984\\",\\"11.992, 24.984\\",\\"0, 0\\",\\"ZO0561405614, ZO0281602816\\",\\"36.969\\",\\"36.969\\",2,2,order,robert", + "awMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Jim,Jim,\\"Jim Hansen\\",\\"Jim Hansen\\",MALE,41,Hansen,Hansen,\\"(empty)\\",Saturday,5,\\"jim@hansen-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Low Tide Media\\",\\"Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591636,\\"sold_product_591636_1295, sold_product_591636_6498\\",\\"sold_product_591636_1295, sold_product_591636_6498\\",\\"50, 50\\",\\"50, 50\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Low Tide Media\\",\\"Low Tide Media, Low Tide Media\\",\\"25, 27.484\\",\\"50, 50\\",\\"1,295, 6,498\\",\\"Smart lace-ups - dark brown, Suit jacket - dark blue\\",\\"Smart lace-ups - dark brown, Suit jacket - dark blue\\",\\"1, 1\\",\\"ZO0385003850, ZO0408604086\\",\\"0, 0\\",\\"50, 50\\",\\"50, 50\\",\\"0, 0\\",\\"ZO0385003850, ZO0408604086\\",100,100,2,2,order,jim", + "eQMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes\\",\\"Men's Shoes\\",EUR,Thad,Thad,\\"Thad Lamb\\",\\"Thad Lamb\\",MALE,30,Lamb,Lamb,\\"(empty)\\",Saturday,5,\\"thad@lamb-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Elitelligence,Elitelligence,\\"Jul 12, 2019 @ 00:00:00.000\\",591539,\\"sold_product_591539_15260, sold_product_591539_14221\\",\\"sold_product_591539_15260, sold_product_591539_14221\\",\\"20.984, 18.984\\",\\"20.984, 18.984\\",\\"Men's Shoes, Men's Shoes\\",\\"Men's Shoes, Men's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"10.078, 10.25\\",\\"20.984, 18.984\\",\\"15,260, 14,221\\",\\"Casual lace-ups - dark blue, Trainers - navy\\",\\"Casual lace-ups - dark blue, Trainers - navy\\",\\"1, 1\\",\\"ZO0505605056, ZO0513605136\\",\\"0, 0\\",\\"20.984, 18.984\\",\\"20.984, 18.984\\",\\"0, 0\\",\\"ZO0505605056, ZO0513605136\\",\\"39.969\\",\\"39.969\\",2,2,order,thad", + "egMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Jim,Jim,\\"Jim Bryant\\",\\"Jim Bryant\\",MALE,41,Bryant,Bryant,\\"(empty)\\",Saturday,5,\\"jim@bryant-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Oceanavigations,Oceanavigations,\\"Jul 12, 2019 @ 00:00:00.000\\",591598,\\"sold_product_591598_20597, sold_product_591598_2774\\",\\"sold_product_591598_20597, sold_product_591598_2774\\",\\"10.992, 85\\",\\"10.992, 85\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Oceanavigations\\",\\"Oceanavigations, Oceanavigations\\",\\"5.93, 45.875\\",\\"10.992, 85\\",\\"20,597, 2,774\\",\\"Tie - brown/black , Classic coat - black\\",\\"Tie - brown/black , Classic coat - black\\",\\"1, 1\\",\\"ZO0276702767, ZO0291702917\\",\\"0, 0\\",\\"10.992, 85\\",\\"10.992, 85\\",\\"0, 0\\",\\"ZO0276702767, ZO0291702917\\",96,96,2,2,order,jim", + "fwMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing\\",\\"Women's Clothing\\",EUR,Betty,Betty,\\"Betty Roberson\\",\\"Betty Roberson\\",FEMALE,44,Roberson,Roberson,\\"(empty)\\",Saturday,5,\\"betty@roberson-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.7", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Tigress Enterprises\\",\\"Tigress Enterprises\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590927,\\"sold_product_590927_15436, sold_product_590927_22598\\",\\"sold_product_590927_15436, sold_product_590927_22598\\",\\"28.984, 28.984\\",\\"28.984, 28.984\\",\\"Women's Clothing, Women's Clothing\\",\\"Women's Clothing, Women's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises, Tigress Enterprises\\",\\"Tigress Enterprises, Tigress Enterprises\\",\\"14.781, 14.781\\",\\"28.984, 28.984\\",\\"15,436, 22,598\\",\\"Jersey dress - anthra/black, Shift dress - black\\",\\"Jersey dress - anthra/black, Shift dress - black\\",\\"1, 1\\",\\"ZO0046600466, ZO0050800508\\",\\"0, 0\\",\\"28.984, 28.984\\",\\"28.984, 28.984\\",\\"0, 0\\",\\"ZO0046600466, ZO0050800508\\",\\"57.969\\",\\"57.969\\",2,2,order,betty", + "gAMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing, Men's Shoes\\",\\"Men's Clothing, Men's Shoes\\",EUR,Robbie,Robbie,\\"Robbie Hubbard\\",\\"Robbie Hubbard\\",MALE,48,Hubbard,Hubbard,\\"(empty)\\",Saturday,5,\\"robbie@hubbard-family.zzz\\",Dubai,Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 55.3,", + " 25.3", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Dubai,\\"Low Tide Media, Angeldale\\",\\"Low Tide Media, Angeldale\\",\\"Jul 12, 2019 @ 00:00:00.000\\",590970,\\"sold_product_590970_11228, sold_product_590970_12060\\",\\"sold_product_590970_11228, sold_product_590970_12060\\",\\"24.984, 50\\",\\"24.984, 50\\",\\"Men's Clothing, Men's Shoes\\",\\"Men's Clothing, Men's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Angeldale\\",\\"Low Tide Media, Angeldale\\",\\"12, 25.984\\",\\"24.984, 50\\",\\"11,228, 12,060\\",\\"Tracksuit top - offwhite multicolor, Lace-ups - black/red\\",\\"Tracksuit top - offwhite multicolor, Lace-ups - black/red\\",\\"1, 1\\",\\"ZO0455604556, ZO0680806808\\",\\"0, 0\\",\\"24.984, 50\\",\\"24.984, 50\\",\\"0, 0\\",\\"ZO0455604556, ZO0680806808\\",75,75,2,2,order,robbie", + "6AMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",EUR,Abigail,Abigail,\\"Abigail Willis\\",\\"Abigail Willis\\",FEMALE,46,Willis,Willis,\\"(empty)\\",Saturday,5,\\"abigail@willis-family.zzz\\",Birmingham,Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -1.9,", + " 52.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Birmingham,\\"Tigress Enterprises MAMA, Angeldale\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591299,\\"sold_product_591299_19895, sold_product_591299_5787\\",\\"sold_product_591299_19895, sold_product_591299_5787\\",\\"33, 85\\",\\"33, 85\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"Tigress Enterprises MAMA, Angeldale\\",\\"17.156, 44.188\\",\\"33, 85\\",\\"19,895, 5,787\\",\\"Summer dress - black/offwhite, Ankle boots - black\\",\\"Summer dress - black/offwhite, Ankle boots - black\\",\\"1, 1\\",\\"ZO0229002290, ZO0674406744\\",\\"0, 0\\",\\"33, 85\\",\\"33, 85\\",\\"0, 0\\",\\"ZO0229002290, ZO0674406744\\",118,118,2,2,order,abigail", + "6QMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Boris,Boris,\\"Boris Greene\\",\\"Boris Greene\\",MALE,36,Greene,Greene,\\"(empty)\\",Saturday,5,\\"boris@greene-family.zzz\\",\\"-\\",Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -0.1,", + " 51.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",\\"Elitelligence, Spritechnologies\\",\\"Elitelligence, Spritechnologies\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591133,\\"sold_product_591133_19496, sold_product_591133_20143\\",\\"sold_product_591133_19496, sold_product_591133_20143\\",\\"24.984, 10.992\\",\\"24.984, 10.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Spritechnologies\\",\\"Elitelligence, Spritechnologies\\",\\"12.742, 5.711\\",\\"24.984, 10.992\\",\\"19,496, 20,143\\",\\"Tracksuit bottoms - mottled grey, Sports shirt - black\\",\\"Tracksuit bottoms - mottled grey, Sports shirt - black\\",\\"1, 1\\",\\"ZO0529905299, ZO0617006170\\",\\"0, 0\\",\\"24.984, 10.992\\",\\"24.984, 10.992\\",\\"0, 0\\",\\"ZO0529905299, ZO0617006170\\",\\"35.969\\",\\"35.969\\",2,2,order,boris", + "6gMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Jackson,Jackson,\\"Jackson Conner\\",\\"Jackson Conner\\",MALE,13,Conner,Conner,\\"(empty)\\",Saturday,5,\\"jackson@conner-family.zzz\\",\\"Los Angeles\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -118.2,", + " 34.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",California,\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591175,\\"sold_product_591175_23703, sold_product_591175_11555\\",\\"sold_product_591175_23703, sold_product_591175_11555\\",\\"28.984, 65\\",\\"28.984, 65\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"13.922, 31.844\\",\\"28.984, 65\\",\\"23,703, 11,555\\",\\"Sweatshirt - grey multicolor, Short coat - dark blue\\",\\"Sweatshirt - grey multicolor, Short coat - dark blue\\",\\"1, 1\\",\\"ZO0299402994, ZO0433504335\\",\\"0, 0\\",\\"28.984, 65\\",\\"28.984, 65\\",\\"0, 0\\",\\"ZO0299402994, ZO0433504335\\",94,94,2,2,order,jackson", + "7QMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yuri,Yuri,\\"Yuri Cross\\",\\"Yuri Cross\\",MALE,21,Cross,Cross,\\"(empty)\\",Saturday,5,\\"yuri@cross-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"Jul 12, 2019 @ 00:00:00.000\\",591297,\\"sold_product_591297_21234, sold_product_591297_17466\\",\\"sold_product_591297_21234, sold_product_591297_17466\\",\\"75, 28.984\\",\\"75, 28.984\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Low Tide Media\\",\\"Oceanavigations, Low Tide Media\\",\\"36.75, 13.344\\",\\"75, 28.984\\",\\"21,234, 17,466\\",\\"Lace-up boots - brown, Jumper - multicoloured\\",\\"Lace-up boots - brown, Jumper - multicoloured\\",\\"1, 1\\",\\"ZO0257502575, ZO0451704517\\",\\"0, 0\\",\\"75, 28.984\\",\\"75, 28.984\\",\\"0, 0\\",\\"ZO0257502575, ZO0451704517\\",104,104,2,2,order,yuri", + "7gMtOW0BH63Xcmy44WNv,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Irwin,Irwin,\\"Irwin Ramsey\\",\\"Irwin Ramsey\\",MALE,14,Ramsey,Ramsey,\\"(empty)\\",Saturday,5,\\"irwin@ramsey-family.zzz\\",Bogotu00e1,\\"South America\\",CO,\\"{", +] +`; + +exports[`discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: discover:searchFieldsFromSource 2`] = ` +Array [ + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Dubai,\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale\\",\\"Jun 12, 2019 @ 00:00:00.000\\",731056,\\"sold_product_731056_22440, sold_product_731056_13969, sold_product_731056_20215, sold_product_731056_23401\\",\\"sold_product_731056_22440, sold_product_731056_13969, sold_product_731056_20215, sold_product_731056_23401\\",\\"33, 20.984, 75, 13.992\\",\\"33, 20.984, 75, 13.992\\",\\"Women's Clothing, Women's Accessories, Women's Shoes, Women's Accessories\\",\\"Women's Clothing, Women's Accessories, Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0, 0, 0\\",\\"0, 0, 0, 0\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale, Pyramidustries\\",\\"Tigress Enterprises MAMA, Pyramidustries, Angeldale, Pyramidustries\\",\\"15.18, 10.289, 39, 6.719\\",\\"33, 20.984, 75, 13.992\\",\\"22,440, 13,969, 20,215, 23,401\\",\\"Jersey dress - fan/black, Across body bag - Blue Violety, Boots - black, Hat - nude\\",\\"Jersey dress - fan/black, Across body bag - Blue Violety, Boots - black, Hat - nude\\",\\"1, 1, 1, 1\\",\\"ZO0230102301, ZO0210602106, ZO0679006790, ZO0187301873\\",\\"0, 0, 0, 0\\",\\"33, 20.984, 75, 13.992\\",\\"33, 20.984, 75, 13.992\\",\\"0, 0, 0, 0\\",\\"ZO0230102301, ZO0210602106, ZO0679006790, ZO0187301873\\",143,143,4,4,order,rabbia", + "4AMtOW0BH63Xcmy453H9,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yahya,Yahya,\\"Yahya Pope\\",\\"Yahya Pope\\",MALE,23,Pope,Pope,\\"(empty)\\",Thursday,3,\\"yahya@pope-family.zzz\\",Marrakesh,Africa,MA,\\"{", + " \\"\\"coordinates\\"\\": [", + " -8,", + " 31.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Marrakech-Tensift-Al Haouz\\",Elitelligence,Elitelligence,\\"Jun 12, 2019 @ 00:00:00.000\\",551556,\\"sold_product_551556_1583, sold_product_551556_11991\\",\\"sold_product_551556_1583, sold_product_551556_11991\\",\\"33, 7.988\\",\\"33, 7.988\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"17.813, 3.76\\",\\"33, 7.988\\",\\"1,583, 11,991\\",\\"High-top trainers - black, Basic T-shirt - black\\",\\"High-top trainers - black, Basic T-shirt - black\\",\\"1, 1\\",\\"ZO0512405124, ZO0551405514\\",\\"0, 0\\",\\"33, 7.988\\",\\"33, 7.988\\",\\"0, 0\\",\\"ZO0512405124, ZO0551405514\\",\\"40.969\\",\\"40.969\\",2,2,order,yahya", + "4QMtOW0BH63Xcmy453H9,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,George,George,\\"George Morrison\\",\\"George Morrison\\",MALE,32,Morrison,Morrison,\\"(empty)\\",Thursday,3,\\"george@morrison-family.zzz\\",Birmingham,Europe,GB,\\"{", + " \\"\\"coordinates\\"\\": [", + " -1.9,", + " 52.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Birmingham,\\"Spritechnologies, Elitelligence\\",\\"Spritechnologies, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551609,\\"sold_product_551609_3728, sold_product_551609_23435\\",\\"sold_product_551609_3728, sold_product_551609_23435\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Spritechnologies, Elitelligence\\",\\"Spritechnologies, Elitelligence\\",\\"10.703, 10.289\\",\\"20.984, 20.984\\",\\"3,728, 23,435\\",\\"Base layer - khaki, Shirt - red\\",\\"Base layer - khaki, Shirt - red\\",\\"1, 1\\",\\"ZO0630606306, ZO0524705247\\",\\"0, 0\\",\\"20.984, 20.984\\",\\"20.984, 20.984\\",\\"0, 0\\",\\"ZO0630606306, ZO0524705247\\",\\"41.969\\",\\"41.969\\",2,2,order,george", + "\\"_wMtOW0BH63Xcmy453H9\\",ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Yuri,Yuri,\\"Yuri Morris\\",\\"Yuri Morris\\",MALE,21,Morris,Morris,\\"(empty)\\",Thursday,3,\\"yuri@morris-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Angeldale, Low Tide Media\\",\\"Angeldale, Low Tide Media\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550473,\\"sold_product_550473_20161, sold_product_550473_6991\\",\\"sold_product_550473_20161, sold_product_550473_6991\\",\\"65, 38\\",\\"65, 38\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Angeldale, Low Tide Media\\",\\"Angeldale, Low Tide Media\\",\\"30.547, 20.125\\",\\"65, 38\\",\\"20,161, 6,991\\",\\"Lace-up boots - dark tan, Jumper - dark blue\\",\\"Lace-up boots - dark tan, Jumper - dark blue\\",\\"1, 1\\",\\"ZO0688006880, ZO0450504505\\",\\"0, 0\\",\\"65, 38\\",\\"65, 38\\",\\"0, 0\\",\\"ZO0688006880, ZO0450504505\\",103,103,2,2,order,yuri", + "AAMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",EUR,Brigitte,Brigitte,\\"Brigitte Long\\",\\"Brigitte Long\\",FEMALE,12,Long,Long,\\"(empty)\\",Thursday,3,\\"brigitte@long-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",550542,\\"sold_product_550542_11839, sold_product_550542_21052\\",\\"sold_product_550542_11839, sold_product_550542_21052\\",\\"24.984, 9.992\\",\\"24.984, 9.992\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"12.992, 4.898\\",\\"24.984, 9.992\\",\\"11,839, 21,052\\",\\"High heeled sandals - cognac, Snood - black/red/green/yellow\\",\\"High heeled sandals - cognac, Snood - black/red/green/yellow\\",\\"1, 1\\",\\"ZO0137301373, ZO0192601926\\",\\"0, 0\\",\\"24.984, 9.992\\",\\"24.984, 9.992\\",\\"0, 0\\",\\"ZO0137301373, ZO0192601926\\",\\"34.969\\",\\"34.969\\",2,2,order,brigitte", + "AQMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",EUR,rania,rania,\\"rania Barnes\\",\\"rania Barnes\\",FEMALE,24,Barnes,Barnes,\\"(empty)\\",Thursday,3,\\"rania@barnes-family.zzz\\",Cairo,Africa,EG,\\"{", + " \\"\\"coordinates\\"\\": [", + " 31.3,", + " 30.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Cairo Governorate\\",\\"Pyramidustries, Pyramidustries active\\",\\"Pyramidustries, Pyramidustries active\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550580,\\"sold_product_550580_20312, sold_product_550580_10155\\",\\"sold_product_550580_20312, sold_product_550580_10155\\",\\"50, 16.984\\",\\"50, 16.984\\",\\"Women's Shoes, Women's Clothing\\",\\"Women's Shoes, Women's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries active\\",\\"Pyramidustries, Pyramidustries active\\",\\"24, 8.656\\",\\"50, 16.984\\",\\"20,312, 10,155\\",\\"Lace-up boots - cognac, Sports shirt - black\\",\\"Lace-up boots - cognac, Sports shirt - black\\",\\"1, 1\\",\\"ZO0144801448, ZO0219602196\\",\\"0, 0\\",\\"50, 16.984\\",\\"50, 16.984\\",\\"0, 0\\",\\"ZO0144801448, ZO0219602196\\",67,67,2,2,order,rani", + "BwMtOW0BH63Xcmy453L9,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,\\"Abdulraheem Al\\",\\"Abdulraheem Al\\",\\"Abdulraheem Al Tyler\\",\\"Abdulraheem Al Tyler\\",MALE,33,Tyler,Tyler,\\"(empty)\\",Thursday,3,\\"abdulraheem al@tyler-family.zzz\\",\\"Abu Dhabi\\",Asia,AE,\\"{", + " \\"\\"coordinates\\"\\": [", + " 54.4,", + " 24.5", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Abu Dhabi\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551324,\\"sold_product_551324_14742, sold_product_551324_19089\\",\\"sold_product_551324_14742, sold_product_551324_19089\\",\\"33, 12.992\\",\\"33, 12.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"15.18, 7.012\\",\\"33, 12.992\\",\\"14,742, 19,089\\",\\"Laptop bag - brown, Vest - white/dark blue\\",\\"Laptop bag - brown, Vest - white/dark blue\\",\\"1, 1\\",\\"ZO0316803168, ZO0566905669\\",\\"0, 0\\",\\"33, 12.992\\",\\"33, 12.992\\",\\"0, 0\\",\\"ZO0316803168, ZO0566905669\\",\\"45.969\\",\\"45.969\\",2,2,order,abdulraheem", + "mwMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,Marwan,Marwan,\\"Marwan James\\",\\"Marwan James\\",MALE,51,James,James,\\"(empty)\\",Thursday,3,\\"marwan@james-family.zzz\\",Marrakesh,Africa,MA,\\"{", + " \\"\\"coordinates\\"\\": [", + " -8,", + " 31.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Marrakech-Tensift-Al Haouz\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551355,\\"sold_product_551355_21057, sold_product_551355_23405\\",\\"sold_product_551355_21057, sold_product_551355_23405\\",\\"13.992, 11.992\\",\\"13.992, 11.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Elitelligence\\",\\"Oceanavigations, Elitelligence\\",\\"6.859, 5.762\\",\\"13.992, 11.992\\",\\"21,057, 23,405\\",\\"Scarf - navy/grey, Basic T-shirt - blue\\",\\"Scarf - navy/grey, Basic T-shirt - blue\\",\\"1, 1\\",\\"ZO0313403134, ZO0561205612\\",\\"0, 0\\",\\"13.992, 11.992\\",\\"13.992, 11.992\\",\\"0, 0\\",\\"ZO0313403134, ZO0561205612\\",\\"25.984\\",\\"25.984\\",2,2,order,marwan", + "twMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",EUR,Sonya,Sonya,\\"Sonya Mccormick\\",\\"Sonya Mccormick\\",FEMALE,28,Mccormick,Mccormick,\\"(empty)\\",Thursday,3,\\"sonya@mccormick-family.zzz\\",Bogotu00e1,\\"South America\\",CO,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74.1,", + " 4.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Bogota D.C.\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",550957,\\"sold_product_550957_22980, sold_product_550957_19828\\",\\"sold_product_550957_22980, sold_product_550957_19828\\",\\"24.984, 16.984\\",\\"24.984, 16.984\\",\\"Women's Shoes, Women's Accessories\\",\\"Women's Shoes, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"11.5, 9.172\\",\\"24.984, 16.984\\",\\"22,980, 19,828\\",\\"Classic heels - petrol, Watch - nude\\",\\"Classic heels - petrol, Watch - nude\\",\\"1, 1\\",\\"ZO0133101331, ZO0189401894\\",\\"0, 0\\",\\"24.984, 16.984\\",\\"24.984, 16.984\\",\\"0, 0\\",\\"ZO0133101331, ZO0189401894\\",\\"41.969\\",\\"41.969\\",2,2,order,sonya", + "7AMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",EUR,Kamal,Kamal,\\"Kamal Hansen\\",\\"Kamal Hansen\\",MALE,39,Hansen,Hansen,\\"(empty)\\",Thursday,3,\\"kamal@hansen-family.zzz\\",Istanbul,Asia,TR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 29,", + " 41", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",Istanbul,\\"Low Tide Media, Spritechnologies\\",\\"Low Tide Media, Spritechnologies\\",\\"Jun 12, 2019 @ 00:00:00.000\\",551154,\\"sold_product_551154_13181, sold_product_551154_23660\\",\\"sold_product_551154_13181, sold_product_551154_23660\\",\\"42, 11.992\\",\\"42, 11.992\\",\\"Men's Accessories, Men's Clothing\\",\\"Men's Accessories, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Spritechnologies\\",\\"Low Tide Media, Spritechnologies\\",\\"21, 6.109\\",\\"42, 11.992\\",\\"13,181, 23,660\\",\\"Briefcase - navy, Sports shirt - Seashell\\",\\"Briefcase - navy, Sports shirt - Seashell\\",\\"1, 1\\",\\"ZO0466704667, ZO0617306173\\",\\"0, 0\\",\\"42, 11.992\\",\\"42, 11.992\\",\\"0, 0\\",\\"ZO0466704667, ZO0617306173\\",\\"53.969\\",\\"53.969\\",2,2,order,kamal", + "7QMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Accessories\\",\\"Women's Clothing, Women's Accessories\\",EUR,Elyssa,Elyssa,\\"Elyssa Graves\\",\\"Elyssa Graves\\",FEMALE,27,Graves,Graves,\\"(empty)\\",Thursday,3,\\"elyssa@graves-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",Pyramidustries,Pyramidustries,\\"Jun 12, 2019 @ 00:00:00.000\\",551204,\\"sold_product_551204_16805, sold_product_551204_12896\\",\\"sold_product_551204_16805, sold_product_551204_12896\\",\\"13.992, 20.984\\",\\"13.992, 20.984\\",\\"Women's Clothing, Women's Accessories\\",\\"Women's Clothing, Women's Accessories\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Pyramidustries, Pyramidustries\\",\\"Pyramidustries, Pyramidustries\\",\\"7.129, 9.656\\",\\"13.992, 20.984\\",\\"16,805, 12,896\\",\\"Bustier - white, Across body bag - cognac\\",\\"Bustier - white, Across body bag - cognac\\",\\"1, 1\\",\\"ZO0212602126, ZO0200702007\\",\\"0, 0\\",\\"13.992, 20.984\\",\\"13.992, 20.984\\",\\"0, 0\\",\\"ZO0212602126, ZO0200702007\\",\\"34.969\\",\\"34.969\\",2,2,order,elyssa", + "7gMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",EUR,Pia,Pia,\\"Pia Rose\\",\\"Pia Rose\\",FEMALE,45,Rose,Rose,\\"(empty)\\",Thursday,3,\\"pia@rose-family.zzz\\",Cannes,Europe,FR,\\"{", + " \\"\\"coordinates\\"\\": [", + " 7,", + " 43.6", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"Alpes-Maritimes\\",\\"Oceanavigations, Primemaster\\",\\"Oceanavigations, Primemaster\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550466,\\"sold_product_550466_19198, sold_product_550466_16409\\",\\"sold_product_550466_19198, sold_product_550466_16409\\",\\"50, 100\\",\\"50, 100\\",\\"Women's Clothing, Women's Shoes\\",\\"Women's Clothing, Women's Shoes\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Oceanavigations, Primemaster\\",\\"Oceanavigations, Primemaster\\",\\"24, 52\\",\\"50, 100\\",\\"19,198, 16,409\\",\\"Summer dress - grey, Boots - passion\\",\\"Summer dress - grey, Boots - passion\\",\\"1, 1\\",\\"ZO0260702607, ZO0363203632\\",\\"0, 0\\",\\"50, 100\\",\\"50, 100\\",\\"0, 0\\",\\"ZO0260702607, ZO0363203632\\",150,150,2,2,order,pia", + "7wMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Clothing\\",\\"Men's Clothing\\",EUR,Wagdi,Wagdi,\\"Wagdi Boone\\",\\"Wagdi Boone\\",MALE,15,Boone,Boone,\\"(empty)\\",Thursday,3,\\"wagdi@boone-family.zzz\\",\\"-\\",Asia,SA,\\"{", + " \\"\\"coordinates\\"\\": [", + " 45,", + " 25", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"-\\",Elitelligence,Elitelligence,\\"Jun 12, 2019 @ 00:00:00.000\\",550503,\\"sold_product_550503_13211, sold_product_550503_24369\\",\\"sold_product_550503_13211, sold_product_550503_24369\\",\\"34, 11.992\\",\\"34, 11.992\\",\\"Men's Clothing, Men's Clothing\\",\\"Men's Clothing, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Elitelligence, Elitelligence\\",\\"Elitelligence, Elitelligence\\",\\"15.641, 6.109\\",\\"34, 11.992\\",\\"13,211, 24,369\\",\\"Tracksuit top - black, Print T-shirt - khaki\\",\\"Tracksuit top - black, Print T-shirt - khaki\\",\\"1, 1\\",\\"ZO0587505875, ZO0566405664\\",\\"0, 0\\",\\"34, 11.992\\",\\"34, 11.992\\",\\"0, 0\\",\\"ZO0587505875, ZO0566405664\\",\\"45.969\\",\\"45.969\\",2,2,order,wagdi", + "8AMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Women's Accessories, Women's Shoes\\",\\"Women's Accessories, Women's Shoes\\",EUR,Elyssa,Elyssa,\\"Elyssa Hale\\",\\"Elyssa Hale\\",FEMALE,27,Hale,Hale,\\"(empty)\\",Thursday,3,\\"elyssa@hale-family.zzz\\",\\"New York\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -74,", + " 40.8", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",\\"New York\\",\\"Angeldale, Oceanavigations\\",\\"Angeldale, Oceanavigations\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550538,\\"sold_product_550538_15047, sold_product_550538_18189\\",\\"sold_product_550538_15047, sold_product_550538_18189\\",\\"75, 60\\",\\"75, 60\\",\\"Women's Accessories, Women's Shoes\\",\\"Women's Accessories, Women's Shoes\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Angeldale, Oceanavigations\\",\\"Angeldale, Oceanavigations\\",\\"34.5, 28.797\\",\\"75, 60\\",\\"15,047, 18,189\\",\\"Handbag - black, Ankle boots - grey\\",\\"Handbag - black, Ankle boots - grey\\",\\"1, 1\\",\\"ZO0699406994, ZO0246202462\\",\\"0, 0\\",\\"75, 60\\",\\"75, 60\\",\\"0, 0\\",\\"ZO0699406994, ZO0246202462\\",135,135,2,2,order,elyssa", + "8QMtOW0BH63Xcmy46HLV,ecommerce,\\"-\\",\\"-\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",EUR,Jackson,Jackson,\\"Jackson Love\\",\\"Jackson Love\\",MALE,13,Love,Love,\\"(empty)\\",Thursday,3,\\"jackson@love-family.zzz\\",\\"Los Angeles\\",\\"North America\\",US,\\"{", + " \\"\\"coordinates\\"\\": [", + " -118.2,", + " 34.1", + " ],", + " \\"\\"type\\"\\": \\"\\"Point\\"\\"", + "}\\",California,\\"Low Tide Media\\",\\"Low Tide Media\\",\\"Jun 12, 2019 @ 00:00:00.000\\",550568,\\"sold_product_550568_17210, sold_product_550568_12524\\",\\"sold_product_550568_17210, sold_product_550568_12524\\",\\"50, 24.984\\",\\"50, 24.984\\",\\"Men's Shoes, Men's Clothing\\",\\"Men's Shoes, Men's Clothing\\",\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"0, 0\\",\\"0, 0\\",\\"Low Tide Media, Low Tide Media\\",\\"Low Tide Media, Low Tide Media\\",\\"25, 12.492\\",\\"50, 24.984\\",\\"17,210, 12,524\\",\\"Casual lace-ups - navy, Jumper - dark grey multicolor\\",\\"Casual lace-ups - navy, Jumper - dark grey multicolor\\",\\"1, 1\\",\\"ZO0388403884, ZO0447604476\\",\\"0, 0\\",\\"50, 24.984\\",\\"50, 24.984\\",\\"0, 0\\",\\"ZO0388403884, ZO0447604476\\",75,75,2,2,order,jackson", +] `; diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index cb05a59f07917..a51c22718120d 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -92,7 +92,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(res.status).to.equal(200); expect(res.get('content-type')).to.equal('text/csv; charset=utf-8'); - expectSnapshot(res.text).toMatch(); + + const csvFile = res.text; + const lines = csvFile.trim().split('\n'); + + // verifies the beginning and end of the text + expectSnapshot(lines.slice(0, 100)).toMatch(); + expectSnapshot(lines.slice(-100)).toMatch(); + + expectSnapshot(csvFile.length).toMatchInline(`5093456`); + expectSnapshot(lines.length).toMatchInline(`32726`); }); it('generates a report from a new search with data: discover:searchFieldsFromSource', async () => { @@ -110,7 +119,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(res.status).to.equal(200); expect(res.get('content-type')).to.equal('text/csv; charset=utf-8'); - expectSnapshot(res.text).toMatch(); + + const csvFile = res.text; + const lines = csvFile.trim().split('\n'); + + // verifies the beginning and end of the text + expectSnapshot(lines.slice(0, 100)).toMatch(); + expectSnapshot(lines.slice(-100)).toMatch(); + + expectSnapshot(csvFile.length).toMatchInline(`5093456`); + expectSnapshot(lines.length).toMatchInline(`32726`); + await setFieldsFromSource(false); }); From 0857d825b551cdd3f1f101c4a7484ae7b54a1895 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 8 Sep 2021 22:33:18 -0700 Subject: [PATCH 17/19] Update screenshots.ts --- x-pack/test/functional/apps/dashboard/reporting/screenshots.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts index 57a2355a4f12e..a2523c6d44244 100644 --- a/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/reporting/screenshots.ts @@ -55,7 +55,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { { spaces: ['*'], base: [], - feature: { dashboard: ['minimal_all'] }, // no sub-feature privileges needed + feature: { dashboard: ['minimal_all'] }, }, ], }); From 56b83c42f248115d2d686e55cbee3154a3544ec5 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 8 Sep 2021 23:55:41 -0700 Subject: [PATCH 18/19] update discover csv fn tests --- .../discover/__snapshots__/reporting.snap | 63 --------- .../functional/apps/discover/reporting.ts | 120 ++++++++++++++++-- 2 files changed, 109 insertions(+), 74 deletions(-) diff --git a/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap b/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap index 3993b2a93e433..09f4698b51bb8 100644 --- a/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap +++ b/x-pack/test/functional/apps/discover/__snapshots__/reporting.snap @@ -1,68 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`discover Discover CSV Export Generate CSV: archived search generates a report with data 1`] = ` -"\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,46,591299,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0229002290, ZO0674406744\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,36,591133,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0529905299, ZO0617006170\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,13,591175,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0299402994, ZO0433504335\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,14,591149,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0584905849, ZO0578405784\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,27,591754,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0335803358, ZO0325903259\\" -" -`; - -exports[`discover Discover CSV Export Generate CSV: archived search generates a report with discover:searchFieldsFromSource = true 1`] = ` -"\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,46,591299,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0229002290, ZO0674406744\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,36,591133,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0529905299, ZO0617006170\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,13,591175,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0299402994, ZO0433504335\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,14,591149,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0584905849, ZO0578405784\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,27,591754,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0335803358, ZO0325903259\\" -" -`; - -exports[`discover Discover CSV Export Generate CSV: archived search generates a report with filtered data 1`] = ` -"\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,46,591299,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0229002290, ZO0674406744\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,36,591133,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0529905299, ZO0617006170\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,13,591175,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0299402994, ZO0433504335\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,14,591149,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0584905849, ZO0578405784\\" -\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,27,591754,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0335803358, ZO0325903259\\" -" -`; - exports[`discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default 1`] = ` Array [ "\\"_id\\",\\"_index\\",\\"_score\\",\\"_type\\",category,\\"category.keyword\\",currency,\\"customer_first_name\\",\\"customer_first_name.keyword\\",\\"customer_full_name\\",\\"customer_full_name.keyword\\",\\"customer_gender\\",\\"customer_id\\",\\"customer_last_name\\",\\"customer_last_name.keyword\\",\\"customer_phone\\",\\"day_of_week\\",\\"day_of_week_i\\",email,\\"geoip.city_name\\",\\"geoip.continent_name\\",\\"geoip.country_iso_code\\",\\"geoip.location\\",\\"geoip.region_name\\",manufacturer,\\"manufacturer.keyword\\",\\"order_date\\",\\"order_id\\",\\"products._id\\",\\"products._id.keyword\\",\\"products.base_price\\",\\"products.base_unit_price\\",\\"products.category\\",\\"products.category.keyword\\",\\"products.created_on\\",\\"products.discount_amount\\",\\"products.discount_percentage\\",\\"products.manufacturer\\",\\"products.manufacturer.keyword\\",\\"products.min_price\\",\\"products.price\\",\\"products.product_id\\",\\"products.product_name\\",\\"products.product_name.keyword\\",\\"products.quantity\\",\\"products.sku\\",\\"products.tax_amount\\",\\"products.taxful_price\\",\\"products.taxless_price\\",\\"products.unit_discount_amount\\",sku,\\"taxful_total_price\\",\\"taxless_total_price\\",\\"total_quantity\\",\\"total_unique_products\\",type,user", diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index a51c22718120d..d931ed47649ec 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -100,8 +100,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expectSnapshot(lines.slice(0, 100)).toMatch(); expectSnapshot(lines.slice(-100)).toMatch(); - expectSnapshot(csvFile.length).toMatchInline(`5093456`); - expectSnapshot(lines.length).toMatchInline(`32726`); + expectSnapshot(csvFile.length).toMatchInline(`157573`); + expectSnapshot(lines.length).toMatchInline(`4676`); }); it('generates a report from a new search with data: discover:searchFieldsFromSource', async () => { @@ -127,8 +127,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expectSnapshot(lines.slice(0, 100)).toMatch(); expectSnapshot(lines.slice(-100)).toMatch(); - expectSnapshot(csvFile.length).toMatchInline(`5093456`); - expectSnapshot(lines.length).toMatchInline(`32726`); + expectSnapshot(csvFile.length).toMatchInline(`157573`); + expectSnapshot(lines.length).toMatchInline(`4676`); await setFieldsFromSource(false); }); @@ -186,8 +186,40 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await setupPage(); await PageObjects.discover.loadSavedSearch('Ecommerce Data'); - const { text } = await getReport(); - expectSnapshot(text).toMatch(); + const { text: csvFile } = await getReport(); + const lines = csvFile.trim().split('\n'); + expectSnapshot(csvFile.length).toMatchInline(`782100`); + expectSnapshot(lines.length).toMatchInline(`4676`); + + // match the beginning and the end of the csv file contents + expectSnapshot(lines.slice(0, 10)).toMatchInline(` + Array [ + "\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,45,591503,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0006400064, ZO0150601506\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,12,591709,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0638206382, ZO0038800388\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,52,590937,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0297602976, ZO0565605656\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,29,590976,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0561405614, ZO0281602816\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,41,591598,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0276702767, ZO0291702917\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",EUR,44,590927,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0046600466, ZO0050800508\\"", + ] + `); + expectSnapshot(lines.slice(-10)).toMatchInline(` + Array [ + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",EUR,24,550580,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0144801448, ZO0219602196\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,33,551324,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0316803168, ZO0566905669\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,51,551355,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0313403134, ZO0561205612\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Accessories\\",EUR,28,550957,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0133101331, ZO0189401894\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Accessories, Men's Clothing\\",EUR,39,551154,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0466704667, ZO0617306173\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Accessories\\",EUR,27,551204,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0212602126, ZO0200702007\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing, Women's Shoes\\",EUR,45,550466,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0260702607, ZO0363203632\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",EUR,15,550503,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0587505875, ZO0566405664\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Women's Accessories, Women's Shoes\\",EUR,27,550538,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0699406994, ZO0246202462\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\"", + ] + `); }); it('generates a report with filtered data', async () => { @@ -195,11 +227,44 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.loadSavedSearch('Ecommerce Data'); // filter and re-save - await filterBar.addFilter('currency', 'is', 'EUR'); + await filterBar.addFilter('category', 'is', `Men's Shoes`); await PageObjects.discover.saveSearch(`Ecommerce Data: EUR Filtered`); // renamed the search - const { text } = await getReport(); - expectSnapshot(text).toMatch(); + const { text: csvFile } = await getReport(); + const lines = csvFile.trim().split('\n'); + expectSnapshot(csvFile.length).toMatchInline(`165557`); + expectSnapshot(lines.length).toMatchInline(`945`); + + // match the beginning and the end of the csv file contents + expectSnapshot(lines.slice(0, 10)).toMatchInline(` + Array [ + "\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,4,591148,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0290302903, ZO0513705137\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,14,591562,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0544305443, ZO0108001080\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,30,591411,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0693506935, ZO0532405324\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,38,722629,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0424204242, ZO0403504035, ZO0506705067, ZO0395603956\\"", + ] + `); + expectSnapshot(lines.slice(-10)).toMatchInline(` + Array [ + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,37,550425,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0256602566, ZO0516305163\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,52,719265,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0619506195, ZO0297802978, ZO0125001250, ZO0693306933\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,34,550990,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0404404044, ZO0570605706\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,7,550663,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0399703997, ZO0560905609\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,34,551697,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0387903879, ZO0693206932\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,9,550784,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0683206832, ZO0687706877\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,15,550412,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0508905089, ZO0681206812\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,23,551556,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0512405124, ZO0551405514\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,550473,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0688006880, ZO0450504505\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\"", + ] + `); + await PageObjects.discover.saveSearch(`Ecommerce Data`); // rename the search back for the next test }); @@ -210,8 +275,41 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await setFieldsFromSource(true); await browser.refresh(); - const { text } = await getReport(); - expectSnapshot(text).toMatch(); + const { text: csvFile } = await getReport(); + const lines = csvFile.trim().split('\n'); + expectSnapshot(csvFile.length).toMatchInline(`165753`); + expectSnapshot(lines.length).toMatchInline(`945`); + + // match the beginning and the end of the csv file contents + expectSnapshot(lines.slice(0, 10)).toMatchInline(` + Array [ + "\\"order_date\\",category,currency,\\"customer_id\\",\\"order_id\\",\\"day_of_week_i\\",\\"products.created_on\\",sku", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",EUR,19,716724,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,41,591636,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0385003850, ZO0408604086\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,30,591539,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0505605056, ZO0513605136\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,48,590970,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0455604556, ZO0680806808\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,591297,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0257502575, ZO0451704517\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,4,591148,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0290302903, ZO0513705137\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,14,591562,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0544305443, ZO0108001080\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,30,591411,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0693506935, ZO0532405324\\"", + "\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,38,722629,5,\\"Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000, Dec 31, 2016 @ 00:00:00.000\\",\\"ZO0424204242, ZO0403504035, ZO0506705067, ZO0395603956\\"", + ] + `); + expectSnapshot(lines.slice(-10)).toMatchInline(` + Array [ + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,37,550425,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0256602566, ZO0516305163\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing, Men's Shoes\\",EUR,52,719265,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0619506195, ZO0297802978, ZO0125001250, ZO0693306933\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,34,550990,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0404404044, ZO0570605706\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,7,550663,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0399703997, ZO0560905609\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,34,551697,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0387903879, ZO0693206932\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,9,550784,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0683206832, ZO0687706877\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes\\",EUR,15,550412,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0508905089, ZO0681206812\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,23,551556,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0512405124, ZO0551405514\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,21,550473,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0688006880, ZO0450504505\\"", + "\\"Jun 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing\\",EUR,13,550568,3,\\"Dec 1, 2016 @ 00:00:00.000, Dec 1, 2016 @ 00:00:00.000\\",\\"ZO0388403884, ZO0447604476\\"", + ] + `); + await setFieldsFromSource(false); }); }); From 3236d2f9c43cd9c4f027ef6681d109e9707fcf00 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Thu, 9 Sep 2021 11:18:50 -0700 Subject: [PATCH 19/19] update snapshots --- x-pack/test/functional/apps/discover/reporting.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index d931ed47649ec..11a442d3500b5 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -100,8 +100,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expectSnapshot(lines.slice(0, 100)).toMatch(); expectSnapshot(lines.slice(-100)).toMatch(); - expectSnapshot(csvFile.length).toMatchInline(`157573`); - expectSnapshot(lines.length).toMatchInline(`4676`); + expectSnapshot(csvFile.length).toMatchInline(`5093456`); + expectSnapshot(lines.length).toMatchInline(`32726`); }); it('generates a report from a new search with data: discover:searchFieldsFromSource', async () => { @@ -127,8 +127,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expectSnapshot(lines.slice(0, 100)).toMatch(); expectSnapshot(lines.slice(-100)).toMatch(); - expectSnapshot(csvFile.length).toMatchInline(`157573`); - expectSnapshot(lines.length).toMatchInline(`4676`); + expectSnapshot(csvFile.length).toMatchInline(`5093456`); + expectSnapshot(lines.length).toMatchInline(`32726`); await setFieldsFromSource(false); });