mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add tests for dynamic parameters (#18679)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for a new testing attribute to the multi-select combobox component, improving testability. * Expanded mock data for dynamic parameters, covering a wider range of input types and validation scenarios. * **Bug Fixes** * Improved loader and error handling on the experimental workspace creation page to better display WebSocket errors. * **Tests** * Introduced comprehensive tests for the experimental workspace creation page, including dynamic parameter updates, error handling, and form submission scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Michael Smith <throwawayclover@gmail.com>
This commit is contained in:
co-authored by
Michael Smith
parent
b8c9192d0b
commit
0bfe0d63ae
@@ -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) => ({
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user