Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add tests for dynamic parameters#18679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jaaydenh merged 20 commits intomainfromjaaydenh/dynamic-parameters-tests
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
71fa7f9
chore: get all initial tests passing
ParkreinerAug 5, 2025
d6c11a9
chore: format
ParkreinerAug 5, 2025
2b1f30a
feat: initial commit
jaaydenhJun 30, 2025
ef46518
fix: fix more tests
jaaydenhJun 30, 2025
e5130e9
fix: format
jaaydenhJul 1, 2025
e4c3265
chore: more improvements
jaaydenhJul 2, 2025
72d218a
chore: add data-testid for multiselect component
jaaydenhJul 2, 2025
77d2cea
chore: add test for multi-select
jaaydenhJul 2, 2025
ecd5de7
chore: test cleanup
jaaydenhJul 3, 2025
7c250df
fix: updates for PR review
jaaydenhJul 23, 2025
b2d155b
fix: add accessible id to Combobox
jaaydenhJul 29, 2025
b8694f8
fix: select dropdown by button instead of combobox
jaaydenhJul 29, 2025
1e91f6a
fix: clean up tests and use mock websocket from testhellpers
jaaydenhAug 6, 2025
fd8c58b
fix: format
jaaydenhAug 6, 2025
5b44667
chore: cleanup entities
jaaydenhAug 8, 2025
4cb7a90
chore: cleanup
jaaydenhAug 8, 2025
6a6a47d
chore: cleanup
jaaydenhAug 8, 2025
d760feb
fix: cleanup2
jaaydenhAug 8, 2025
0c53e9b
fix: unused exports
jaaydenhAug 8, 2025
e9f0582
fix: remove need for settimout or queuemicrotask
jaaydenhAug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletionssite/src/components/Combobox/Combobox.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,7 @@ interface ComboboxProps {
onInputChange?: (value: string) => void;
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
onSelect: (value: string) => void;
id?: string;
}

type ComboboxOption = {
Expand All@@ -53,6 +54,7 @@ export const Combobox: FC<ComboboxProps> = ({
onInputChange,
onKeyDown,
onSelect,
id,
}) => {
const [managedOpen, setManagedOpen] = useState(false);
const [managedInputValue, setManagedInputValue] = useState("");
Expand All@@ -78,6 +80,7 @@ export const Combobox: FC<ComboboxProps> = ({
<Popover open={isOpen} onOpenChange={handleOpenChange}>
<PopoverTrigger asChild>
<Button
id={id}
variant="outline"
aria-expanded={isOpen}
className="w-full justify-between group"
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,6 +104,8 @@ interface MultiSelectComboboxProps {
>;
/** hide or show the button that clears all the selected options. */
hideClearAllButton?: boolean;
/** Test ID for testing purposes */
"data-testid"?: string;
}

interface MultiSelectComboboxRef {
Expand DownExpand Up@@ -205,6 +207,7 @@ export const MultiSelectCombobox = forwardRef<
commandProps,
inputProps,
hideClearAllButton = false,
"data-testid": dataTestId,
}: MultiSelectComboboxProps,
ref,
) => {
Expand DownExpand Up@@ -454,6 +457,7 @@ export const MultiSelectCombobox = forwardRef<
<Command
ref={dropdownRef}
{...commandProps}
data-testid={dataTestId}
onKeyDown={(e) => {
handleKeyDown(e);
commandProps?.onKeyDown?.(e);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -453,6 +453,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
case "dropdown": {
return (
<Combobox
id={id}
value={value ?? ""}
onSelect={(value) => onChange(value)}
options={parameter.options.map((option) => ({
Expand DownExpand Up@@ -497,7 +498,10 @@ const ParameterField: FC<ParameterFieldProps> = ({

return (
<MultiSelectCombobox
inputProps={{ id }}
inputProps={{
id: id,
}}
data-testid={`multiselect-${parameter.name}`}
options={options}
defaultOptions={selectedOptions}
onChange={(newValues) => {
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp