Skip to content

Commit

Permalink
[ILM] Added filtering by policy name to the a11y test to find the cor…
Browse files Browse the repository at this point in the history
…rect ILM policy in the list
  • Loading branch information
yuliacech committed Oct 26, 2021
1 parent f4726da commit 955af76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ export const PolicyTable: React.FunctionComponent<Props> = ({ policies }) => {
direction: 'asc',
},
}}
search={{ box: { incremental: true } }}
search={{
box: { incremental: true, 'data-test-subj': 'ilmSearchBar' },
}}
tableLayout="auto"
items={policies}
columns={columns}
Expand Down
5 changes: 5 additions & 0 deletions x-pack/test/accessibility/apps/index_lifecycle_management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esClient = getService('es');
const a11y = getService('a11y');

const filterByPolicyName = async (policyName: string) => {
await testSubjects.setValue('ilmSearchBar', policyName);
};

const findPolicyLinkInListView = async (policyName: string) => {
await filterByPolicyName(policyName);
const links = await testSubjects.findAll('policyTablePolicyNameLink');
for (const link of links) {
const name = await link.getVisibleText();
Expand Down

0 comments on commit 955af76

Please sign in to comment.