feat(tests, components): enhance Cypress commands and UI elements for improved testing and accessibility

- Added new Cypress commands for mocking admin-related API interactions, including list, create, update, delete, and change status functionalities.
- Introduced data-cy attributes across various components (e.g., Breadcrumbs, Forms, Tables) to improve testability and accessibility.
- Updated existing components to support new data-cy attributes for better integration with Cypress tests.
This commit is contained in:
AmirReza Jamali
2026-04-25 13:25:23 +03:30
parent 2a4f3e7e4b
commit eab516c7f3
24 changed files with 814 additions and 23 deletions
+3 -3
View File
@@ -13,11 +13,11 @@ const TableSkeleton = ({
cellColSpan = 100,
}: IProps) => {
return (
<TableBody>
<TableBody data-cy="table-skeleton">
{Array.from({ length }).map((_, i) => (
<TableRow key={i}>
<TableRow key={i} data-cy={`table-skeleton-row-${i}`}>
{Array.from({ length: column }).map((_, j) => (
<TableCell key={j} colSpan={cellColSpan}>
<TableCell key={j} colSpan={cellColSpan} data-cy="table-skeleton-cell">
<Skeleton className="h-8 rounded-lg" />
</TableCell>
))}