Fix Vue tests
This commit is contained in:
parent
11c1c37d7f
commit
bb9d76dd09
@ -75,7 +75,6 @@ def update_task_order(
|
||||
@task_orders_bp.route("/task_orders/<portfolio_id>/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}
|
||||
|
||||
|
@ -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"'
|
||||
>
|
||||
<div>
|
||||
<div v-show="hasAttachment" class="uploaded-file">
|
||||
@ -36,11 +35,13 @@
|
||||
v-bind:value="attachment"
|
||||
type="file">
|
||||
<input type="hidden" name="pdf-filename" id="pdf-filename" ref="attachmentFilename">
|
||||
<input type="hidden" name="pdf-object_name" id="pdf-object_name" ref="attachmentObjectName">
|
||||
</div>
|
||||
<template v-if="uploadError">
|
||||
<span class="usa-input__message">There was an error uploading your file. Please try again. If you encounter repeated problems uploading this file, please contact CCPO.</span>
|
||||
</template>
|
||||
<template v-if="sizeError">
|
||||
<span class="usa-input__message">The file you have selected is too large. Please choose a file no larger than 64MB.</span>
|
||||
</template>
|
||||
|
||||
<span class="usa-input__message">Test Error Message</span>
|
||||
|
||||
|
@ -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"'
|
||||
>
|
||||
<div>
|
||||
<div v-show="hasAttachment" class="uploaded-file">
|
||||
@ -36,11 +35,13 @@
|
||||
v-bind:value="attachment"
|
||||
type="file">
|
||||
<input type="hidden" name="pdf-filename" id="pdf-filename" ref="attachmentFilename">
|
||||
<input type="hidden" name="pdf-object_name" id="pdf-object_name" ref="attachmentObjectName">
|
||||
</div>
|
||||
<template v-if="uploadError">
|
||||
<span class="usa-input__message">There was an error uploading your file. Please try again. If you encounter repeated problems uploading this file, please contact CCPO.</span>
|
||||
</template>
|
||||
<template v-if="sizeError">
|
||||
<span class="usa-input__message">The file you have selected is too large. Please choose a file no larger than 64MB.</span>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user