Skip to content

Commit

Permalink
test: add test IDs [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Dec 7, 2023
1 parent c26dde0 commit 5f259d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/app-admin/src/components/SimpleForm/SimpleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ interface SimpleFormHeaderProps {
title: React.ReactNode;
icon?: React.ReactElement<any>;
children?: React.ReactNode;
["data-testid"]?: string;
}
export const SimpleFormHeader = (props: SimpleFormHeaderProps) => {
return (
<Grid className={header}>
<Grid className={header} data-testid={props["data-testid"]}>
<Cell span={props.children ? 6 : 12} className={title}>
<React.Fragment>
{props.icon && <Icon className={icon} icon={props.icon} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ const CategoriesForm: React.FC<CategoriesFormProps> = ({ canCreate }) => {
{({ data, form, Bind }) => (
<SimpleForm>
{loading && <CircularProgress />}
<SimpleFormHeader title={data.name || t`New category`} />
<SimpleFormHeader
title={data.name || t`New category`}
data-testid={"pb-categories-form-title"}
/>
<SimpleFormContent>
<Grid>
<Cell span={6}>
Expand Down

0 comments on commit 5f259d0

Please sign in to comment.