diff --git a/ground/src/test/java/com/google/android/ground/persistence/remote/firebase/schema/SubmissionMutationConverterTest.kt b/ground/src/test/java/com/google/android/ground/persistence/remote/firebase/schema/SubmissionMutationConverterTest.kt index 7704804980..8023ab443c 100644 --- a/ground/src/test/java/com/google/android/ground/persistence/remote/firebase/schema/SubmissionMutationConverterTest.kt +++ b/ground/src/test/java/com/google/android/ground/persistence/remote/firebase/schema/SubmissionMutationConverterTest.kt @@ -137,6 +137,18 @@ class SubmissionMutationConverterTest { ids = listOf("option id 1", "option id 2", "[ other value ]"), ) + private val multipleChoiceTaskDataOtherEmpty = + MultipleChoiceTaskData.fromList( + MultipleChoice( + persistentListOf( + Option("option id 1", "code1", "Option 1"), + Option("option id 2", "code2", "Option 2"), + ), + MultipleChoice.Cardinality.SELECT_MULTIPLE, + ), + ids = listOf("[ ]"), + ) + private val numberTaskData = NumberTaskData.fromNumber("123") private val dropPinTaskResult = DropPinTaskData(Point(Coordinates(10.0, 20.0))) @@ -197,6 +209,11 @@ class SubmissionMutationConverterTest { taskType = Task.Type.MULTIPLE_CHOICE, newTaskData = multipleChoiceTaskDataOther, ), + ValueDelta( + taskId = "multiple_choice_task_other_empty_value", + taskType = Task.Type.MULTIPLE_CHOICE, + newTaskData = multipleChoiceTaskDataOtherEmpty, + ), ValueDelta( taskId = "number_task", taskType = Task.Type.NUMBER, @@ -257,6 +274,11 @@ class SubmissionMutationConverterTest { ), TASK_ID_FIELD_NUMBER.toString() to "multiple_choice_task_other", ), + mapOf( + MULTIPLE_CHOICE_RESPONSES_FIELD_NUMBER.toString() to + mapOf(OTHER_SELECTED_FIELD_NUMBER.toString() to true), + TASK_ID_FIELD_NUMBER.toString() to "multiple_choice_task_other_empty_value", + ), mapOf( NUMBER_RESPONSE_FIELD_NUMBER.toString() to mapOf(NUMBER_FIELD_NUMBER.toString() to 123.0), TASK_ID_FIELD_NUMBER.toString() to "number_task",