diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index adbdc15fe..ed4c11722 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -422,6 +422,7 @@ export default function ParameterComponent({ options={data.node.template[name].options} onSelect={handleOnNewValue} value={data.node.template[name].value ?? "Choose an option"} + id={"dropdown-" + index} /> {data.node?.template[name].refresh && ( @@ -513,6 +514,7 @@ export default function ParameterComponent({ data.node!.template[name].value = newValue; handleOnNewValue(newValue); }} + id="div-dict-input" /> ) : left === true && type === "dict" ? ( diff --git a/src/frontend/src/components/codeAreaComponent/index.tsx b/src/frontend/src/components/codeAreaComponent/index.tsx index 8c459f64b..98683f071 100644 --- a/src/frontend/src/components/codeAreaComponent/index.tsx +++ b/src/frontend/src/components/codeAreaComponent/index.tsx @@ -45,6 +45,7 @@ export default function CodeAreaComponent({
{ if (disabled) { @@ -30,7 +31,7 @@ export default function DictComponent({ )} > { -
+
{ @@ -45,6 +46,7 @@ export default function DictComponent({ : "input-disable pointer-events-none cursor-pointer" } placeholder="Click to edit your dictionary..." + data-testid="dict-input" />
diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index d6fcec772..abcbfb6d8 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -11,6 +11,7 @@ export default function Dropdown({ editNode = false, numberOfOptions = 0, apiModal = false, + id = "", }: DropDownComponentType): JSX.Element { let [internalValue, setInternalValue] = useState( value === "" || !value ? "Choose an option" : value @@ -33,13 +34,17 @@ export default function Dropdown({ <>
- + {internalValue} @@ -86,6 +91,7 @@ export default function Dropdown({ selected ? "font-semibold" : "font-normal", "block truncate " )} + data-testid={`${option}-${id ?? ""}-option`} > {option} diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 908c013a5..d2bfb960e 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -248,9 +248,9 @@ const EditNodeModal = forwardRef( disabled={disabled} editNode={true} value={ - myData.current.node!.template[ + myData?.current?.node!.template[ templateParam - ].value.toString() === "{}" + ]?.value?.toString() === "{}" ? { yourkey: "value", } @@ -264,6 +264,7 @@ const EditNodeModal = forwardRef( ].value = newValue; handleOnNewValue(newValue, templateParam); }} + id="editnode-div-dict-input" />
) : myData.current.node?.template[templateParam] @@ -371,6 +372,7 @@ const EditNodeModal = forwardRef( templateParam ].value ?? "Choose an option" } + id={"dropdown-edit-" + index} >
) : myData.current.node?.template[templateParam] diff --git a/src/frontend/src/modals/dictAreaModal/index.tsx b/src/frontend/src/modals/dictAreaModal/index.tsx index 9cc525b48..8a59344fe 100644 --- a/src/frontend/src/modals/dictAreaModal/index.tsx +++ b/src/frontend/src/modals/dictAreaModal/index.tsx @@ -54,6 +54,7 @@ export default function DictAreaModal({ />