Update text input component
This commit is contained in:
@@ -4,7 +4,7 @@ import { screen, fireEvent, waitFor } from "@testing-library/react";
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
import { renderWithProviders } from "../utils/test-utils";
|
||||
import Create from "../../app/components/Create";
|
||||
import Input from "../../app/components/Input";
|
||||
import TextInput from "../../app/components/TextInput";
|
||||
|
||||
type CreateProps = React.ComponentProps<typeof Create>;
|
||||
|
||||
@@ -167,7 +167,7 @@ describe("Create", () => {
|
||||
it("traps focus within create dialog", async () => {
|
||||
renderWithProviders(
|
||||
<Create {...defaultProps}>
|
||||
<Input label="Test Input" />
|
||||
<TextInput label="Test Input" />
|
||||
</Create>,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import React from "react";
|
||||
import Select from "../../app/components/Select";
|
||||
import SelectInput from "../../app/components/SelectInput";
|
||||
import { componentTestSuite } from "../utils/componentTestSuite";
|
||||
|
||||
type SelectProps = React.ComponentProps<typeof Select>;
|
||||
type SelectInputProps = React.ComponentProps<typeof SelectInput>;
|
||||
|
||||
componentTestSuite<SelectProps>({
|
||||
component: Select,
|
||||
name: "Select",
|
||||
componentTestSuite<SelectInputProps>({
|
||||
component: SelectInput,
|
||||
name: "SelectInput",
|
||||
props: {
|
||||
label: "Test Select",
|
||||
label: "Test Select Input",
|
||||
placeholder: "Select an option",
|
||||
options: [
|
||||
{ value: "option1", label: "Option 1" },
|
||||
{ value: "option2", label: "Option 2" },
|
||||
],
|
||||
} as SelectProps,
|
||||
} as SelectInputProps,
|
||||
requiredProps: ["options"],
|
||||
optionalProps: {
|
||||
size: "medium",
|
||||
@@ -1,15 +1,15 @@
|
||||
import React from "react";
|
||||
import Input from "../../app/components/Input";
|
||||
import TextInput from "../../app/components/TextInput";
|
||||
import { componentTestSuite } from "../utils/componentTestSuite";
|
||||
|
||||
type InputProps = React.ComponentProps<typeof Input>;
|
||||
type TextInputProps = React.ComponentProps<typeof TextInput>;
|
||||
|
||||
componentTestSuite<InputProps>({
|
||||
component: Input,
|
||||
name: "Input",
|
||||
componentTestSuite<TextInputProps>({
|
||||
component: TextInput,
|
||||
name: "TextInput",
|
||||
props: {
|
||||
label: "Test input",
|
||||
} as InputProps,
|
||||
label: "Test text input",
|
||||
} as TextInputProps,
|
||||
requiredProps: ["label"],
|
||||
optionalProps: {
|
||||
placeholder: "Enter value",
|
||||
Reference in New Issue
Block a user