Skip to content

Commit 04fe156

Browse files
committed
refactor(ml): revert ComboBoxService option retrieval
1 parent a315004 commit 04fe156

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

src/platform/test/functional/services/combo_box.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ export class ComboBoxService extends FtrService {
8787
public async getOptions(comboBoxSelector: string) {
8888
const comboBoxElement = await this.testSubjects.find(comboBoxSelector);
8989
await this.openOptionsList(comboBoxElement);
90-
return await this.find.allByCssSelector(
91-
'.euiComboBoxOption, .euiFilterSelectItem',
92-
this.WAIT_FOR_EXISTS_TIME
93-
);
90+
return await this.find.allByCssSelector('.euiComboBoxOption', this.WAIT_FOR_EXISTS_TIME);
9491
}
9592

9693
/**
@@ -119,7 +116,7 @@ export class ComboBoxService extends FtrService {
119116

120117
if (trimmedValue !== undefined) {
121118
const selectOptions = await this.find.allByCssSelector(
122-
`.euiComboBoxOption[title="${trimmedValue}"], .euiFilterSelectItem[title="${trimmedValue}"]`,
119+
`.euiComboBoxOption[title="${trimmedValue}"]`,
123120
this.WAIT_FOR_EXISTS_TIME
124121
);
125122

@@ -130,10 +127,7 @@ export class ComboBoxService extends FtrService {
130127
const alternateTitle = (
131128
await Promise.all(
132129
(
133-
await this.find.allByCssSelector(
134-
`.euiComboBoxOption, .euiFilterSelectItem`,
135-
this.WAIT_FOR_EXISTS_TIME
136-
)
130+
await this.find.allByCssSelector(`.euiComboBoxOption`, this.WAIT_FOR_EXISTS_TIME)
137131
).map(async (e) => {
138132
const title = (await e.getAttribute('title')) ?? '';
139133
return { title, formattedTitle: title.toLowerCase().trim() };
@@ -145,7 +139,7 @@ export class ComboBoxService extends FtrService {
145139

146140
const [alternate] = alternateTitle
147141
? await this.find.allByCssSelector(
148-
`.euiComboBoxOption[title="${alternateTitle}" i], .euiFilterSelectItem[title="${alternateTitle}" i]`,
142+
`.euiComboBoxOption[title="${alternateTitle}" i]`,
149143
this.WAIT_FOR_EXISTS_TIME
150144
)
151145
: [];
@@ -160,15 +154,12 @@ export class ComboBoxService extends FtrService {
160154
this.log.warning(
161155
`comboBox.setElement - Could not find option [${trimmedValue}], using first`
162156
);
163-
const firstOption = await this.find.byCssSelector(
164-
'.euiComboBoxOption, .euiFilterSelectItem',
165-
5000
166-
);
157+
const firstOption = await this.find.byCssSelector('.euiComboBoxOption', 5000);
167158
await this.clickOption(options.clickWithMouse, firstOption);
168159
}
169160
}
170161
} else {
171-
const firstOption = await this.find.byCssSelector('.euiComboBoxOption, .euiFilterSelectItem');
162+
const firstOption = await this.find.byCssSelector('.euiComboBoxOption');
172163
await this.clickOption(options.clickWithMouse, firstOption);
173164
}
174165
await this.closeOptionsList(comboBoxElement);

x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const journey = new Journey({
2323
.step('Go to Index data visualizer', async ({ page }) => {
2424
const createButtons = page.locator(subj('mlDataVisualizerSelectIndexButton'));
2525
await createButtons.first().click();
26-
await page.waitForSelector(subj('dataVisualizerIndexPage'));
26+
await page.waitForSelector(subj('mlDataSourceSelectorButton'));
2727
})
2828
.step('Go to Data View selection', async ({ page, kibanaPage }) => {
2929
await page.click(subj('mlDataSourceSelectorButton'));
@@ -33,6 +33,7 @@ export const journey = new Journey({
3333
.locator(subj('indexPattern-switcher'))
3434
.locator(`[title="${DATA_VIEW_NAME}"]`)
3535
.click();
36+
await page.waitForSelector(subj('dataVisualizerIndexPage'), { timeout: 60000 });
3637
await page.click(subj('mlDatePickerButtonUseFullData'));
3738
await kibanaPage.waitForHeader();
3839
await page.waitForSelector(subj('dataVisualizerTable-loaded'), { timeout: 60000 });

0 commit comments

Comments
 (0)