@madie/madie-design-system 1.2.47 → 1.2.49

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madie/madie-design-system",
3
- "version": "1.2.47",
3
+ "version": "1.2.49",
4
4
  "description": "Shared style guide across the Madie program.",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "https://github.com/MeasureAuthoringTool/madie-design-system",
@@ -99,4 +99,28 @@ describe("TextArea", () => {
99
99
  expect(helperText).toBeInTheDocument();
100
100
  });
101
101
  });
102
+ test("TextArea shows maxLength", async () => {
103
+ await act(async () => {
104
+ const { findByTestId, getByTestId, findByText } = render(
105
+ <TextArea
106
+ placeholder="test Name"
107
+ required
108
+ label="test Name"
109
+ id="testName"
110
+ data-testid="test-name-text-field"
111
+ disabled={false}
112
+ maxLength={10}
113
+ />
114
+ );
115
+ expect(
116
+ await findByTestId("test-name-text-field")
117
+ ).toBeInTheDocument();
118
+ const textNode = await getByTestId("test-name-text-field");
119
+ expect(textNode).toBeInTheDocument();
120
+ userEvent.type(textNode, "newVal");
121
+ Simulate.change(textNode);
122
+ const maxLength = await findByText("/10 Characters");
123
+ expect(maxLength).toBeInTheDocument();
124
+ });
125
+ });
102
126
  });