Skip to content

Commit

Permalink
restore index pattern management data-test-subj's (#64697) (#65888)
Browse files Browse the repository at this point in the history
* restore index pattern management data-test-subj's
  • Loading branch information
mattkime authored May 8, 2020
1 parent db9c48d commit fcc9399
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
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

0 comments on commit fcc9399

Please sign in to comment.