Skip to content

Commit 44e0f53

Browse files
authored
Use 'box' singular in totals row (#2508)
1 parent 8237d05 commit 44e0f53

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

front/src/views/Boxes/BoxesView.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ describe("4.8.1 - Initial load of Page", () => {
523523
await user.type(searchInput, "pants");
524524
await waitFor(
525525
() => {
526-
expect(screen.getByText("1 boxes")).toBeInTheDocument();
526+
expect(screen.getByText("1 box")).toBeInTheDocument();
527527
expect(screen.getByText("1481666")).toBeInTheDocument();
528528
expect(screen.queryByText("8650860")).not.toBeInTheDocument();
529529
},
@@ -559,7 +559,7 @@ describe("4.8.1 - Initial load of Page", () => {
559559
await user.type(searchInput, "wh");
560560
await waitFor(
561561
() => {
562-
expect(screen.getByText("1 boxes")).toBeInTheDocument();
562+
expect(screen.getByText("1 box")).toBeInTheDocument();
563563
expect(screen.queryByText("1481666")).not.toBeInTheDocument();
564564
expect(screen.getByText("8650860")).toBeInTheDocument();
565565
},

front/src/views/Boxes/components/BoxesTable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ function BoxesTable({
249249
tableConfig.isNotMounted ? (
250250
<Skeleton height={5} width={10} mr={2} />
251251
) : hasExecutedInitialFetchOfBoxes.current ? (
252-
<Text as="span">{boxCount} boxes</Text>
252+
<Text as="span">
253+
{boxCount} box{boxCount === 1 ? "" : "es"}
254+
</Text>
253255
) : (
254256
<Text as="span">Data unavailable</Text>
255257
)}

0 commit comments

Comments
 (0)