Skip to content

Commit

Permalink
feat(coral): Update copy
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Anderson <[email protected]>
  • Loading branch information
Mathieu Anderson committed Nov 22, 2023
1 parent d673c81 commit bad3928
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe("TopicMessages", () => {
const switchInput = screen.getByRole("checkbox");

const switchGroupDefault = screen.getByRole("group", {
name: "Fetching mode Get the latest messages",
name: "Fetching mode Select message offset",
});

expect(switchGroupDefault).toBeVisible();
Expand All @@ -61,7 +61,7 @@ describe("TopicMessages", () => {
await userEvent.click(switchInput);

const switchGroupCustom = screen.getByRole("group", {
name: "Fetching mode Get a specific offset",
name: "Fetching mode Specify message offset",
});

expect(switchGroupCustom).toBeVisible();
Expand All @@ -88,7 +88,7 @@ describe("TopicMessages", () => {
const switchInput = screen.getByRole("checkbox");

const switchGroupDefault = screen.getByRole("group", {
name: "Fetching mode Get the latest messages",
name: "Fetching mode Select message offset",
});

expect(switchGroupDefault).toBeVisible();
Expand All @@ -115,7 +115,7 @@ describe("TopicMessages", () => {
const switchInput = screen.getByRole("checkbox");

const switchGroupCustom = screen.getByRole("group", {
name: "Fetching mode Get a specific offset",
name: "Fetching mode Specify message offset",
});

expect(switchGroupCustom).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ function TopicMessages() {
labelText="Fetching mode"
description={
fetchingMode === "Default"
? "Get the latest messages"
: "Get a specific offset"
? "Select message offset"
: "Specify message offset"
}
>
<Switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("TopicMessageFilters", () => {
);
within(
screen.getByRole("group", {
name: "Number of messages Choose how many recent messages you want to view from this topic.",
name: "Number of messages Select number of messages to display from this topic",
})
)
.getAllByRole("radio")
Expand Down Expand Up @@ -97,12 +97,12 @@ describe("TopicMessageFilters", () => {
);
expect(
screen.getByRole("spinbutton", {
name: "Partition ID * Choose which partition you want to query.",
name: "Partition ID * Enter partition ID to retrieve last messages",
})
).toBeVisible();
expect(
screen.getByRole("spinbutton", {
name: "Number of messages * Choose how many recent messages you want to view from this partition.",
name: "Number of messages * Set the number of recent messages to display from this partition",
})
).toBeVisible();
});
Expand All @@ -127,10 +127,10 @@ describe("TopicMessageFilters", () => {
);

const partitionIdInput = screen.getByRole("spinbutton", {
name: "Partition ID * Choose which partition you want to query.",
name: "Partition ID * Enter partition ID to retrieve last messages",
});
const customOffsetInput = screen.getByRole("spinbutton", {
name: "Number of messages * Choose how many recent messages you want to view from this partition.",
name: "Number of messages * Set the number of recent messages to display from this partition",
});

await userEvent.type(partitionIdInput, "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ function TopicMessageFilters({
labelText="Number of messages"
disabled={disabled}
onChange={(value) => onDefaultOffsetChange(value as DefaultOffset)}
description={
"Choose how many recent messages you want to view from this topic."
}
description={"Select number of messages to display from this topic"}
>
{defaultOffsets.map((defaultOffset) => {
if (defaultOffset === "custom") {
Expand All @@ -61,8 +59,8 @@ function TopicMessageFilters({
<Input
value={values.partitionId || undefined}
labelText="Partition ID"
placeholder={"1"}
description={"Choose which partition you want to query."}
placeholder={"0"}
description={"Enter partition ID to retrieve last messages"}
onChange={(e) => onPartitionIdChange(e.target.value)}
type="number"
helperText={filterErrors.partitionIdFilters || undefined}
Expand All @@ -74,7 +72,7 @@ function TopicMessageFilters({
labelText="Number of messages"
placeholder={"50"}
description={
"Choose how many recent messages you want to view from this partition."
"Set the number of recent messages to display from this partition"
}
onChange={(e) => onCustomOffsetChange(e.target.value)}
type="number"
Expand Down

0 comments on commit bad3928

Please sign in to comment.