Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing es_archives/reporting/ecommerce_kibana with kbn_archiver/reporting/ecommerce.json as part of migrating to kbn_archiver #102825

Merged
merged 13 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down Expand Up @@ -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 () {
Expand Down
10 changes: 5 additions & 5 deletions x-pack/test/functional/apps/dashboard/reporting/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 6 additions & 5 deletions x-pack/test/functional/apps/discover/reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -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,
Expand Down Expand Up @@ -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');
});

Expand Down Expand Up @@ -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'));
Expand Down
5 changes: 3 additions & 2 deletions x-pack/test/functional/apps/discover/saved_searches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

Expand Down
9 changes: 5 additions & 4 deletions x-pack/test/functional/apps/visualize/reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down
Loading