Skip to content

Commit

Permalink
[Search] Fixing connectors flaky FTR (#203520)
Browse files Browse the repository at this point in the history
## Summary

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

#203462

---------

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
JoseLuisGJ and elasticmachine authored Dec 12, 2024
1 parent a1a78d1 commit 5e69fd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function SvlSearchConnectorsPageProvider({ getService }: FtrProviderConte
const browser = getService('browser');
const retry = getService('retry');
const es = getService('es');
const comboBox = getService('comboBox');
return {
helpers: {
async deleteAllConnectors() {
Expand Down Expand Up @@ -63,10 +64,7 @@ export function SvlSearchConnectorsPageProvider({ getService }: FtrProviderConte
async editType(type: string) {
await testSubjects.existOrFail('serverlessSearchEditConnectorType');
await testSubjects.existOrFail('serverlessSearchEditConnectorTypeChoices');
await testSubjects.click('serverlessSearchEditConnectorTypeChoices');
await testSubjects.setValue('serverlessSearchEditConnectorTypeChoices', type);
await testSubjects.exists(`serverlessSearchConnectorServiceType-${type}`);
await testSubjects.click(`serverlessSearchConnectorServiceType-${type}`);
await comboBox.filterOptionsList('serverlessSearchEditConnectorTypeChoices', type);
},
async expectConnectorIdToMatchUrl(connectorId: string) {
expect(await browser.getCurrentUrl()).contain(`/app/connectors/${connectorId}`);
Expand Down
3 changes: 3 additions & 0 deletions x-pack/test_serverless/functional/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

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

0 comments on commit 5e69fd1

Please sign in to comment.