[Search] Fixing connectors flaky FTR (#203520)

## Summary

Fixing flaky test when choosing a connector with the new EuiComboBox
component.

https://github.com/elastic/kibana/issues/203462

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
José Luis González 2024-12-12 18:57:01 +01:00 committed by GitHub
parent a1a78d1dc4
commit 5e69fd1498
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -12,6 +12,7 @@ export function SvlSearchConnectorsPageProvider({ getService }: FtrProviderConte
const browser = getService('browser'); const browser = getService('browser');
const retry = getService('retry'); const retry = getService('retry');
const es = getService('es'); const es = getService('es');
const comboBox = getService('comboBox');
return { return {
helpers: { helpers: {
async deleteAllConnectors() { async deleteAllConnectors() {
@ -63,10 +64,7 @@ export function SvlSearchConnectorsPageProvider({ getService }: FtrProviderConte
async editType(type: string) { async editType(type: string) {
await testSubjects.existOrFail('serverlessSearchEditConnectorType'); await testSubjects.existOrFail('serverlessSearchEditConnectorType');
await testSubjects.existOrFail('serverlessSearchEditConnectorTypeChoices'); await testSubjects.existOrFail('serverlessSearchEditConnectorTypeChoices');
await testSubjects.click('serverlessSearchEditConnectorTypeChoices'); await comboBox.filterOptionsList('serverlessSearchEditConnectorTypeChoices', type);
await testSubjects.setValue('serverlessSearchEditConnectorTypeChoices', type);
await testSubjects.exists(`serverlessSearchConnectorServiceType-${type}`);
await testSubjects.click(`serverlessSearchConnectorServiceType-${type}`);
}, },
async expectConnectorIdToMatchUrl(connectorId: string) { async expectConnectorIdToMatchUrl(connectorId: string) {
expect(await browser.getCurrentUrl()).contain(`/app/connectors/${connectorId}`); expect(await browser.getCurrentUrl()).contain(`/app/connectors/${connectorId}`);

View file

@ -5,6 +5,7 @@
* 2.0. * 2.0.
*/ */
import { ComboBoxService } from '@kbn/test-suites-src/functional/services/combo_box';
import { services as deploymentAgnosticFunctionalServices } from './deployment_agnostic_services'; import { services as deploymentAgnosticFunctionalServices } from './deployment_agnostic_services';
import { services as svlSharedServices } from '../../shared/services'; import { services as svlSharedServices } from '../../shared/services';
import { SvlCommonNavigationServiceProvider } from './svl_common_navigation'; import { SvlCommonNavigationServiceProvider } from './svl_common_navigation';
@ -35,4 +36,6 @@ export const services = {
// log services // log services
svlLogsSynthtraceClient: LogsSynthtraceProvider, svlLogsSynthtraceClient: LogsSynthtraceProvider,
alertingApi: SvlApiIntegrationSvcs.alertingApi, alertingApi: SvlApiIntegrationSvcs.alertingApi,
// EUI components
comboBox: ComboBoxService,
}; };