Skip to content
Snippets Groups Projects
Commit ba973c5b authored by Dan Braghis's avatar Dan Braghis
Browse files

fixup! Add simple test for field group titles on reviews

parent b72f51d1
No related branches found
No related tags found
No related merge requests found
......@@ -121,15 +121,11 @@ class ReviewDetailTestCase(BaseTestCase):
url_name = 'funds:submissions:reviews:{}'
def get_kwargs(self, instance):
return {'submission_pk': instance.id}
return {'pk': instance.id, 'submission_pk': instance.submission.id}
def test_review_detail_field_groups(self):
submission = ApplicationSubmissionFactory(workflow_stages=2)
submission = ApplicationSubmissionFactory(status='draft_proposal', workflow_stages=2)
review = ReviewFactory(submission=submission, author=self.user)
response = self.get_page(review, 'detail')
response = self.get_page(review)
self.assertContains(response, submission.title)
self.assertContains(response, reverse('funds:submissions:reviews:review', kwargs={
'pk': review.id,
'submission_pk': submission.id,
}))
self.assertContains(response, "<h4>A. Conflicts of Interest and Confidentiality</h4>")
......@@ -119,6 +119,8 @@ class ReviewDetailView(DetailView):
try:
# Add titles which exist
title = form_used.titles[field.group]
# Setting the value to a flag, so the output is treated slightly differently
# This will change with the StreamForms implementation
review_data.setdefault(title, '<field_group_title>')
except AttributeError:
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment