💄(react) make DatePicker placeholders uppercase
This was a feedback from the QA.
This commit is contained in:
5
.changeset/calm-steaks-agree.md
Normal file
5
.changeset/calm-steaks-agree.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@openfun/cunningham-react": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
make DatePicker placeholders uppercase
|
||||||
@@ -37,7 +37,7 @@ const DateSegmentInput = ({
|
|||||||
(currentSegment.type === "literal" && previousSegment?.isPlaceholder),
|
(currentSegment.type === "literal" && previousSegment?.isPlaceholder),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{currentSegment.text}
|
{currentSegment.text?.toUpperCase()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ describe("<DatePicker/>", () => {
|
|||||||
|
|
||||||
// Date field's value should be set to a placeholder value.
|
// Date field's value should be set to a placeholder value.
|
||||||
const dateFieldContent = screen.getByRole("presentation").textContent;
|
const dateFieldContent = screen.getByRole("presentation").textContent;
|
||||||
expect(dateFieldContent).eq("mm/dd/yyyy");
|
expect(dateFieldContent).eq("MM/DD/YYYY");
|
||||||
|
|
||||||
const isGridCellSelected = screen
|
const isGridCellSelected = screen
|
||||||
.getByRole("gridcell", { name: "24" })!
|
.getByRole("gridcell", { name: "24" })!
|
||||||
|
|||||||
@@ -743,8 +743,8 @@ describe("<DateRangePicker/>", () => {
|
|||||||
|
|
||||||
// Date field's value should be set to a placeholder value.
|
// Date field's value should be set to a placeholder value.
|
||||||
const [startInput, endInput] = await screen.queryAllByRole("presentation");
|
const [startInput, endInput] = await screen.queryAllByRole("presentation");
|
||||||
expect(startInput.textContent).eq("mm/dd/yyyy");
|
expect(startInput.textContent).eq("MM/DD/YYYY");
|
||||||
expect(endInput.textContent).eq("mm/dd/yyyy");
|
expect(endInput.textContent).eq("MM/DD/YYYY");
|
||||||
|
|
||||||
const startGridCell = screen.getByRole("gridcell", {
|
const startGridCell = screen.getByRole("gridcell", {
|
||||||
name: "25",
|
name: "25",
|
||||||
|
|||||||
Reference in New Issue
Block a user