mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Replacing es_archives/reporting/ecommerce_kibana with kbn_archiver/reporting/ecommerce.json as part of migrating to kbn_archiver (#102825)
This commit is contained in:
parent
4fa3dc46cb
commit
859b453752
10 changed files with 709 additions and 3541 deletions
|
@ -17,10 +17,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const log = getService('log');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const filterBar = getService('filterBar');
|
||||
const find = getService('find');
|
||||
const retry = getService('retry');
|
||||
const PageObjects = getPageObjects(['reporting', 'common', 'dashboard', 'timePicker']);
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
const getCsvPath = (name: string) =>
|
||||
path.resolve(REPO_ROOT, `target/functional-tests/downloads/${name}.csv`);
|
||||
|
@ -67,11 +69,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
describe('E-Commerce Data', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
});
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
});
|
||||
|
||||
it('Download CSV export of a saved search panel', async function () {
|
||||
|
|
|
@ -27,13 +27,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
const es = getService('es');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
describe('Dashboard Reporting Screenshots', () => {
|
||||
// https://github.com/elastic/kibana/issues/102911
|
||||
describe.skip('Dashboard Reporting Screenshots', () => {
|
||||
before('initialize tests', async () => {
|
||||
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.loadIfNeeded(
|
||||
'x-pack/test/functional/es_archives/reporting/ecommerce_kibana'
|
||||
);
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await browser.setWindowSize(1600, 850);
|
||||
|
||||
await security.role.create('test_reporting_user', {
|
||||
|
@ -61,7 +61,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
});
|
||||
after('clean up archives', async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await es.deleteByQuery({
|
||||
index: '.reporting-*',
|
||||
refresh: true,
|
||||
|
|
|
@ -16,6 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const browser = getService('browser');
|
||||
const PageObjects = getPageObjects(['reporting', 'common', 'discover', 'timePicker']);
|
||||
const filterBar = getService('filterBar');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
const setFieldsFromSource = async (setValue: boolean) => {
|
||||
await kibanaServer.uiSettings.update({ 'discover:searchFieldsFromSource': setValue });
|
||||
|
@ -25,12 +26,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
before('initialize tests', async () => {
|
||||
log.debug('ReportingPage:initTests');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await browser.setWindowSize(1600, 850);
|
||||
});
|
||||
after('clean up archives', async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await es.deleteByQuery({
|
||||
index: '.reporting-*',
|
||||
refresh: true,
|
||||
|
@ -74,7 +75,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
describe('Generate CSV: new search', () => {
|
||||
beforeEach(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana'); // reload the archive to wipe out changes made by each test
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
});
|
||||
|
||||
|
@ -151,12 +152,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
before(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
});
|
||||
|
||||
beforeEach(() => PageObjects.common.navigateToApp('discover'));
|
||||
|
|
|
@ -16,16 +16,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const dataGrid = getService('dataGrid');
|
||||
const panelActions = getService('dashboardPanelActions');
|
||||
const panelActionsTimeRange = getService('dashboardPanelTimeRange');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
describe('Discover Saved Searches', () => {
|
||||
before('initialize tests', async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await kibanaServer.uiSettings.update({ 'doc_table:legacy': false });
|
||||
});
|
||||
after('clean up archives', async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await kibanaServer.uiSettings.unset('doc_table:legacy');
|
||||
});
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const esArchiver = getService('esArchiver');
|
||||
const browser = getService('browser');
|
||||
const log = getService('log');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
const PageObjects = getPageObjects([
|
||||
'reporting',
|
||||
'common',
|
||||
|
@ -25,14 +28,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
before('initialize tests', async () => {
|
||||
log.debug('ReportingPage:initTests');
|
||||
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.loadIfNeeded(
|
||||
'x-pack/test/functional/es_archives/reporting/ecommerce_kibana'
|
||||
);
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
await browser.setWindowSize(1600, 850);
|
||||
});
|
||||
after('clean up archives', async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await es.deleteByQuery({
|
||||
index: '.reporting-*',
|
||||
refresh: true,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -22,8 +22,10 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
|
|||
const log = getService('log');
|
||||
const supertest = getService('supertest');
|
||||
const esSupertest = getService('esSupertest');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||
const retry = getService('retry');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
const DATA_ANALYST_USERNAME = 'data_analyst';
|
||||
const DATA_ANALYST_PASSWORD = 'data_analyst-password';
|
||||
|
@ -32,11 +34,11 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
|
|||
|
||||
const initEcommerce = async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
};
|
||||
const teardownEcommerce = async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await deleteAllReports();
|
||||
};
|
||||
|
||||
|
|
|
@ -14,10 +14,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
const PageObjects = getPageObjects(['common', 'reporting']);
|
||||
const log = getService('log');
|
||||
const supertest = getService('supertestWithoutAuth');
|
||||
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const reportingApi = getService('reportingAPI');
|
||||
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
|
||||
|
||||
const postJobJSON = async (
|
||||
apiPath: string,
|
||||
|
@ -31,12 +32,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
describe('Polling for jobs', () => {
|
||||
beforeEach(async () => {
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
|
||||
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.load(ecommerceSOPath);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce_kibana');
|
||||
await kibanaServer.importExport.unload(ecommerceSOPath);
|
||||
await reportingApi.deleteAllReports();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue