-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add download example link to interface form field #3823
base: main
Are you sure you want to change the base?
Add download example link to interface form field #3823
Conversation
app/grandchallenge/components/templates/components/partials/example_download_link.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good already! A few questions and suggestions for spit and polish.
app/grandchallenge/components/templates/components/partials/example_download_link.html
Outdated
Show resolved
Hide resolved
app/grandchallenge/components/templates/components/partials/example_download_link.html
Show resolved
Hide resolved
) | ||
@pytest.mark.parametrize("store_in_db", [True, False]) | ||
@pytest.mark.django_db | ||
def test_interface_form_field_help_text_example_download_link( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could:
- move this to a dedicated
test_fields.py
, create it if it doesn't already exists - not use the django_db but rather pass user=None, this speeds things up a lot
- add a negative test: i.e. add an case where there should not be an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All points were taken except:
not use the django_db but rather pass user=None, this speeds things up a lot
There are factories for component interface creation which need access to the database to create them.
Maybe I am mistaken, can you please clarify that point and if it is meant for this type of tests?
self.kwargs["widget"] = FlexibleFileWidget( | ||
help_text=self.help_text, | ||
help_text=_join_with_br(self.help_text, extra_help), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the new implementation of file widget #8ae9479
The download link is not showing correctly.
Looking into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thomas is still in the process of heavily refactoring the logic there, so maybe best to wait until he is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I will wait then.
closes #3809