Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 68a69d1
Merge: f9408ad 7f4d157
Author: Chuck McAndrew <[email protected]>
Date:   Thu Feb 25 11:39:32 2021 -0500

    Merge pull request #196 from adhocteam/cm-310-update-file-statuses

    simplify file upload statuses

commit 7f4d157
Author: Chuck McAndrew <[email protected]>
Date:   Thu Feb 25 10:43:33 2021 -0500

    fmt

commit b7724ce
Author: Chuck McAndrew <[email protected]>
Date:   Thu Feb 25 10:39:19 2021 -0500

    add tests for getStatus()

commit cc12546
Author: Chuck McAndrew <[email protected]>
Date:   Thu Feb 25 10:04:59 2021 -0500

    simplify file upload statuses
  • Loading branch information
dcmcand committed Feb 25, 2021
1 parent fe10580 commit 55e2e57
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions frontend/src/components/__tests__/FileUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,25 @@ describe('FileUploader', () => {
expect(got).toBe('Rejected');
});
});
describe('getStatus tests', () => {
it('returns the correct statuses', () => {
let got;
got = getStatus('UPLOADING');
expect(got).toBe('Uploading');
got = getStatus('UPLOADED');
expect(got).toBe('Uploaded');
got = getStatus('UPLOAD_FAILED');
expect(got).toBe('Upload Failed');
got = getStatus('QUEUING_FAILED');
expect(got).toBe('Upload Failed');
got = getStatus('SCANNING_QUEUED');
expect(got).toBe('Scanning');
got = getStatus('SCANNING');
expect(got).toBe('Scanning');
got = getStatus('APPROVED');
expect(got).toBe('Approved');
got = getStatus('REJECTED');
expect(got).toBe('Rejected');
});
});
});

0 comments on commit 55e2e57

Please sign in to comment.