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

[Archive Migration][Partial] discover apps-management #110444

Merged
6 changes: 2 additions & 4 deletions test/functional/apps/management/_field_formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { FIELD_FORMAT_IDS } from '../../../../src/plugins/field_formats/common';
import { WebElementWrapper } from '../../services/lib/web_element_wrapper';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const PageObjects = getPageObjects(['settings', 'common']);
Expand All @@ -32,13 +31,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'test_field_formatters',
'test_logstash_reader',
]);
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
await kibanaServer.uiSettings.replace({});
});

after(async function afterAll() {
await PageObjects.settings.navigateTo();
await esArchiver.emptyKibanaIndex();
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
});

describe('set and change field formatter', function describeIndexTests() {
Expand Down
8 changes: 6 additions & 2 deletions test/functional/apps/management/_handle_version_conflict.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import expect from '@kbn/expect';

export default function ({ getService, getPageObjects }) {
const testSubjects = getService('testSubjects');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const es = getService('es');
const retry = getService('retry');
Expand All @@ -30,7 +30,11 @@ export default function ({ getService, getPageObjects }) {
describe('index version conflict', function describeIndexTests() {
before(async function () {
await browser.setWindowSize(1200, 800);
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
});

after(async () => {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
});

it('Should be able to surface version conflict notification while creating scripted field', async function () {
Expand Down
1 change: 1 addition & 0 deletions test/functional/apps/management/_index_patterns_empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
path: '/logstash-a',
method: 'DELETE',
});
await kibanaServer.savedObjects.clean({ types: ['index-pattern'] });
});

// create index pattern and return to verify list
Expand Down
12 changes: 6 additions & 6 deletions test/functional/apps/management/_mgmt_import_saved_objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ import expect from '@kbn/expect';
import path from 'path';

export default function ({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'settings', 'header', 'savedObjects']);

//in 6.4.0 bug the Saved Search conflict would be resolved and get imported but the visualization
//that referenced the saved search was not imported.( https://github.com/elastic/kibana/issues/22238)

describe('mgmt saved objects', function describeIndexTests() {
beforeEach(async function () {
await esArchiver.emptyKibanaIndex();
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
before(async () => {
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
await PageObjects.settings.navigateTo();
});

afterEach(async function () {
await esArchiver.unload('test/functional/fixtures/es_archiver/discover');
after(async () => {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
wayneseymour marked this conversation as resolved.
Show resolved Hide resolved
await kibanaServer.savedObjects.clean({ types: ['search', 'visualization'] });
});

it('should import saved objects mgmt', async function () {
Expand Down
9 changes: 2 additions & 7 deletions test/functional/apps/management/_runtime_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import expect from '@kbn/expect';

export default function ({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const log = getService('log');
const browser = getService('browser');
Expand All @@ -23,16 +22,12 @@ export default function ({ getService, getPageObjects }) {

before(async function () {
await browser.setWindowSize(1200, 800);
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
// delete .kibana index and then wait for Kibana to re-create it
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
await kibanaServer.uiSettings.replace({});
await kibanaServer.uiSettings.update({});
});

after(async function afterAll() {
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.removeLogstashIndexPatternIfExist();
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
});

describe('create runtime field', function describeIndexTests() {
Expand Down
11 changes: 4 additions & 7 deletions test/functional/apps/management/_scripted_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import expect from '@kbn/expect';

export default function ({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const log = getService('log');
const browser = getService('browser');
Expand All @@ -46,16 +45,14 @@ export default function ({ getService, getPageObjects }) {

before(async function () {
await browser.setWindowSize(1200, 800);
await esArchiver.load('test/functional/fixtures/es_archiver/discover');
// delete .kibana index and then wait for Kibana to re-create it
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
await kibanaServer.uiSettings.replace({});
await kibanaServer.uiSettings.update({ 'doc_table:legacy': true });
});

after(async function afterAll() {
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.removeLogstashIndexPatternIfExist();
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
await kibanaServer.uiSettings.replace({});
});

it('should not allow saving of invalid scripts', async function () {
Expand Down Expand Up @@ -125,7 +122,7 @@ export default function ({ getService, getPageObjects }) {
'painless',
'number',
null,
'1',
'100',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change was just to help test if the scripted field existing but was down below the view of the field list. But it doesn't really matter if you change it back or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I remember rapping with you about that. It was like "visibility" or something.
I'll leave it for now, but I'm glad we've this comment here, for posterity.

script
);
await retry.try(async function () {
Expand Down