@databiosphere/findable-ui 38.0.0 → 38.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "38.0.0"
2
+ ".": "38.1.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [38.1.0](https://github.com/DataBiosphere/findable-ui/compare/v38.0.0...v38.1.0) (2025-07-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add data test id to summary ([#557](https://github.com/DataBiosphere/findable-ui/issues/557)) ([#558](https://github.com/DataBiosphere/findable-ui/issues/558)) ([cf97aa5](https://github.com/DataBiosphere/findable-ui/commit/cf97aa54a0ca70b0970ad169f8ae91d8585ccffd))
9
+
3
10
  ## [38.0.0](https://github.com/DataBiosphere/findable-ui/compare/v37.1.0...v38.0.0) (2025-07-09)
4
11
 
5
12
 
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
+ import { TEST_IDS } from "../../../../../../tests/testIds";
2
3
  import { SectionTitle } from "../../../../../common/Section/components/SectionTitle/sectionTitle";
3
4
  import { GridPaperSection } from "../../../../../common/Section/section.styles";
4
5
  import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
5
6
  import { Label, Values } from "../../exportSummary.styles";
6
7
  export const ExportSelectedDataSummary = ({ isLoading, summaries, }) => {
7
- return (React.createElement(GridPaperSection, null,
8
+ return (React.createElement(GridPaperSection, { "data-testid": TEST_IDS.EXPORT_SUMMARY },
8
9
  React.createElement(Loading, { loading: isLoading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
9
10
  React.createElement(SectionTitle, { title: "Selected Data Summary" }),
10
11
  summaries.map(([label, value], i) => (React.createElement("div", { key: i },
@@ -2,13 +2,14 @@ import { Typography } from "@mui/material";
2
2
  import React, { Fragment } from "react";
3
3
  import { useSummary } from "../../../../../../../hooks/useSummary";
4
4
  import { TYPOGRAPHY_PROPS } from "../../../../../../../styles/common/mui/typography";
5
+ import { TEST_IDS } from "../../../../../../../tests/testIds";
5
6
  import { GRID_PROPS } from "./constants";
6
7
  import { StyledDot, StyledGrid } from "./summary.styles";
7
8
  export const Summary = ({ className, }) => {
8
9
  const { summaries } = useSummary() || {};
9
10
  if (!summaries)
10
11
  return null;
11
- return (React.createElement(StyledGrid, { ...GRID_PROPS, className: className }, summaries.map(([count, label], i) => (React.createElement(Fragment, { key: i },
12
+ return (React.createElement(StyledGrid, { ...GRID_PROPS, className: className, "data-testid": TEST_IDS.ENTITY_SUMMARY }, summaries.map(([count, label], i) => (React.createElement(Fragment, { key: i },
12
13
  i !== 0 && React.createElement(StyledDot, null),
13
14
  React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_SMALL_500 }, count),
14
15
  React.createElement(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_SMALL_400 }, label))))));
@@ -1,6 +1,8 @@
1
1
  export declare const TEST_IDS: {
2
2
  CLEAR_ALL_FILTERS: string;
3
+ ENTITY_SUMMARY: string;
3
4
  EXPORT_BUTTON: string;
5
+ EXPORT_SUMMARY: string;
4
6
  FILTERS: string;
5
7
  FILTER_CONTROLS: string;
6
8
  FILTER_COUNT: string;
@@ -1,6 +1,8 @@
1
1
  export const TEST_IDS = {
2
2
  CLEAR_ALL_FILTERS: "clear-all-filters",
3
+ ENTITY_SUMMARY: "entity-summary",
3
4
  EXPORT_BUTTON: "export-button",
5
+ EXPORT_SUMMARY: "export-summary",
4
6
  FILTERS: "filters",
5
7
  FILTER_CONTROLS: "filter-controls",
6
8
  FILTER_COUNT: "filter-count",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "38.0.0",
3
+ "version": "38.1.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode } from "react";
2
+ import { TEST_IDS } from "../../../../../../tests/testIds";
2
3
  import { SectionTitle } from "../../../../../common/Section/components/SectionTitle/sectionTitle";
3
4
  import { GridPaperSection } from "../../../../../common/Section/section.styles";
4
5
  import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
@@ -17,7 +18,7 @@ export const ExportSelectedDataSummary = ({
17
18
  summaries,
18
19
  }: ExportSelectedDataSummaryProps): JSX.Element => {
19
20
  return (
20
- <GridPaperSection>
21
+ <GridPaperSection data-testid={TEST_IDS.EXPORT_SUMMARY}>
21
22
  <Loading loading={isLoading} panelStyle={LOADING_PANEL_STYLE.INHERIT} />
22
23
  <SectionTitle title="Selected Data Summary" />
23
24
  {summaries.map(([label, value], i) => (
@@ -2,6 +2,7 @@ import { Typography } from "@mui/material";
2
2
  import React, { Fragment } from "react";
3
3
  import { useSummary } from "../../../../../../../hooks/useSummary";
4
4
  import { TYPOGRAPHY_PROPS } from "../../../../../../../styles/common/mui/typography";
5
+ import { TEST_IDS } from "../../../../../../../tests/testIds";
5
6
  import { BaseComponentProps } from "../../../../../../types";
6
7
  import { GRID_PROPS } from "./constants";
7
8
  import { StyledDot, StyledGrid } from "./summary.styles";
@@ -14,7 +15,11 @@ export const Summary = ({
14
15
  if (!summaries) return null;
15
16
 
16
17
  return (
17
- <StyledGrid {...GRID_PROPS} className={className}>
18
+ <StyledGrid
19
+ {...GRID_PROPS}
20
+ className={className}
21
+ data-testid={TEST_IDS.ENTITY_SUMMARY}
22
+ >
18
23
  {summaries.map(([count, label], i) => (
19
24
  <Fragment key={i}>
20
25
  {i !== 0 && <StyledDot />}
@@ -1,6 +1,8 @@
1
1
  export const TEST_IDS = {
2
2
  CLEAR_ALL_FILTERS: "clear-all-filters",
3
+ ENTITY_SUMMARY: "entity-summary",
3
4
  EXPORT_BUTTON: "export-button",
5
+ EXPORT_SUMMARY: "export-summary",
4
6
  FILTERS: "filters",
5
7
  FILTER_CONTROLS: "filter-controls",
6
8
  FILTER_COUNT: "filter-count",