Add tests for RB.UploadAttachmentView

Review Request #1911 — Created April 24, 2020 and updated

guest1495
Review Board
7f07631...
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/


Description From Last Updated

issue requiring verification

guest4353guest4353

issue not requiring verification

guest4353guest4353

fix this then ship it

guest4353guest4353

delete this

guest1495guest1495

Looks good!

guest7996guest7996
guest1495
guest9462
  1. dd

  2. dddddd

  3. \ffffffffffffffff

guest4353
  1. 
      
  2. issue requiring verification
  3. 
      
guest4353
  1. 
      
  2. issue not requiring verification
  3. 
      
guest4353
  1. ship it after that is fixed
  2. fix this then ship it
  3. 
      
guest520
guest8282
  1. Ship It!
  2. 
      
guest8282
  1. Ship It!
  2. 
      
guest7996
  1. 
      
  2. reviewboard/staticbundles.py (Diff revision 1)
     
     

    Looks good!

  3. 
      
Loading...