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

Euify management edit-index-pattern component. #47448

Closed
wants to merge 10 commits into from
14 changes: 8 additions & 6 deletions test/functional/page_objects/settings_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,19 @@ export function SettingsPageProvider({ getService, getPageObjects }) {

async getFieldsTabCount() {
return retry.try(async () => {
const text = await testSubjects.getVisibleText('tab-count-indexedFields');
return text.replace(/\((.*)\)/, '$1');
const text = await testSubjects.getVisibleText('tab-indexedFields');
const index = text.indexOf('(');
return text.substring(index).replace(/\((.*)\)/, '$1');
Comment on lines +198 to +200
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EuiTabbedComponent, tab name cannot contain HTML elements. So, tab-count had to be changed to simple tab and we needed to create a substring from the tab name.

});
}

async getScriptedFieldsTabCount() {
const selector = '[data-test-subj="tab-count-scriptedFields"]';
const selector = '[data-test-subj="tab-scriptedFields"]';
return await retry.try(async () => {
const theText = await (await find.byCssSelector(selector))
.getVisibleText();
return theText.replace(/\((.*)\)/, '$1');
const index = theText.indexOf('(');
return theText.substring(index).replace(/\((.*)\)/, '$1');
});
}

Expand All @@ -230,13 +232,13 @@ export function SettingsPageProvider({ getService, getPageObjects }) {

async setFieldTypeFilter(type) {
await find.clickByCssSelector(
'select[data-test-subj="indexedFieldTypeFilterDropdown"] > option[label="' + type + '"]'
'select[data-test-subj="indexedFieldTypeFilterDropdown"] > option[value="' + type + '"]'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EuiSelect, label doesn't exist. So, it is changed to value.

);
}

async setScriptedFieldLanguageFilter(language) {
await find.clickByCssSelector(
'select[data-test-subj="scriptedFieldLanguageFilterDropdown"] > option[label="' +
'select[data-test-subj="scriptedFieldLanguageFilterDropdown"] > option[value="' +
language +
'"]'
);
Expand Down