diff --git a/caluma/caluma_analytics/tests/__snapshots__/test_run_analytics_cmdline.ambr b/caluma/caluma_analytics/tests/__snapshots__/test_run_analytics_cmdline.ambr index ebf20c09b..b602da1e5 100644 --- a/caluma/caluma_analytics/tests/__snapshots__/test_run_analytics_cmdline.ambr +++ b/caluma/caluma_analytics/tests/__snapshots__/test_run_analytics_cmdline.ambr @@ -65,7 +65,7 @@ FROM "caluma_form_document" INNER JOIN "caluma_form_form" ON ("caluma_form_document"."form_id" = "caluma_form_form"."slug") -- qs ref ), - answer_b4215 AS (SELECT "caluma_form_answer"."created_at", + answer_af542 AS (SELECT "caluma_form_answer"."created_at", "caluma_form_answer"."modified_at", "caluma_form_answer"."created_by_user", "caluma_form_answer"."created_by_group", @@ -76,8 +76,7 @@ "caluma_form_answer"."value", "caluma_form_answer"."meta", "caluma_form_answer"."document_id", - "caluma_form_answer"."date", - "caluma_form_answer"."file_id" + "caluma_form_answer"."date" FROM "caluma_form_answer" INNER JOIN "caluma_form_question" ON ("caluma_form_answer"."question_id" = "caluma_form_question"."slug") -- qs ref ) @@ -92,14 +91,14 @@ FROM document_2a07e AS "document_2a07e" LEFT JOIN ( SELECT DISTINCT ON (document_id) - (answer_b4215.value #>>'{}') AS "analytics_result_blablub", + (answer_af542.value #>>'{}') AS "analytics_result_blablub", "document_id" - FROM answer_b4215 AS "answer_b4215" + FROM answer_af542 AS "answer_af542" WHERE "question_id" = 'top_question' ORDER BY document_id - ) AS "answer_b4215_caea5" ON (document_2a07e.id = "answer_b4215_caea5".document_id) + ) AS "answer_af542_caea5" ON (document_2a07e.id = "answer_af542_caea5".document_id) WHERE form_id = 'top_form' ORDER BY id @@ -107,7 +106,7 @@ ) AS "document_2a07e_27f15" ON (case_ac50e.document_id = "document_2a07e_27f15".id) - ) AS analytics_247d1 + ) AS analytics_2a8de -- PARAMS: ''', @@ -156,7 +155,7 @@ FROM "caluma_form_document" INNER JOIN "caluma_form_form" ON ("caluma_form_document"."form_id" = "caluma_form_form"."slug") -- qs ref ), - answer_b4215 AS (SELECT "caluma_form_answer"."created_at", + answer_af542 AS (SELECT "caluma_form_answer"."created_at", "caluma_form_answer"."modified_at", "caluma_form_answer"."created_by_user", "caluma_form_answer"."created_by_group", @@ -167,8 +166,7 @@ "caluma_form_answer"."value", "caluma_form_answer"."meta", "caluma_form_answer"."document_id", - "caluma_form_answer"."date", - "caluma_form_answer"."file_id" + "caluma_form_answer"."date" FROM "caluma_form_answer" INNER JOIN "caluma_form_question" ON ("caluma_form_answer"."question_id" = "caluma_form_question"."slug") -- qs ref ) @@ -183,14 +181,14 @@ FROM document_2a07e AS "document_2a07e" LEFT JOIN ( SELECT DISTINCT ON (document_id) - (answer_b4215.value #>>'{}') AS "analytics_result_blablub", + (answer_af542.value #>>'{}') AS "analytics_result_blablub", "document_id" - FROM answer_b4215 AS "answer_b4215" + FROM answer_af542 AS "answer_af542" WHERE "question_id" = 'top_question' ORDER BY document_id - ) AS "answer_b4215_caea5" ON (document_2a07e.id = "answer_b4215_caea5".document_id) + ) AS "answer_af542_caea5" ON (document_2a07e.id = "answer_af542_caea5".document_id) WHERE form_id = 'top_form' ORDER BY id @@ -198,7 +196,7 @@ ) AS "document_2a07e_27f15" ON (case_ac50e.document_id = "document_2a07e_27f15".id) - ) AS analytics_247d1 + ) AS analytics_2a8de WHERE analytics_result_blablub IN (%(flt_analytics_result_blablub_8201d)s, %(flt_analytics_result_blablub_8e5e6)s) -- PARAMS: -- flt_analytics_result_blablub_8201d: Shelly Watson @@ -246,7 +244,7 @@ FROM "caluma_form_document" INNER JOIN "caluma_form_form" ON ("caluma_form_document"."form_id" = "caluma_form_form"."slug") -- qs ref ), - answer_b4215 AS (SELECT "caluma_form_answer"."created_at", + answer_af542 AS (SELECT "caluma_form_answer"."created_at", "caluma_form_answer"."modified_at", "caluma_form_answer"."created_by_user", "caluma_form_answer"."created_by_group", @@ -257,8 +255,7 @@ "caluma_form_answer"."value", "caluma_form_answer"."meta", "caluma_form_answer"."document_id", - "caluma_form_answer"."date", - "caluma_form_answer"."file_id" + "caluma_form_answer"."date" FROM "caluma_form_answer" INNER JOIN "caluma_form_question" ON ("caluma_form_answer"."question_id" = "caluma_form_question"."slug") -- qs ref ) @@ -273,14 +270,14 @@ FROM document_2a07e AS "document_2a07e" LEFT JOIN ( SELECT DISTINCT ON (document_id) - (answer_b4215.value #>>'{}') AS "analytics_result_blablub", + (answer_af542.value #>>'{}') AS "analytics_result_blablub", "document_id" - FROM answer_b4215 AS "answer_b4215" + FROM answer_af542 AS "answer_af542" WHERE "question_id" = 'top_question' ORDER BY document_id - ) AS "answer_b4215_caea5" ON (document_2a07e.id = "answer_b4215_caea5".document_id) + ) AS "answer_af542_caea5" ON (document_2a07e.id = "answer_af542_caea5".document_id) WHERE form_id = 'top_form' ORDER BY id @@ -288,7 +285,7 @@ ) AS "document_2a07e_27f15" ON (case_ac50e.document_id = "document_2a07e_27f15".id) - ) AS analytics_247d1 + ) AS analytics_2a8de -- PARAMS: ''', @@ -333,7 +330,7 @@ FROM "caluma_form_document" INNER JOIN "caluma_form_form" ON ("caluma_form_document"."form_id" = "caluma_form_form"."slug") -- qs ref ), - answer_b4215 AS (SELECT "caluma_form_answer"."created_at", + answer_af542 AS (SELECT "caluma_form_answer"."created_at", "caluma_form_answer"."modified_at", "caluma_form_answer"."created_by_user", "caluma_form_answer"."created_by_group", @@ -344,8 +341,7 @@ "caluma_form_answer"."value", "caluma_form_answer"."meta", "caluma_form_answer"."document_id", - "caluma_form_answer"."date", - "caluma_form_answer"."file_id" + "caluma_form_answer"."date" FROM "caluma_form_answer" INNER JOIN "caluma_form_question" ON ("caluma_form_answer"."question_id" = "caluma_form_question"."slug") -- qs ref ) @@ -360,14 +356,14 @@ FROM document_2a07e AS "document_2a07e" LEFT JOIN ( SELECT DISTINCT ON (document_id) - (answer_b4215.value #>>'{}') AS "analytics_result_blablub", + (answer_af542.value #>>'{}') AS "analytics_result_blablub", "document_id" - FROM answer_b4215 AS "answer_b4215" + FROM answer_af542 AS "answer_af542" WHERE "question_id" = 'top_question' ORDER BY document_id - ) AS "answer_b4215_caea5" ON (document_2a07e.id = "answer_b4215_caea5".document_id) + ) AS "answer_af542_caea5" ON (document_2a07e.id = "answer_af542_caea5".document_id) WHERE form_id = 'top_form' ORDER BY id @@ -375,7 +371,7 @@ ) AS "document_2a07e_27f15" ON (case_ac50e.document_id = "document_2a07e_27f15".id) - ) AS analytics_247d1 + ) AS analytics_2a8de WHERE analytics_result_blablub IN (%(flt_analytics_result_blablub_8201d)s, %(flt_analytics_result_blablub_8e5e6)s) -- PARAMS: -- flt_analytics_result_blablub_8201d: Shelly Watson diff --git a/caluma/caluma_analytics/tests/__snapshots__/test_starting_objects.ambr b/caluma/caluma_analytics/tests/__snapshots__/test_starting_objects.ambr index 892bea2b6..b237332a4 100644 --- a/caluma/caluma_analytics/tests/__snapshots__/test_starting_objects.ambr +++ b/caluma/caluma_analytics/tests/__snapshots__/test_starting_objects.ambr @@ -101,60 +101,6 @@ }), ]) # --- -# name: test_extract_values[work_items-fields2] - list([ - dict({ - 'closed_at': None, - 'sub_question': 'Douglas Jackson', - 'top_question': 'Amanda Valentine', - }), - dict({ - 'closed_at': None, - 'sub_question': 'Douglas Jackson', - 'top_question': 'Amanda Valentine', - }), - dict({ - 'closed_at': None, - 'sub_question': 'Kimberly Long', - 'top_question': 'George Johnson', - }), - dict({ - 'closed_at': None, - 'sub_question': 'Kimberly Long', - 'top_question': 'George Johnson', - }), - dict({ - 'closed_at': None, - 'sub_question': 'Rebecca Zimmerman', - 'top_question': 'Joan Rodriguez', - }), - dict({ - 'closed_at': None, - 'sub_question': 'Rebecca Zimmerman', - 'top_question': 'Joan Rodriguez', - }), - dict({ - 'closed_at': None, - 'sub_question': 'John Obrien', - 'top_question': 'Kelly Brock', - }), - dict({ - 'closed_at': None, - 'sub_question': 'John Obrien', - 'top_question': 'Kelly Brock', - }), - dict({ - 'closed_at': None, - 'sub_question': 'David Poole', - 'top_question': 'Shane Maldonado', - }), - dict({ - 'closed_at': None, - 'sub_question': 'David Poole', - 'top_question': 'Shane Maldonado', - }), - ]) -# --- # name: test_get_fields[cases] dict({ 'closed_at': dict({ @@ -5890,216 +5836,3 @@ }), }) # --- -# name: test_get_fields[work_items] - dict({ - 'closed_at': dict({ - 'is_leaf': False, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'MAX', - 'MIN', - ]), - }), - 'closed_at.month': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'closed_at.quarter': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'closed_at.weekday': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'closed_at.year': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'created_at': dict({ - 'is_leaf': False, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'MAX', - 'MIN', - ]), - }), - 'created_at.month': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'created_at.quarter': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'created_at.weekday': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'created_at.year': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'document[top_form]': dict({ - 'is_leaf': False, - 'is_value': False, - 'supported_functions': list([ - ]), - }), - 'document[top_form].form': dict({ - 'is_leaf': False, - 'is_value': False, - 'supported_functions': list([ - ]), - }), - 'document[top_form].form.sub_question': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'COUNT', - 'MAX', - 'MIN', - ]), - }), - 'document[top_form].top_question': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'COUNT', - 'MAX', - 'MIN', - ]), - }), - 'id': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'MAX', - 'MIN', - ]), - }), - 'meta': dict({ - 'is_leaf': False, - 'is_value': False, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'meta.foobar': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'meta.test-key': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'SUM', - 'COUNT', - 'AVG', - 'MAX', - 'MIN', - ]), - }), - 'status': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'MAX', - 'MIN', - ]), - }), - 'task_id': dict({ - 'is_leaf': True, - 'is_value': True, - 'supported_functions': list([ - 'VALUE', - 'MAX', - 'MIN', - ]), - }), - }) -# --- diff --git a/caluma/caluma_form/tests/__snapshots__/test_answer.ambr b/caluma/caluma_form/tests/__snapshots__/test_answer.ambr index 2d816fef8..dea205571 100644 --- a/caluma/caluma_form/tests/__snapshots__/test_answer.ambr +++ b/caluma/caluma_form/tests/__snapshots__/test_answer.ambr @@ -18,6 +18,9 @@ }), }) # --- +# name: test_save_calculated_dependency_default_answer[float-0.1] + Answer(document=None, question=Question(slug=environmental-ten, type=float), value=0.1) +# --- # name: test_save_default_answer_graphql[choice-option-slug-None-SaveDefaultStringAnswer-True-option-slug-False] dict({ 'saveDefaultStringAnswer': dict({ @@ -132,6 +135,50 @@ }), }) # --- +# name: test_save_default_answer_graphql[table-None-None-SaveDefaultTableAnswer-True-option-slug-False] + dict({ + 'saveDefaultTableAnswer': dict({ + 'answer': dict({ + '__typename': 'TableAnswer', + 'table_value': list([ + dict({ + 'form': dict({ + 'slug': 'eight-traditional', + }), + }), + dict({ + 'form': dict({ + 'slug': 'eight-traditional', + }), + }), + ]), + }), + 'clientMutationId': 'testid', + }), + }) +# --- +# name: test_save_default_answer_graphql[table-None-None-SaveDefaultTableAnswer-True-option-slug-True] + dict({ + 'saveDefaultTableAnswer': dict({ + 'answer': dict({ + '__typename': 'TableAnswer', + 'table_value': list([ + dict({ + 'form': dict({ + 'slug': 'eight-traditional', + }), + }), + dict({ + 'form': dict({ + 'slug': 'eight-traditional', + }), + }), + ]), + }), + 'clientMutationId': 'testid', + }), + }) +# --- # name: test_save_default_answer_graphql[text-Test-None-SaveDefaultStringAnswer-True-option-slug-False] dict({ 'saveDefaultStringAnswer': dict({ @@ -176,3 +223,51 @@ }), }) # --- +# name: test_save_default_answer_python_api[choice-option-slug-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=choice), value='option-slug') +# --- +# name: test_save_default_answer_python_api[choice-option-slug-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=choice), value='option-slug') +# --- +# name: test_save_default_answer_python_api[date-None-2019-02-22-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=date), value=None) +# --- +# name: test_save_default_answer_python_api[date-None-2019-02-22-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=date), value=None) +# --- +# name: test_save_default_answer_python_api[float-2.1-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=float), value=2.1) +# --- +# name: test_save_default_answer_python_api[float-2.1-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=float), value=2.1) +# --- +# name: test_save_default_answer_python_api[integer-1-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=integer), value=1) +# --- +# name: test_save_default_answer_python_api[integer-1-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=integer), value=1) +# --- +# name: test_save_default_answer_python_api[multiple_choice-answer__value5-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=multiple_choice), value=['option-slug']) +# --- +# name: test_save_default_answer_python_api[multiple_choice-answer__value5-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=multiple_choice), value=['option-slug']) +# --- +# name: test_save_default_answer_python_api[table-None-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=table), value=None) +# --- +# name: test_save_default_answer_python_api[table-None-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=table), value=None) +# --- +# name: test_save_default_answer_python_api[text-Test-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=text), value='Test') +# --- +# name: test_save_default_answer_python_api[text-Test-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=text), value='Test') +# --- +# name: test_save_default_answer_python_api[textarea-Test-None-True-option-slug-False] + Answer(document=None, question=Question(slug=environmental-ten, type=textarea), value='Test') +# --- +# name: test_save_default_answer_python_api[textarea-Test-None-True-option-slug-True] + Answer(document=None, question=Question(slug=environmental-ten, type=textarea), value='Test') +# --- diff --git a/caluma/caluma_form/tests/__snapshots__/test_document.ambr b/caluma/caluma_form/tests/__snapshots__/test_document.ambr index c2bb1daea..8c34a9db8 100644 --- a/caluma/caluma_form/tests/__snapshots__/test_document.ambr +++ b/caluma/caluma_form/tests/__snapshots__/test_document.ambr @@ -303,450 +303,6 @@ }), }) # --- -# name: test_save_document_answer[choice-question__configuration17-None-question__format_validators17-option-slug-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'option-slug', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[choice-question__configuration17-None-question__format_validators17-option-slug-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=choice), value='option-slug') -# --- -# name: test_save_document_answer[choice-question__configuration17-None-question__format_validators17-option-slug-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'option-slug', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[choice-question__configuration17-None-question__format_validators17-option-slug-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=choice), value='option-slug') -# --- -# name: test_save_document_answer[date-question__configuration7-None-question__format_validators7-None-2019-02-22-SaveDocumentDateAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentDateAnswer': dict({ - 'answer': dict({ - '__typename': 'DateAnswer', - 'dateValue': '2019-02-22', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[date-question__configuration7-None-question__format_validators7-None-2019-02-22-SaveDocumentDateAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=date), value=None) -# --- -# name: test_save_document_answer[date-question__configuration7-None-question__format_validators7-None-2019-02-22-SaveDocumentDateAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentDateAnswer': dict({ - 'answer': dict({ - '__typename': 'DateAnswer', - 'dateValue': '2019-02-22', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[date-question__configuration7-None-question__format_validators7-None-2019-02-22-SaveDocumentDateAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=date), value=None) -# --- -# name: test_save_document_answer[dynamic_choice-question__configuration21-MyDataSource-question__format_validators21-5.5-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': '5.5', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[dynamic_choice-question__configuration21-MyDataSource-question__format_validators21-5.5-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=dynamic_choice), value='5.5') -# --- -# name: test_save_document_answer[dynamic_choice-question__configuration21-MyDataSource-question__format_validators21-5.5-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': '5.5', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[dynamic_choice-question__configuration21-MyDataSource-question__format_validators21-5.5-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=dynamic_choice), value='5.5') -# --- -# name: test_save_document_answer[dynamic_multiple_choice-question__configuration19-MyDataSource-question__format_validators19-answer__value19-None-SaveDocumentListAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentListAnswer': dict({ - 'answer': dict({ - '__typename': 'ListAnswer', - 'listValue': list([ - '5.5', - '1', - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[dynamic_multiple_choice-question__configuration19-MyDataSource-question__format_validators19-answer__value19-None-SaveDocumentListAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=dynamic_multiple_choice), value=['5.5', '1']) -# --- -# name: test_save_document_answer[dynamic_multiple_choice-question__configuration19-MyDataSource-question__format_validators19-answer__value19-None-SaveDocumentListAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentListAnswer': dict({ - 'answer': dict({ - '__typename': 'ListAnswer', - 'listValue': list([ - '5.5', - '1', - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[dynamic_multiple_choice-question__configuration19-MyDataSource-question__format_validators19-answer__value19-None-SaveDocumentListAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=dynamic_multiple_choice), value=['5.5', '1']) -# --- -# name: test_save_document_answer[files-question__configuration10-None-question__format_validators10-answer__value10-None-SaveDocumentFilesAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentFilesAnswer': dict({ - 'answer': dict({ - '__typename': 'FilesAnswer', - 'fileValue': list([ - dict({ - 'name': 'not-exist.pdf', - 'uploadUrl': 'http://minio/upload-url', - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[files-question__configuration10-None-question__format_validators10-answer__value10-None-SaveDocumentFilesAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=files), value=None) -# --- -# name: test_save_document_answer[files-question__configuration10-None-question__format_validators10-answer__value10-None-SaveDocumentFilesAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentFilesAnswer': dict({ - 'answer': dict({ - '__typename': 'FilesAnswer', - 'fileValue': list([ - dict({ - 'name': 'not-exist.pdf', - 'uploadUrl': 'http://minio/upload-url', - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[files-question__configuration10-None-question__format_validators10-answer__value10-None-SaveDocumentFilesAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=files), value=None) -# --- -# name: test_save_document_answer[files-question__configuration9-None-question__format_validators9-answer__value9-None-SaveDocumentFilesAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentFilesAnswer': dict({ - 'answer': dict({ - '__typename': 'FilesAnswer', - 'fileValue': list([ - dict({ - 'name': 'some-file.pdf', - 'uploadUrl': 'http://minio/upload-url', - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[files-question__configuration9-None-question__format_validators9-answer__value9-None-SaveDocumentFilesAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=files), value=None) -# --- -# name: test_save_document_answer[files-question__configuration9-None-question__format_validators9-answer__value9-None-SaveDocumentFilesAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentFilesAnswer': dict({ - 'answer': dict({ - '__typename': 'FilesAnswer', - 'fileValue': list([ - dict({ - 'name': 'some-file.pdf', - 'uploadUrl': 'http://minio/upload-url', - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[files-question__configuration9-None-question__format_validators9-answer__value9-None-SaveDocumentFilesAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=files), value=None) -# --- -# name: test_save_document_answer[float-question__configuration2-None-question__format_validators2-2.1-None-SaveDocumentFloatAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentFloatAnswer': dict({ - 'answer': dict({ - '__typename': 'FloatAnswer', - 'floatValue': 2.1, - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[float-question__configuration2-None-question__format_validators2-2.1-None-SaveDocumentFloatAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=float), value=2.1) -# --- -# name: test_save_document_answer[float-question__configuration2-None-question__format_validators2-2.1-None-SaveDocumentFloatAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentFloatAnswer': dict({ - 'answer': dict({ - '__typename': 'FloatAnswer', - 'floatValue': 2.1, - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[float-question__configuration2-None-question__format_validators2-2.1-None-SaveDocumentFloatAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=float), value=2.1) -# --- -# name: test_save_document_answer[integer-question__configuration0-None-question__format_validators0-1-None-SaveDocumentIntegerAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentIntegerAnswer': dict({ - 'answer': dict({ - '__typename': 'IntegerAnswer', - 'integerValue': 1, - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[integer-question__configuration0-None-question__format_validators0-1-None-SaveDocumentIntegerAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=integer), value=1) -# --- -# name: test_save_document_answer[integer-question__configuration0-None-question__format_validators0-1-None-SaveDocumentIntegerAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentIntegerAnswer': dict({ - 'answer': dict({ - '__typename': 'IntegerAnswer', - 'integerValue': 1, - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[integer-question__configuration0-None-question__format_validators0-1-None-SaveDocumentIntegerAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=integer), value=1) -# --- -# name: test_save_document_answer[multiple_choice-question__configuration15-None-question__format_validators15-answer__value15-None-SaveDocumentListAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentListAnswer': dict({ - 'answer': dict({ - '__typename': 'ListAnswer', - 'listValue': list([ - 'option-slug', - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[multiple_choice-question__configuration15-None-question__format_validators15-answer__value15-None-SaveDocumentListAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=multiple_choice), value=['option-slug']) -# --- -# name: test_save_document_answer[multiple_choice-question__configuration15-None-question__format_validators15-answer__value15-None-SaveDocumentListAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentListAnswer': dict({ - 'answer': dict({ - '__typename': 'ListAnswer', - 'listValue': list([ - 'option-slug', - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[multiple_choice-question__configuration15-None-question__format_validators15-answer__value15-None-SaveDocumentListAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=multiple_choice), value=['option-slug']) -# --- -# name: test_save_document_answer[table-question__configuration12-None-question__format_validators12-None-None-SaveDocumentTableAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentTableAnswer': dict({ - 'answer': dict({ - '__typename': 'TableAnswer', - 'table_value': list([ - dict({ - 'form': dict({ - 'slug': 'eight-traditional', - }), - }), - dict({ - 'form': dict({ - 'slug': 'eight-traditional', - }), - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[table-question__configuration12-None-question__format_validators12-None-None-SaveDocumentTableAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=measure-evening)), question=Question(slug=environmental-ten, type=table), value=None) -# --- -# name: test_save_document_answer[table-question__configuration12-None-question__format_validators12-None-None-SaveDocumentTableAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentTableAnswer': dict({ - 'answer': dict({ - '__typename': 'TableAnswer', - 'table_value': list([ - dict({ - 'form': dict({ - 'slug': 'eight-traditional', - }), - }), - dict({ - 'form': dict({ - 'slug': 'eight-traditional', - }), - }), - ]), - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[table-question__configuration12-None-question__format_validators12-None-None-SaveDocumentTableAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=measure-evening)), question=Question(slug=environmental-ten, type=table), value=None) -# --- -# name: test_save_document_answer[text-question__configuration24-None-question__format_validators24-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'test@example.com', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[text-question__configuration24-None-question__format_validators24-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=text), value='test@example.com') -# --- -# name: test_save_document_answer[text-question__configuration24-None-question__format_validators24-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'test@example.com', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[text-question__configuration24-None-question__format_validators24-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=text), value='test@example.com') -# --- -# name: test_save_document_answer[text-question__configuration4-None-question__format_validators4-Test-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'Test', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[text-question__configuration4-None-question__format_validators4-Test-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=text), value='Test') -# --- -# name: test_save_document_answer[text-question__configuration4-None-question__format_validators4-Test-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'Test', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[text-question__configuration4-None-question__format_validators4-Test-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=text), value='Test') -# --- -# name: test_save_document_answer[textarea-question__configuration13-None-question__format_validators13-Test-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'Test', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[textarea-question__configuration13-None-question__format_validators13-Test-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=textarea), value='Test') -# --- -# name: test_save_document_answer[textarea-question__configuration13-None-question__format_validators13-Test-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'Test', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[textarea-question__configuration13-None-question__format_validators13-Test-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=textarea), value='Test') -# --- -# name: test_save_document_answer[textarea-question__configuration26-None-question__format_validators26-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-False-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'test@example.com', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[textarea-question__configuration26-None-question__format_validators26-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-False-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=textarea), value='test@example.com') -# --- -# name: test_save_document_answer[textarea-question__configuration26-None-question__format_validators26-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-True-False] - dict({ - 'saveDocumentStringAnswer': dict({ - 'answer': dict({ - '__typename': 'StringAnswer', - 'stringValue': 'test@example.com', - }), - 'clientMutationId': 'testid', - }), - }) -# --- -# name: test_save_document_answer[textarea-question__configuration26-None-question__format_validators26-test@example.com-None-SaveDocumentStringAnswer-True-option-slug-True-True] - Answer(document=Document(form=Form(slug=eight-traditional)), question=Question(slug=environmental-ten, type=textarea), value='test@example.com') -# --- # name: test_save_document_answer_empty[text-false-old value that needs to be deleted-False] dict({ 'saveDocumentStringAnswer': dict({ diff --git a/caluma/caluma_form/tests/__snapshots__/test_history.ambr b/caluma/caluma_form/tests/__snapshots__/test_history.ambr index f4e563e57..64637b1fe 100644 --- a/caluma/caluma_form/tests/__snapshots__/test_history.ambr +++ b/caluma/caluma_form/tests/__snapshots__/test_history.ambr @@ -58,81 +58,3 @@ }), }) # --- -# name: test_historical_table_answer - dict({ - 'd1': dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'HistoricalTableAnswer', - 'value': list([ - dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'historyType': '~', - 'value': 'first row value', - }), - }), - ]), - }), - }), - dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'historyType': '~', - 'value': 'second row value', - }), - }), - ]), - }), - }), - ]), - }), - }), - ]), - }), - }), - 'd2': dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'HistoricalTableAnswer', - 'value': list([ - dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'historyType': '~', - 'value': 'first row value', - }), - }), - ]), - }), - }), - dict({ - 'historicalAnswers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'historyType': '-', - 'value': 'second row value', - }), - }), - ]), - }), - }), - ]), - }), - }), - ]), - }), - }), - }) -# --- diff --git a/caluma/caluma_form/tests/__snapshots__/test_question.ambr b/caluma/caluma_form/tests/__snapshots__/test_question.ambr index 3ce9bd3f4..9eed6d6d7 100644 --- a/caluma/caluma_form/tests/__snapshots__/test_question.ambr +++ b/caluma/caluma_form/tests/__snapshots__/test_question.ambr @@ -1,454 +1,3 @@ -# name: test_query_all_questions[action_button-question__configuration14-None-question__format_validators14] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'ActionButtonQuestion', - 'id': 'QWN0aW9uQnV0dG9uUXVlc3Rpb246ZW52aXJvbm1lbnRhbC10ZW4=', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[calculated_float-question__configuration13-None-question__format_validators13] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'CalculatedFloatQuestion', - 'calcExpression': '-1.0', - 'hintText': '', - 'id': 'Q2FsY3VsYXRlZEZsb2F0UXVlc3Rpb246ZW52aXJvbm1lbnRhbC10ZW4=', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[choice-question__configuration6-None-question__format_validators6] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'ChoiceQuestion', - 'hintText': '', - 'id': 'Q2hvaWNlUXVlc3Rpb246ZW52aXJvbm1lbnRhbC10ZW4=', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'options': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'slug': 'measure-evening', - }), - }), - ]), - 'totalCount': 1, - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[date-question__configuration3-None-question__format_validators3] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'DateQuestion', - 'hintText': '', - 'id': 'RGF0ZVF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[dynamic_choice-question__configuration10-MyDataSource-question__format_validators10] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'DynamicChoiceQuestion', - 'hintText': '', - 'id': 'RHluYW1pY0Nob2ljZVF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'options': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'label': '1', - 'slug': '1', - }), - }), - dict({ - 'node': dict({ - 'label': '5.5', - 'slug': '5.5', - }), - }), - dict({ - 'node': dict({ - 'label': 'sdkj', - 'slug': 'sdkj', - }), - }), - dict({ - 'node': dict({ - 'label': 'info', - 'slug': 'value', - }), - }), - dict({ - 'node': dict({ - 'label': 'something', - 'slug': 'something', - }), - }), - dict({ - 'node': dict({ - 'label': 'english description', - 'slug': 'translated_value', - }), - }), - ]), - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[dynamic_multiple_choice-question__configuration11-MyDataSource-question__format_validators11] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'DynamicMultipleChoiceQuestion', - 'hintText': '', - 'id': 'RHluYW1pY011bHRpcGxlQ2hvaWNlUXVlc3Rpb246ZW52aXJvbm1lbnRhbC10ZW4=', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'options': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'label': '1', - 'slug': '1', - }), - }), - dict({ - 'node': dict({ - 'label': '5.5', - 'slug': '5.5', - }), - }), - dict({ - 'node': dict({ - 'label': 'sdkj', - 'slug': 'sdkj', - }), - }), - dict({ - 'node': dict({ - 'label': 'info', - 'slug': 'value', - }), - }), - dict({ - 'node': dict({ - 'label': 'something', - 'slug': 'something', - }), - }), - dict({ - 'node': dict({ - 'label': 'english description', - 'slug': 'translated_value', - }), - }), - ]), - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[files-question__configuration9-None-question__format_validators9] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'FilesQuestion', - 'hintText': '', - 'id': 'RmlsZXNRdWVzdGlvbjplbnZpcm9ubWVudGFsLXRlbg==', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[float-question__configuration1-None-question__format_validators1] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'FloatQuestion', - 'floatMaxValue': 1.0, - 'floatMinValue': 0.0, - 'hintText': '', - 'id': 'RmxvYXRRdWVzdGlvbjplbnZpcm9ubWVudGFsLXRlbg==', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'placeholder': '', - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[float-question__configuration2-None-question__format_validators2] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'FloatQuestion', - 'floatMaxValue': None, - 'floatMinValue': None, - 'hintText': '', - 'id': 'RmxvYXRRdWVzdGlvbjplbnZpcm9ubWVudGFsLXRlbg==', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'placeholder': '', - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[form-question__configuration8-None-question__format_validators8] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'FormQuestion', - 'id': 'Rm9ybVF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - 'subForm': dict({ - 'slug': 'eight-traditional', - }), - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[integer-question__configuration0-None-question__format_validators0] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'IntegerQuestion', - 'hintText': '', - 'id': 'SW50ZWdlclF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'infoText': '', - 'integerMaxValue': 10, - 'integerMinValue': 0, - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'placeholder': '', - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[multiple_choice-question__configuration7-None-question__format_validators7] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'MultipleChoiceQuestion', - 'hintText': '', - 'id': 'TXVsdGlwbGVDaG9pY2VRdWVzdGlvbjplbnZpcm9ubWVudGFsLXRlbg==', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'options': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'slug': 'measure-evening', - }), - }), - ]), - 'totalCount': 1, - }), - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[static-question__configuration12-None-question__format_validators12] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'StaticQuestion', - 'id': 'U3RhdGljUXVlc3Rpb246ZW52aXJvbm1lbnRhbC10ZW4=', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - 'staticContent': ''' - Station story first. Team suggest traditional boy above. Argue move appear catch toward help wind. - Kid avoid player relationship to range whose. Draw free property consider. - ''', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[text-question__configuration4-None-question__format_validators4] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'TextQuestion', - 'formatValidators': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'errorMsg': 'Please enter a valid e-mail address', - 'name': 'E-mail address', - 'regex': '(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)', - 'slug': 'email', - }), - }), - ]), - }), - 'hintText': '', - 'id': 'VGV4dFF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'maxLength': None, - 'meta': dict({ - }), - 'minLength': 10, - 'placeholder': '', - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- -# name: test_query_all_questions[textarea-question__configuration5-None-question__format_validators5] - dict({ - 'allQuestions': dict({ - 'edges': list([ - dict({ - 'node': dict({ - '__typename': 'TextareaQuestion', - 'formatValidators': dict({ - 'edges': list([ - ]), - }), - 'hintText': '', - 'id': 'VGV4dGFyZWFRdWVzdGlvbjplbnZpcm9ubWVudGFsLXRlbg==', - 'infoText': '', - 'label': 'Bonnie Moreno', - 'maxLength': 10, - 'meta': dict({ - }), - 'minLength': None, - 'placeholder': '', - 'slug': 'environmental-ten', - }), - }), - ]), - 'totalCount': 1, - }), - }) -# --- # name: test_save_action_button_question[action_button] dict({ 'saveActionButtonQuestion': dict({ @@ -880,24 +429,6 @@ }), }) # --- -# name: test_save_form_question[form] - dict({ - 'saveFormQuestion': dict({ - 'clientMutationId': 'testid', - 'question': dict({ - '__typename': 'FormQuestion', - 'id': 'Rm9ybVF1ZXN0aW9uOmVudmlyb25tZW50YWwtdGVu', - 'label': 'Bonnie Moreno', - 'meta': dict({ - }), - 'slug': 'environmental-ten', - 'subForm': dict({ - 'slug': 'eight-traditional', - }), - }), - }), - }) -# --- # name: test_save_integer_question[integer-question__configuration0-23-True] dict({ 'saveIntegerQuestion': dict({ diff --git a/caluma/caluma_workflow/tests/__snapshots__/test_case.ambr b/caluma/caluma_workflow/tests/__snapshots__/test_case.ambr index 78158633a..a395e6b9c 100644 --- a/caluma/caluma_workflow/tests/__snapshots__/test_case.ambr +++ b/caluma/caluma_workflow/tests/__snapshots__/test_case.ambr @@ -46,576 +46,6 @@ }), }) # --- -# name: test_order_by_question_answer_value[date-True-False] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-31', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-26', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-29', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-30', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-27', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-28', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[date-True-True] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-27', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-28', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-29', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-30', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'dateValue': '2019-05-31', - }), - }), - dict({ - 'node': dict({ - 'dateValue': '2019-05-26', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[file-True-False] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'f', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'a', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'd', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'c', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'b', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'e', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[file-True-True] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'b', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'e', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'd', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'c', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'f', - }), - }), - }), - dict({ - 'node': dict({ - 'fileValue': dict({ - 'name': 'a', - }), - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[form-True-False] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'f', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'd', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'b', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[form-True-True] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'b', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'd', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'f', - }), - }), - ]), - 'totalCount': 1, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[text-True-False] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'c', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'a2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'b', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'c2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'a', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'b2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- -# name: test_order_by_question_answer_value[text-True-True] - dict({ - 'allCases': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'a', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'b2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'b', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'c2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - dict({ - 'node': dict({ - 'document': dict({ - 'answers': dict({ - 'edges': list([ - dict({ - 'node': dict({ - 'stringValue': 'c', - }), - }), - dict({ - 'node': dict({ - 'stringValue': 'a2', - }), - }), - ]), - 'totalCount': 2, - }), - }), - }), - }), - ]), - 'totalCount': 3, - }), - }) -# --- # name: test_query_all_cases[completed-0] dict({ 'allCases': dict({ diff --git a/caluma/caluma_workflow/tests/__snapshots__/test_task.ambr b/caluma/caluma_workflow/tests/__snapshots__/test_task.ambr index d074cb921..d83d57c31 100644 --- a/caluma/caluma_workflow/tests/__snapshots__/test_task.ambr +++ b/caluma/caluma_workflow/tests/__snapshots__/test_task.ambr @@ -21,34 +21,6 @@ }), }) # --- -# name: test_save_comlete_task_form_task - dict({ - 'saveCompleteTaskFormTask': dict({ - 'clientMutationId': 'testid', - 'task': dict({ - '__typename': 'CompleteTaskFormTask', - 'meta': dict({ - }), - 'name': 'Taylor Williams', - 'slug': 'suggest-adult-allow', - }), - }), - }) -# --- -# name: test_save_task[SaveCompleteWorkflowFormTask] - dict({ - 'saveCompleteWorkflowFormTask': dict({ - 'clientMutationId': 'testid', - 'task': dict({ - '__typename': 'CompleteWorkflowFormTask', - 'meta': dict({ - }), - 'name': 'Taylor Williams', - 'slug': 'suggest-adult-allow', - }), - }), - }) -# --- # name: test_save_task[SaveSimpleTask] dict({ 'saveSimpleTask': dict({