Skip to content

Commit

Permalink
Add data-testid attributes to UI elements for unit test and automatio…
Browse files Browse the repository at this point in the history
…n tests (apache#43736)
  • Loading branch information
vatsrahul1001 authored and ellisms committed Nov 13, 2024
1 parent eaae3b2 commit eebd979
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/ui/src/components/DataTable/CardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const CardList = <TData,>({
isLoading,
table,
}: DataTableProps<TData>) => (
<Box overflow="auto" width="100%">
<Box data-testid="card-list" overflow="auto" width="100%">
<SimpleGrid {...{ column: { base: 1 }, gap: 2, ...cardDef.gridProps }}>
{table.getRowModel().rows.map((row) => (
<Box key={row.id}>
Expand Down
7 changes: 6 additions & 1 deletion airflow/ui/src/components/DataTable/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export const TableList = <TData,>({
renderSubComponent,
table,
}: DataTableProps<TData>) => (
<Table.Root maxH="calc(100vh - 10rem)" overflowY="auto" striped>
<Table.Root
data-testid="table-list"
maxH="calc(100vh - 10rem)"
overflowY="auto"
striped
>
<Table.Header bg="chakra-body-bg" position="sticky" top={0} zIndex={1}>
{table.getHeaderGroups().map((headerGroup) => (
<Table.Row key={headerGroup.id}>
Expand Down
1 change: 1 addition & 0 deletions airflow/ui/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const SearchBar = ({
startElement={<FiSearch />}
>
<Input
data-testid="search-dags"
placeholder="Search Dags"
pr={150}
{...inputProps}
Expand Down

0 comments on commit eebd979

Please sign in to comment.