Add tests for RB.UploadAttachmentView
Review Request #1911 — Created April 24, 2020 and updated
Information | |
---|---|
guest1495 | |
Review Board | |
7f07631... | |
Reviewers | |
demo | |
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. Testing Done: 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. Reviewed at https://reviews.reviewboard.org/r/10941/
-
-
reviewboard/static/rb/js/views/tests/uploadAttachmentViewTests.es6.js (Diff revision 1) what is this for?