Skip to content
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 @@ -96,18 +96,21 @@ export function getTabs(
tabs.push({
name: getTitle('indexed', filteredCount, totalCount),
id: TAB_INDEXED_FIELDS,
'data-test-subj': 'tab-indexedFields',
});

if (indexPatternListProvider.areScriptedFieldsEnabled(indexPattern)) {
tabs.push({
name: getTitle('scripted', filteredCount, totalCount),
id: TAB_SCRIPTED_FIELDS,
'data-test-subj': 'tab-scriptedFields',
});
}

tabs.push({
name: getTitle('sourceFilters', filteredCount, totalCount),
id: TAB_SOURCE_FILTERS,
'data-test-subj': 'tab-sourceFilters',
});

return tabs;
Expand Down
16 changes: 7 additions & 9 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,15 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider

async getFieldsTabCount() {
return retry.try(async () => {
const indexedFieldsTab = await find.byCssSelector('#indexedFields .euiTab__content');
const text = await indexedFieldsTab.getVisibleText();
return text.split(/[()]/)[1];
const text = await testSubjects.getVisibleText('tab-indexedFields');
return text.split(' ')[1].replace(/\((.*)\)/, '$1');
});
}

async getScriptedFieldsTabCount() {
return await retry.try(async () => {
const scriptedFieldsTab = await find.byCssSelector('#scriptedFields .euiTab__content');
const text = await scriptedFieldsTab.getVisibleText();
return text.split(/[()]/)[1];
const text = await testSubjects.getVisibleText('tab-scriptedFields');
return text.split(' ')[2].replace(/\((.*)\)/, '$1');
});
}

Expand Down Expand Up @@ -431,17 +429,17 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider

async clickFieldsTab() {
log.debug('click Fields tab');
await find.clickByCssSelector('#indexedFields');
await testSubjects.click('tab-indexedFields');
}

async clickScriptedFieldsTab() {
log.debug('click Scripted Fields tab');
await find.clickByCssSelector('#scriptedFields');
await testSubjects.click('tab-scriptedFields');
}

async clickSourceFiltersTab() {
log.debug('click Source Filters tab');
await find.clickByCssSelector('#sourceFilters');
await testSubjects.click('tab-sourceFilters');
}

async editScriptedField(name: string) {
Expand Down