Fix up a few other broken js-tests.
Review Request #14444 — Created May 19, 2025 and submitted — Latest diff uploaded
This change fixes a bunch of broken js-tests, but it came down to three
problems:
- The
FileAttachmentThumbnailView
was checking the newly-added
canAccessReviewUI
attribute, but that wasn't set in the test that
needed it. While I was doing this I fixed up the type in the
attributes definition. - The check for the
tab_size
field was assuming that we had afile
set on the reviewable, which many unit tests did not do. I've changed
the implementation to check for that instead of assuming. - Similarly, the check to allow self ship-it was assuming that there was
a "submitter" link present on the review request, when many unit tests
did not set that data. I've changed it to check existence first.
Ran js-tests.
reviewboard/static/rb/js/common/resources/models/fileAttachmentModel.ts |
---|
reviewboard/static/rb/js/reviews/views/diffReviewableView.ts |
---|
reviewboard/static/rb/js/reviews/views/reviewDialogView.ts |
---|
reviewboard/static/rb/js/reviews/views/tests/fileAttachmentThumbnailViewTests.ts |
---|