Skip to content

Commit

Permalink
[Archive Migration][Partial] discover apps-discover
Browse files Browse the repository at this point in the history
Comes from #102827

Helps with #108503

Piggy back off of the work from @tylersmalley
Only include the changes under the
test/functional/apps/discover folder.
  • Loading branch information
wayneseymour committed Aug 30, 2021
1 parent 079fc9a commit ed0075c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
11 changes: 9 additions & 2 deletions test/functional/apps/discover/_data_grid_doc_navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const defaultSettings = { defaultIndex: 'logstash-*', 'doc_table:legacy': false };

describe('discover data grid doc link', function () {
beforeEach(async function () {
before(async () => {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
await esArchiver.loadIfNeeded('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');
});

beforeEach(async function () {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update(defaultSettings);
await PageObjects.common.navigateToApp('discover');
Expand Down
3 changes: 2 additions & 1 deletion test/functional/apps/discover/_doc_navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('doc link in discover', function contextSize() {
before(async () => {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover');
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update({
'doc_table:legacy': true,
'discover:searchFieldsFromSource': true,
});
});
after(async () => {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json');
await kibanaServer.uiSettings.replace({});
});

Expand Down
4 changes: 4 additions & 0 deletions test/functional/apps/discover/_runtime_fields_editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.common.navigateToApp('discover');
});

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

it('allows adding custom label to existing fields', async function () {
const customLabel = 'megabytes';
await PageObjects.discover.editField('bytes');
Expand Down
6 changes: 5 additions & 1 deletion test/functional/apps/discover/_sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('discover sidebar', function describeIndexTests() {
before(async function () {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover');
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
await kibanaServer.uiSettings.replace({
defaultIndex: 'logstash-*',
});
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
});

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

describe('field filtering', function () {
it('should reveal and hide the filter form when the toggle is clicked', async function () {
await PageObjects.discover.openSidebarFieldFilter();
Expand Down

0 comments on commit ed0075c

Please sign in to comment.