From bb9d76dd097135de6db797a690a3b7462716e6a6 Mon Sep 17 00:00:00 2001 From: richard-dds Date: Wed, 28 Aug 2019 14:52:28 -0400 Subject: [PATCH] Fix Vue tests --- atst/routes/task_orders/new.py | 1 - js/test_templates/upload_input_error_template.html | 7 ++++--- js/test_templates/upload_input_template.html | 7 ++++--- tests/render_vue_component.py | 8 ++------ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/atst/routes/task_orders/new.py b/atst/routes/task_orders/new.py index b6053dc0..201a6923 100644 --- a/atst/routes/task_orders/new.py +++ b/atst/routes/task_orders/new.py @@ -75,7 +75,6 @@ def update_task_order( @task_orders_bp.route("/task_orders//upload-token") @user_can(Permissions.CREATE_TASK_ORDER, message="edit task order form") def upload_token(portfolio_id): - print(app.csp) (token, object_name) = app.csp.files.get_token() render_args = {"token": token, "objectName": object_name} diff --git a/js/test_templates/upload_input_error_template.html b/js/test_templates/upload_input_error_template.html index 02256f0d..e8e5aba8 100644 --- a/js/test_templates/upload_input_error_template.html +++ b/js/test_templates/upload_input_error_template.html @@ -4,10 +4,9 @@ v-bind:initial-errors='true' v-bind:watch='false' + v-bind:portfolio-id="''" name='pdf' :optional='false' - v-bind:token='token' - v-bind:object-name='"object_name"' >
@@ -36,11 +35,13 @@ v-bind:value="attachment" type="file"> -
+ Test Error Message diff --git a/js/test_templates/upload_input_template.html b/js/test_templates/upload_input_template.html index 70c73407..c5954616 100644 --- a/js/test_templates/upload_input_template.html +++ b/js/test_templates/upload_input_template.html @@ -4,10 +4,9 @@ v-bind:initial-data='initialvalue' v-bind:watch='false' + v-bind:portfolio-id="''" name='pdf' :optional='false' - v-bind:token='token' - v-bind:object-name='"object_name"' >
@@ -36,11 +35,13 @@ v-bind:value="attachment" type="file"> -
+
diff --git a/tests/render_vue_component.py b/tests/render_vue_component.py index b502ea93..ab33303c 100644 --- a/tests/render_vue_component.py +++ b/tests/render_vue_component.py @@ -74,15 +74,11 @@ def test_make_checkbox_input_template(checkbox_input_macro, initial_value_form): def test_make_upload_input_template(upload_input_macro, task_order_form): - rendered_upload_macro = upload_input_macro( - task_order_form.pdf, token="token", object_name="object_name" - ) + rendered_upload_macro = upload_input_macro(task_order_form.pdf) write_template(rendered_upload_macro, "upload_input_template.html") def test_make_upload_input_error_template(upload_input_macro, task_order_form): task_order_form.validate() - rendered_upload_macro = upload_input_macro( - task_order_form.pdf, token="token", object_name="object_name" - ) + rendered_upload_macro = upload_input_macro(task_order_form.pdf) write_template(rendered_upload_macro, "upload_input_error_template.html")