Files
grafana/public/app/plugins/datasource/prometheus/querybuilder/testUtils.ts
Ivana Huckova f34a03b2f1 Loki: Rename Labels to Label filter and update placeholders (#53446)
* Loki: Rename Labels to Label filter and update placeholders

* Update label

* Replace Label filter with Label filters based on suggestion
2022-08-12 07:38:34 -04:00

11 lines
341 B
TypeScript

import { screen, getAllByRole } from '@testing-library/react';
export function getLabelSelects(index = 0) {
const labels = screen.getByText(/Label filters/);
const selects = getAllByRole(labels.parentElement!.parentElement!.parentElement!, 'combobox');
return {
name: selects[3 * index],
value: selects[3 * index + 2],
};
}