Add tests for RB.UploadAttachmentView

Review Request #10941 — Created March 7, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
dd4c535...

Reviewers

This patch adds unit tests for RB.UploadAttachmentView. The recent refactoring
of the view led to some regressions that were not caught until the changes were
already landed. With unit tests, we can help reduce the likelihood of this
happening in the future.

New tests:
- Cancel button has the correct state when the dialog is initialized
- Cancel button closes the dialog when clicked
- Upload button has the correct state when the dialog is initialized
- Upload button has the correct state when a file is uploaded and when it is
removed
- Upload button sends request to create a file attachment when clicked
- the dialog is populated with the right information when updating a file
attachment