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

restore index pattern management data-test-subj's #64697

Merged
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