mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Discover] Cleanup in runtime fields editor functional test (#97820)
* [Discover] Cleanup in runtime fields editor functional test * Add uuid to field label * Adding field after the update * Unskip test * Remove uuid from custom label * Remove unused import
This commit is contained in:
parent
9cade4299f
commit
26962cd705
1 changed files with 6 additions and 10 deletions
|
@ -32,8 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await fieldEditor.save();
|
||||
};
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/97864
|
||||
describe.skip('discover integration with runtime fields editor', function describeIndexTests() {
|
||||
describe('discover integration with runtime fields editor', function describeIndexTests() {
|
||||
before(async function () {
|
||||
await esArchiver.load('discover');
|
||||
await esArchiver.loadIfNeeded('logstash_functional');
|
||||
|
@ -43,19 +42,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await kibanaServer.uiSettings.replace({ 'discover:searchFieldsFromSource': true });
|
||||
});
|
||||
|
||||
it('allows adding custom label to existing fields', async function () {
|
||||
await PageObjects.discover.clickFieldListItemAdd('bytes');
|
||||
const customLabel = 'megabytes';
|
||||
await PageObjects.discover.editField('bytes');
|
||||
await fieldEditor.enableCustomLabel();
|
||||
await fieldEditor.setCustomLabel('megabytes');
|
||||
await fieldEditor.setCustomLabel(customLabel);
|
||||
await fieldEditor.save();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
expect(await PageObjects.discover.getDocHeader()).to.have.string('megabytes');
|
||||
expect((await PageObjects.discover.getAllFieldNames()).includes('megabytes')).to.be(true);
|
||||
expect((await PageObjects.discover.getAllFieldNames()).includes(customLabel)).to.be(true);
|
||||
await PageObjects.discover.clickFieldListItemAdd('bytes');
|
||||
expect(await PageObjects.discover.getDocHeader()).to.have.string(customLabel);
|
||||
});
|
||||
|
||||
it('allows creation of a new field', async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue