Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed Apr 23, 2020
1 parent 078d346 commit c617426
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location
options={scriptedFieldLanguages}
value={scriptedFieldLanguageFilter}
onChange={e => setScriptedFieldLanguageFilter(e.target.value)}
data-test-subj="indexedFieldTypeFilterDropdown"
data-test-subj="scriptedFieldLanguageFilterDropdown"
/>
</EuiFlexItem>
)}
Expand Down
14 changes: 7 additions & 7 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider
return retry.try(async () => {
const indexedFieldsTab = await find.byCssSelector('#indexedFields .euiTab__content');
const text = await indexedFieldsTab.getVisibleText();
return text.replace(/\w+\s+\((.*)\)/, '$1');
return text.split(/[()]/)[1];
});
}

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

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

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

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

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

async editScriptedField(name: string) {
Expand Down

0 comments on commit c617426

Please sign in to comment.