diff --git a/packages/ui/package.json b/packages/ui/package.json index a1df4bcf8a..ce979d58d2 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -55,6 +55,8 @@ }, "devDependencies": { "@backstage/cli": "workspace:^", + "@testing-library/jest-dom": "^6.0.0", + "@testing-library/react": "^16.0.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "@types/use-sync-external-store": "^0.0.6", diff --git a/packages/ui/src/components/Table/components/Table.test.tsx b/packages/ui/src/components/Table/components/Table.test.tsx index 355c780413..f10d672af4 100644 --- a/packages/ui/src/components/Table/components/Table.test.tsx +++ b/packages/ui/src/components/Table/components/Table.test.tsx @@ -59,8 +59,8 @@ describe('Table', () => { expect(rows).toHaveLength(6); // Table should indicate it's in a loading/stale state via data-stale - // (react-aria-components Table renders this as a data attribute rather - // than aria-busy on the DOM element) + // (react-aria-components' Table does not forward aria-busy to the DOM, + // but the stale prop produces a data-stale attribute for CSS targeting) expect(table).toHaveAttribute('data-stale', 'true'); // Each skeleton row should contain Skeleton placeholder elements diff --git a/packages/ui/src/components/Table/components/Table.tsx b/packages/ui/src/components/Table/components/Table.tsx index af9ff3f40c..e5f519b8e5 100644 --- a/packages/ui/src/components/Table/components/Table.tsx +++ b/packages/ui/src/components/Table/components/Table.tsx @@ -151,10 +151,10 @@ export function Table({ {wrapResizable(