diff --git a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_list.test.js b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_list.test.js index 95cc47abb9efa..62440d7422e3c 100644 --- a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_list.test.js +++ b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/auto_follow_pattern_list.test.js @@ -62,6 +62,7 @@ describe('', () => { }); describe('when there are multiple pages of auto-follow patterns', () => { + let find; let component; let table; let actions; @@ -81,7 +82,7 @@ describe('', () => { httpRequestsMockHelpers.setLoadAutoFollowPatternsResponse({ patterns: autoFollowPatterns }); // Mount the component - ({ component, table, actions, form } = setup()); + ({ find, component, table, actions, form } = setup()); await nextTick(); // Make sure that the http request is fulfilled component.update(); @@ -97,7 +98,7 @@ describe('', () => { }); test('search works', () => { - form.setInputValue(component.find('input[type="search"]'), 'unique'); + form.setInputValue(find('autoFollowPatternSearch'), 'unique'); const { tableCellsValues } = table.getMetaData('autoFollowPatternListTable'); expect(tableCellsValues.length).toBe(1); }); diff --git a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_indices_list.test.js b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_indices_list.test.js index e7f20a1b78c71..29acd83e6f706 100644 --- a/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_indices_list.test.js +++ b/x-pack/plugins/cross_cluster_replication/public/__jest__/client_integration/follower_indices_list.test.js @@ -68,6 +68,7 @@ describe('', () => { }); describe('when there are multiple pages of follower indices', () => { + let find; let component; let table; let actions; @@ -91,7 +92,7 @@ describe('', () => { httpRequestsMockHelpers.setLoadFollowerIndicesResponse({ indices: followerIndices }); // Mount the component - ({ component, table, actions, form } = setup()); + ({ find, component, table, actions, form } = setup()); await nextTick(); // Make sure that the http request is fulfilled component.update(); @@ -107,7 +108,7 @@ describe('', () => { }); test('search works', () => { - form.setInputValue(component.find('input[type="search"]'), 'unique'); + form.setInputValue(find('followerIndexSearch'), 'unique'); const { tableCellsValues } = table.getMetaData('followerIndexListTable'); expect(tableCellsValues.length).toBe(1); }); diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js index 3c122e3b8f9bc..d682fdaadf818 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/auto_follow_pattern_list/components/auto_follow_pattern_table/auto_follow_pattern_table.js @@ -336,6 +336,7 @@ export class AutoFollowPatternTable extends PureComponent { onChange: this.onSearch, box: { incremental: true, + 'data-test-subj': 'autoFollowPatternSearch', }, }; diff --git a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js index 9bb5e0305eecf..e95b3b0356aba 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/sections/home/follower_indices_list/components/follower_indices_table/follower_indices_table.js @@ -318,6 +318,7 @@ export class FollowerIndicesTable extends PureComponent { onChange: this.onSearch, box: { incremental: true, + 'data-test-subj': 'followerIndexSearch', }, }; diff --git a/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js b/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js index e72ea815aad83..6dd9b53fa52d8 100644 --- a/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js +++ b/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js @@ -70,11 +70,11 @@ describe('', () => { }); describe('when there are multiple pages of remote clusters', () => { + let find; let table; let actions; let waitFor; let form; - let component; const remoteClusters = [ { @@ -94,7 +94,7 @@ describe('', () => { httpRequestsMockHelpers.setLoadRemoteClustersResponse(remoteClusters); await act(async () => { - ({ component, table, actions, waitFor, form } = setup()); + ({ find, table, actions, waitFor, form } = setup()); await waitFor('remoteClusterListTable'); }); }); @@ -109,7 +109,7 @@ describe('', () => { }); test('search works', () => { - form.setInputValue(component.find('input[type="search"]'), 'unique'); + form.setInputValue(find('remoteClusterSearch'), 'unique'); const { tableCellsValues } = table.getMetaData('remoteClusterListTable'); expect(tableCellsValues.length).toBe(1); }); diff --git a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js index 11e3eb0a0c8e4..739c6e26784ef 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js +++ b/x-pack/plugins/remote_clusters/public/application/sections/remote_cluster_list/remote_cluster_table/remote_cluster_table.js @@ -333,6 +333,7 @@ export class RemoteClusterTable extends Component { onChange: this.onSearch, box: { incremental: true, + 'data-test-subj': 'remoteClusterSearch', }, };