+
{
@@ -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({
/>