Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(deps): update testing-library monorepo (#21786)

renovate[bot]828fc4116768
diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml
index 6b9010e201..367732afd8 100644
--- a/frontend/pnpm-lock.yaml
+++ b/frontend/pnpm-lock.yaml
@@ -397,10 +397,10 @@ importers:
'@testing-library/jest-dom':
specifier: ^7.0.0
- version: 7.0.0(@testing-library/[email protected])
'@testing-library/react':
specifier: ^16.3.2
'@tsconfig/node24':
specifier: 24.0.5
version: 24.0.5
@@ -1959,14 +1959,18 @@ packages:
resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==}
engines: {node: '>=18'}
- '@testing-library/[email protected]':
- resolution: {integrity: sha512-HKAH9C6mBo5yBG6yRO5i43L2iisencAo5z+o5P/saHUoY+miC5ivXRxHBJcFyB5ypPNxHJdK3BoF/3O4DIptMg==}
+ '@testing-library/[email protected]':
+ resolution: {integrity: sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==}
engines: {node: '>=22', npm: '>=6', yarn: '>=1'}
peerDependencies:
'@testing-library/dom': '>=10 <11'
+ vitest: '>= 0.32'
+ peerDependenciesMeta:
+ vitest:
+ optional: true
- '@testing-library/[email protected]':
- resolution: {integrity: sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g==}
+ '@testing-library/[email protected]':
+ resolution: {integrity: sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==}
engines: {node: '>=18'}
peerDependencies:
'@testing-library/dom': ^10.0.0
@@ -5427,7 +5431,7 @@ snapshots:
picocolors: 1.1.1
pretty-format: 27.5.1
- '@testing-library/[email protected](@testing-library/[email protected])':
dependencies:
'@adobe/css-tools': 4.4.4
'@testing-library/dom': 10.4.1
@@ -5436,8 +5440,10 @@ snapshots:
dom-accessibility-api: 0.6.3
picocolors: 1.1.1
redent: 3.0.0
+ optionalDependencies:
dependencies:
'@babel/runtime': 7.29.7
'@testing-library/dom': 10.4.1
diff --git a/frontend/src/apps/explain-visualizer/mssql-plan.test.ts b/frontend/src/apps/explain-visualizer/mssql-plan.test.ts
index 0102ba52b4..625a32123c 100644
--- a/frontend/src/apps/explain-visualizer/mssql-plan.test.ts
+++ b/frontend/src/apps/explain-visualizer/mssql-plan.test.ts
@@ -472,8 +472,12 @@ describe("parseMssqlPlan", () => {
expect(result.ok && result.tree.nodes).toHaveLength(101);
});
- test("rejects a plan nested deeper than the walks over it can go", () => {
- expect(parseMssqlPlan(nestedPlan(2000))).toEqual({
+ // 600 levels where the JSON parsers use 2000: this is the only parser that
+ // builds a DOM, and jsdom's XML parse is quadratic in nesting depth, so 2000
+ // levels cost two seconds before any of our code runs. Any depth past
+ // PLAN_MAX_DEPTH reaches the same guard.
+ test("refuses a plan deeper than the viewer draws", () => {
+ expect(parseMssqlPlan(nestedPlan(600))).toEqual({
ok: false,
message: PLAN_TOO_DEEP_MESSAGE,
});
diff --git a/frontend/src/modules/agent/components/ToolCallCard.test.tsx b/frontend/src/modules/agent/components/ToolCallCard.test.tsx
index f596846819..39eb17f05b 100644
--- a/frontend/src/modules/agent/components/ToolCallCard.test.tsx
+++ b/frontend/src/modules/agent/components/ToolCallCard.test.tsx
@@ -439,27 +439,63 @@ describe("ToolCallCard", () => {
unmount();
});
- test("labels row, column, and result-set previews when truncated", () => {
- const columns = Array.from({ length: 21 }, (_, i) => `column_${i}`);
- const resultSet = {
- columnNames: columns,
- rows: Array.from({ length: 101 }, () => ({
- values: columns.map((column) => ({ stringValue: column })),
+ // Each case takes one dimension past its cap and leaves the others small.
+ // What survives truncation is what renders, and the virtualizer stub above
+ // draws every row, so one fixture past all three caps at once renders 3 x 100
+ // x 20 cells and costs over a second. parseAgentQueryResult's own test covers
+ // the three caps together.
+ const truncatedQueryResult = (results: unknown[]) =>
+ JSON.stringify({ status: 200, response: { results } });
+
+ const resultSet = (rows: number, columns: number) => {
+ const columnNames = Array.from({ length: columns }, (_, i) => `column_${i}`);
+ return {
+ columnNames,
+ rows: Array.from({ length: rows }, () => ({
+ values: columnNames.map((column) => ({ stringValue: column })),
})),
};
+ };
+
+ test("labels a row preview truncated past the row cap", () => {
const { container, unmount } = renderCard(
"SQLService/Query",
- JSON.stringify({
- status: 200,
- response: { results: Array.from({ length: 4 }, () => resultSet) },
- })
+ truncatedQueryResult([resultSet(101, 1)])
+ );
+
+ expect(container.textContent).toContain("agent.query-result.showing-rows");
+ expect(container.textContent).not.toContain(
+ "agent.query-result.showing-columns"
+ );
+
+ unmount();
+ });
+
+ test("labels a column preview truncated past the column cap", () => {
+ const { container, unmount } = renderCard(
+ "SQLService/Query",
+ truncatedQueryResult([resultSet(1, 21)])
+ );
+
+ expect(container.textContent).toContain(
+ "agent.query-result.showing-columns"
+ );
+ expect(container.textContent).not.toContain(
+ "agent.query-result.showing-rows"
+ );
+
+ unmount();
+ });
+
+ test("draws only the result sets it keeps and labels the rest away", () => {
+ const { container, unmount } = renderCard(
+ "SQLService/Query",
+ truncatedQueryResult(Array.from({ length: 4 }, () => resultSet(1, 1)))
);
expect(container.querySelectorAll("[data-query-result-table-grid]")).toHaveLength(
3
);
- expect(container.textContent).toContain("agent.query-result.showing-rows");
- expect(container.textContent).toContain("agent.query-result.showing-columns");
expect(container.textContent).toContain("agent.query-result.showing-results");
unmount();