Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1612 case aggregates frontend #2643

Merged
merged 200 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
210b75c
saving state real quick
andrew-jameson Apr 3, 2023
d70e9c2
Merge branch 'develop' into feat/1613-minimal-retouch
andrew-jameson Apr 12, 2023
2c20472
finishing merge with latest
andrew-jameson Apr 12, 2023
9c0b25d
Missed old test script
andrew-jameson Apr 12, 2023
fba7f43
Added new test, more cleanup
andrew-jameson Apr 18, 2023
b948a5b
Updating unit tests in DFS, preparing for 1610
andrew-jameson Apr 26, 2023
c5796da
Merging in Jan's 1610 code for parserError useful-ness
andrew-jameson Apr 26, 2023
e6087fd
Revert "Merging in Jan's 1610 code for parserError useful-ness"
andrew-jameson Apr 26, 2023
744ba4d
update to test to use dfs fixture
andrew-jameson Apr 26, 2023
6bb2017
saving state before new 1610 merge
andrew-jameson Apr 27, 2023
bd4cc4e
Merged develop and 1610 into 1613 latest
andrew-jameson Apr 27, 2023
1316a70
Resolving merge conflicts with 1610.
andrew-jameson Apr 27, 2023
e118ff3
Linting changes and comparing to 1610
andrew-jameson Apr 27, 2023
21f8954
Some unit test linting but inherited 1610 issues
andrew-jameson Apr 27, 2023
618d300
Re-ordering job to run tests vs lint first.
andrew-jameson Apr 27, 2023
953c9ce
Updates to linting and unit tests.
andrew-jameson Apr 27, 2023
b8c5786
Merge branch 'feature/1610-parser-error-generator' into feat/1613-min…
andrew-jameson Apr 28, 2023
70692f3
Fixing linting.
andrew-jameson Apr 28, 2023
d9f3a43
Update tdrs-backend/setup.cfg
andrew-jameson Apr 28, 2023
3db0af6
updates per PR.
andrew-jameson May 8, 2023
83009cb
Excluding trailers for rejection
andrew-jameson May 8, 2023
b11c310
Merge branch 'feature/1610-parser-error-generator' into feat/1613-min…
andrew-jameson May 8, 2023
223ff08
VSCode merge resolution is garbage.
andrew-jameson May 8, 2023
297e13d
Fixing precheck for not implemented types
andrew-jameson May 24, 2023
e9bd47e
Merge branch 'feature/1610-parser-error-generator' into feat/1613-min…
andrew-jameson Jun 5, 2023
c0f5a74
Updating to error-handle not implemented schema types
andrew-jameson Jun 5, 2023
5fca243
- Updated view to show latest datafiles
elipe17 Jun 28, 2023
a7109c3
- Updated search indices to have parent FK
elipe17 Jul 5, 2023
21a7006
- Fix lint errors
elipe17 Jul 5, 2023
4597d21
- Updated submission tests
elipe17 Jul 6, 2023
7892115
- fix lint errors
elipe17 Jul 6, 2023
0c2d57b
- removing frontend filtering
elipe17 Jul 6, 2023
35a6f24
- addding datafile to admin model
elipe17 Jul 6, 2023
0146a0f
Revert "- addding datafile to admin model"
elipe17 Jul 6, 2023
d354f71
- Fixed issue where datafile FK wasnt populating
elipe17 Jul 6, 2023
2807425
- Readding datafile back to admin view now that the error is resolved
elipe17 Jul 6, 2023
6c54528
- adding datafile back
elipe17 Jul 6, 2023
d1edc20
Revert "- Readding datafile back to admin view now that the error is …
elipe17 Jul 7, 2023
f75fbca
- Removed unnecessary fields
elipe17 Jul 7, 2023
764e212
- Updated document to include required fields
elipe17 Jul 7, 2023
45f296d
- Fixed failing test
elipe17 Jul 10, 2023
c0bce69
add adminUrl to deployment cypress overrides
jtimpe May 5, 2023
57c179d
Adding "beta" banners to relevant error report sections (#2522)
andrew-jameson Jun 2, 2023
8e7d0e3
Create sprint-73-summary.md (#2565)
Smithh-Co Jun 8, 2023
bd3558f
hotfix for large file sizes (#2542)
andrew-jameson Jun 8, 2023
2946dad
updating validation error language
jtimpe Jun 12, 2023
d9d6be9
accidentally included coding challenge
jtimpe Jun 12, 2023
5cdb886
rm comments
jtimpe Jun 12, 2023
fe32cdc
2550 deactivation email link (#2557)
elipe17 Jun 20, 2023
c26703e
Update README.md (#2577)
lfrohlich Jun 20, 2023
075ff86
Create 2023, Spring - Testing CSV & Excel-based error reports.md
reitermb Jun 21, 2023
2ff7d2e
Update README.md
reitermb Jun 21, 2023
093f67f
Updating deliverable links (#2584)
andrew-jameson Jun 21, 2023
9534d25
User viewset not returning/duplicating users (#2573)
elipe17 Jun 21, 2023
9a392ba
Update cf os (#2523)
elipe17 Jun 22, 2023
f8d75cc
Item Number Mismatch (#2578)
elipe17 Jun 23, 2023
a623e00
pipeline filtering (#2538)
George-Hudson Jun 27, 2023
b6d8b77
Hotfix Devops/2457 path filtering for documentation (#2597)
George-Hudson Jun 29, 2023
0dcd36a
Create sprint-74-summary.md (#2596)
Smithh-Co Jun 29, 2023
9aef162
added URL filters (#2580)
raftmsohani Jul 5, 2023
91cc331
Create sprint-75-summary.md (#2608)
Smithh-Co Jul 10, 2023
baffaba
Create sprint-76-summary.md (#2609)
Smithh-Co Jul 10, 2023
b905667
- Resolved failing tests
elipe17 Jul 10, 2023
29fa8b8
- Corrected merge thrash
elipe17 Jul 10, 2023
ac9b065
- Using randbits to generate pk to get around confilcting sequence pks
elipe17 Jul 10, 2023
6c8b3c4
Revert "- Using randbits to generate pk to get around confilcting seq…
elipe17 Jul 10, 2023
88d4b62
- Updating region in fixture instead of factory
elipe17 Jul 10, 2023
cb5077c
- Moved datafile reference to avoid confusion
elipe17 Jul 10, 2023
21b7d66
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Jul 10, 2023
6d3dfbe
pushing up incomplete codebase
andrew-jameson Jul 11, 2023
fc02fd7
Other unit tests now have passed w/ good error handling
andrew-jameson Jul 11, 2023
e137609
Working tests, need to get setup for case aggregates populating via DB
andrew-jameson Jul 11, 2023
9e4e431
- Updated queries
elipe17 Jul 12, 2023
af90565
minor improvement to month2int
andrew-jameson Jul 12, 2023
c5196fb
Merge branch '2579-latest-data' into feat/1613-case-aggregates
elipe17 Jul 12, 2023
4fc63eb
- Fixing most merge errors
elipe17 Jul 12, 2023
cc39ddd
- Fixing functions
elipe17 Jul 12, 2023
a3239c5
- Updated queries based on generic relation
elipe17 Jul 12, 2023
29f52e6
- Updated queries to count by case number instead of record number
elipe17 Jul 12, 2023
89278db
- Added route
elipe17 Jul 12, 2023
e078f50
- updated tests to include dfs
elipe17 Jul 12, 2023
2149f07
Merge branch 'feat/1613-minimal-retouch' into feat/1613-case-aggregates
andrew-jameson Jul 13, 2023
0fbaf77
Cleaning up most comments that are no longer necessary and fixed lint…
andrew-jameson Jul 13, 2023
f7c6772
making minor updates, still broken tests.
andrew-jameson Jul 14, 2023
46a6d73
updating pipfile.lock and rebuild image resolved test issues
andrew-jameson Jul 14, 2023
f162423
Reorganizing tests, still failing in test_parse.py
andrew-jameson Jul 14, 2023
cb01bd3
deleted summary file, split into other test scripts.
andrew-jameson Jul 14, 2023
a194462
Fixed missing self reference.
andrew-jameson Jul 14, 2023
c3bfa54
Linting fixes.
andrew-jameson Jul 17, 2023
534e635
Found reference failure in deployed env.
andrew-jameson Jul 18, 2023
5e79786
Removing extra returns for missing record type.
andrew-jameson Jul 18, 2023
b51a47a
Merge branch 'develop' into feat/1613-minimal-retouch
andrew-jameson Jul 18, 2023
1eb7e9a
lint fix
andrew-jameson Jul 19, 2023
15f67ce
Merge branch 'feat/1613-minimal-retouch' into feat/1613-case-aggregates
andrew-jameson Jul 19, 2023
a6d528e
Addressed invocation of datafile for failing test
andrew-jameson Jul 19, 2023
ef2793e
lint update for whitespace
andrew-jameson Jul 19, 2023
9243672
Intermediary commit, broken test
andrew-jameson Jul 20, 2023
ea3f091
add reverse relation
jtimpe Jul 20, 2023
9062313
frontend summary status
jtimpe Jul 20, 2023
bb158e0
new assignemnts in util
andrew-jameson Jul 20, 2023
dbac144
- updated rejected query to correctly count objs
elipe17 Jul 20, 2023
755b5bb
Merge branch 'feat/1613-case-aggregates' of https://github.com/raft-t…
elipe17 Jul 20, 2023
2c7efd6
- Fixing most tests
elipe17 Jul 20, 2023
e5108b2
- Fixed user error. Swapped numbers by accident.
elipe17 Jul 20, 2023
ff1e2b8
- make region None to avoid PK collision
elipe17 Jul 20, 2023
496a651
- Fix lint errors
elipe17 Jul 20, 2023
aed64f9
- Updating to avoid warning
elipe17 Jul 20, 2023
76f63b5
add acceptance icon
jtimpe Jul 20, 2023
5431579
add reverse relationship to summary model
jtimpe Jul 20, 2023
0193d9f
Merge branch 'feat/1613-case-aggregates' into feature/1610-frontend-p…
jtimpe Jul 20, 2023
e01ac15
vscode merge conflict resolution (#2623)
andrew-jameson Jul 21, 2023
81e5c21
add a pending status
jtimpe Jul 24, 2023
d3af83b
add acceptance status tests
jtimpe Jul 24, 2023
f7e5aba
update warning icon
jtimpe Jul 24, 2023
b55f40c
rm old assert
jtimpe Jul 24, 2023
3b1fa65
update rejected icon
jtimpe Jul 24, 2023
4f743cc
add case aggregates to submission history
jtimpe Jul 24, 2023
3d444a9
url change per me, want pipeline to run e2e
andrew-jameson Jul 26, 2023
1930755
update case aggregate columns
jtimpe Jul 31, 2023
70fb34f
update col names
jtimpe Aug 1, 2023
d3bceb7
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Aug 2, 2023
3cb28b9
Upgraded to querysets, fix PR comments, PE str
andrew-jameson Aug 7, 2023
94d4b36
Merge develop/remote into local
andrew-jameson Aug 7, 2023
90709a3
missing : not caught locally
andrew-jameson Aug 7, 2023
d55a917
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Aug 7, 2023
ad8ab50
Feat/1613 merge 2 (#2650)
andrew-jameson Aug 7, 2023
1648b0c
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Aug 8, 2023
07b5215
Merge branch 'feat/1613-case-aggregates' of github.com:raft-tech/TANF…
andrew-jameson Aug 8, 2023
3af7440
icontains
andrew-jameson Aug 8, 2023
b987399
tests
andrew-jameson Aug 8, 2023
091c8d9
Changing dict structure per 1612.
andrew-jameson Aug 8, 2023
ebeaec8
fixed tests and lint issues, parse is too complex
andrew-jameson Aug 9, 2023
6fbcebf
schema_manager replaces schema check
andrew-jameson Aug 9, 2023
6634979
Saving state prior to merge-conflict.
andrew-jameson Aug 9, 2023
9db047b
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Aug 9, 2023
8dae7da
Adopting latest manager, removing old error style.
andrew-jameson Aug 9, 2023
0887b89
Commented out t6 line during Office hours
andrew-jameson Aug 9, 2023
b9daa9d
minor reference update
andrew-jameson Aug 9, 2023
a060883
Acclimating to schemaManager
andrew-jameson Aug 11, 2023
eaab681
lint-fix isinstance
andrew-jameson Aug 11, 2023
d8b7672
syntax mistake with isinstance
andrew-jameson Aug 11, 2023
af932cd
Apply suggestions from code review
andrew-jameson Aug 11, 2023
e4fabbf
reverting search_index merge artifacts.
andrew-jameson Aug 11, 2023
181d48d
adjusting for removing unused "get-schema()"
andrew-jameson Aug 11, 2023
8564f13
whitespace lint
andrew-jameson Aug 11, 2023
16ebc55
Feedback from Jan
andrew-jameson Aug 14, 2023
eee7cba
Ensuring tests run/work.
andrew-jameson Aug 14, 2023
f83c019
Ensure we have leading zero in rptmonthyear.
andrew-jameson Aug 14, 2023
cfc01a2
Merge branch 'feat/1613-case-aggregates' into feature/1610-frontend-p…
jtimpe Aug 16, 2023
52af865
Merge branch 'feature/1610-frontend-parsing-status' into 1612-case-ag…
jtimpe Aug 16, 2023
49222be
Minor lint fix for exception logging
andrew-jameson Aug 17, 2023
568454c
fix migration
jtimpe Aug 22, 2023
7fa3d4c
add backend partially accepted status
jtimpe Aug 23, 2023
44eacbc
add frontend partially accepted status
jtimpe Aug 23, 2023
2caeb99
add partially accepted test
jtimpe Aug 23, 2023
54ee1fe
Merge branch 'feature/1610-frontend-parsing-status' into 1612-case-ag…
jtimpe Aug 23, 2023
01dcf88
rm accidental commit
jtimpe Aug 24, 2023
b294cec
rm unused variable
jtimpe Aug 24, 2023
23f21c4
Merge branch 'feature/1610-frontend-parsing-status' into 1612-case-ag…
jtimpe Aug 24, 2023
87cb309
conditional submission history
jtimpe Aug 24, 2023
82d7aea
Merge branch 'feat/1613-case-aggregates' into 1612-case-aggregates-fr…
jtimpe Aug 24, 2023
4908433
fix test
jtimpe Aug 24, 2023
d76d5af
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Aug 31, 2023
d398ef7
resolving merge conflict problems
andrew-jameson Aug 31, 2023
6c21179
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Sep 1, 2023
3bbe4b3
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Sep 5, 2023
2a39e5d
fixing tests from merge conflicts.
andrew-jameson Sep 5, 2023
9d97a33
- fixed migration reference
elipe17 Sep 5, 2023
3b4cf3e
dumb lint fix
andrew-jameson Sep 5, 2023
0680e5b
- Fixed render error
elipe17 Sep 5, 2023
0b6b541
Merge branch 'feat/1613-case-aggregates' of https://github.com/raft-t…
elipe17 Sep 5, 2023
064b415
Adding section
elipe17 Sep 6, 2023
9df10f4
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Sep 7, 2023
eae8d3c
- Resolved type mismatches causing render failures
elipe17 Sep 7, 2023
8408f66
- Adding branch coverage
elipe17 Sep 8, 2023
b99a17c
- Fix lint errors
elipe17 Sep 8, 2023
6fd7d52
- Fix lint errors
elipe17 Sep 8, 2023
b3af51a
- Consolodated tetss
elipe17 Sep 11, 2023
96a3227
Merge branch 'develop' into feat/1613-case-aggregates
andrew-jameson Sep 18, 2023
8cc1357
reducing line length for lint
andrew-jameson Sep 18, 2023
84a0de4
Merge branch 'develop' into feat/1613-case-aggregates
ADPennington Sep 19, 2023
12dd45c
- updated maxWidth to be percentage
elipe17 Sep 19, 2023
221f25f
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Sep 19, 2023
30cd7e5
Merge branch 'feat/1613-case-aggregates' of https://github.com/raft-t…
elipe17 Sep 19, 2023
ee3f907
Moving DFS migration into it's own file to avoid conflicts.
andrew-jameson Sep 20, 2023
cd07fea
Merge branch 'develop' into feat/1613-case-aggregates
ADPennington Sep 20, 2023
985845b
Merge branch 'feat/1613-case-aggregates' into 1612-case-aggregates-fr…
jtimpe Sep 22, 2023
25b1ba3
rename migrations
jtimpe Sep 22, 2023
cf7eee8
left align error report text
jtimpe Sep 22, 2023
985e956
github got stuck :(
jtimpe Sep 25, 2023
1bc226e
rm comment
jtimpe Sep 25, 2023
1cb52f5
Merge branch 'feat/1613-case-aggregates' of https://github.com/raft-t…
elipe17 Sep 25, 2023
a7b603a
Merge branch '1612-case-aggregates-frontend' of https://github.com/ra…
elipe17 Sep 25, 2023
291e0bc
merge develop into 1612
jtimpe Sep 26, 2023
ee4447f
Merge branch 'develop' into 1612-case-aggregates-frontend
ADPennington Sep 29, 2023
64ee218
rm margin, add text for no error report
jtimpe Sep 29, 2023
0d60e46
fix tests
jtimpe Sep 29, 2023
1967766
Merge branch 'develop' into 1612-case-aggregates-frontend
jtimpe Sep 29, 2023
be3db45
Merge branch 'develop' into 1612-case-aggregates-frontend
jtimpe Oct 4, 2023
1e20abb
fix ssp case aggregates display
jtimpe Oct 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tdrs-backend/tdpservice/parsers/test/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def test_parse_small_correct_file(test_datafile, dfs):
]}

assert dfs.get_status() == DataFileSummary.Status.ACCEPTED

assert TANF_T1.objects.count() == 1

# spot check
Expand Down
1 change: 0 additions & 1 deletion tdrs-backend/tdpservice/parsers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def transform_to_months(quarter):
case _:
raise ValueError("Invalid quarter value.")


def month_to_int(month):
"""Return the integer value of a month."""
return datetime.strptime(month, '%b').strftime('%m')
Expand Down
1 change: 1 addition & 0 deletions tdrs-frontend/src/assets/Reports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
border: none;
text-decoration: underline;
color: #264A64;
text-align: left;
}

.section-download:hover {
Expand Down
199 changes: 166 additions & 33 deletions tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,63 @@ const SubmissionSummaryStatusIcon = ({ status }) => {
)
}

const CaseAggregatesHeader = ({ section }) =>
section === 1 || section === 2 ? (
<>
<th scope="col" rowSpan={2}>
Month
</th>
<th scope="col" rowSpan={2}>
Cases Without Errors
</th>
<th scope="col" rowSpan={2}>
Cases With Errors
</th>
<th scope="col" rowSpan={2}>
Records Unable To Process
</th>
</>
) : (
<>
<th scope="col" rowSpan={2}>
Month
</th>
<th scope="col" rowSpan={2}>
Total
</th>
<th scope="col" rowSpan={2}>
Cases With Errors
</th>
</>
)

const CaseAggregatesRow = ({ data, section }) =>
section === 1 || section === 2 ? (
data ? (
<>
<th scope="row">{data.month}</th>
<td>{data.accepted_without_errors}</td>
<td>{data.accepted_with_errors}</td>
</>
) : (
<>
<th scope="row">-</th>
<td>N/A</td>
<td>N/A</td>
</>
)
) : data ? (
<>
<th scope="row">{data.month}</th>
<td>{data.total}</td>
</>
) : (
<>
<th scope="row">-</th>
<td>N/A</td>
</>
)

const SubmissionHistoryRow = ({ file }) => {
const dispatch = useDispatch()

Expand All @@ -72,35 +129,96 @@ const SubmissionHistoryRow = ({ file }) => {
}
}

const section_index = (element) => file.section.includes(element)

const section = fileUploadSections.findIndex(section_index) + 1

return (
<tr>
<td>{formatDate(file.createdAt)}</td>
<td>{file.submittedBy}</td>
<td>
<button className="section-download" onClick={downloadFile}>
{file.fileName}
</button>
</td>
<td>
{file.summary ? (
<>
<SubmissionSummaryStatusIcon status={file.summary.status} />
{file.summary && file.summary.status
? file.summary.status
: 'Pending'}
</>
) : (
'N/A'
)}
</td>
<td>
{file.hasError > 0 ? (
<button className="section-download" onClick={returned_errors}>
{file.year}-{file.quarter}-{file.section}.xlsx
<>
<tr>
<th scope="rowgroup" rowSpan={3}>
{formatDate(file.createdAt)}
</th>
<th scope="rowgroup" rowSpan={3}>
{file.submittedBy}
</th>
<th scope="rowgroup" rowSpan={3}>
<button className="section-download" onClick={downloadFile}>
{file.fileName}
</button>
) : null}
</td>
</tr>
</th>
<CaseAggregatesRow
data={
file.summary &&
file.summary.case_aggregates &&
file.summary.case_aggregates.months
? file.summary.case_aggregates.months[0]
: null
}
section={section}
/>

<th scope="rowgroup" rowSpan={3}>
{file.summary &&
file.summary.case_aggregates &&
file.summary.case_aggregates.months
? file.summary.case_aggregates.rejected
: 'N/A'}
</th>

<th scope="rowgroup" rowSpan={3}>
<span>
<SubmissionSummaryStatusIcon
status={file.summary ? file.summary.status : 'Pending'}
/>
</span>
{file.summary && file.summary.status
? file.summary.status
: 'Pending'}
</th>

<th scope="rowgroup" rowSpan={3}>
{file.summary &&
file.summary.status &&
file.summary.status !== 'Pending' ? (
file.hasError > 0 ? (
<button className="section-download" onClick={returned_errors}>
{file.year}-{file.quarter}-{file.section}.xlsx
</button>
) : (
'No Errors'
)
) : (
'Pending'
)}
</th>
</tr>

<tr>
<CaseAggregatesRow
data={
file.summary &&
file.summary.case_aggregates &&
file.summary.case_aggregates.months
? file.summary.case_aggregates.months[1]
: null
}
section={section}
/>
</tr>
<tr>
<CaseAggregatesRow
data={
file.summary &&
file.summary.case_aggregates &&
file.summary.case_aggregates.months
? file.summary.case_aggregates.months[2]
: null
}
section={section}
/>
</tr>
</>
)
}

Expand All @@ -118,18 +236,33 @@ const SectionSubmissionHistory = ({ section, label, files }) => {
const pageEnd = Math.min(files.length, pageStart + pageSize)

return (
<div className="submission-history-section">
<div
className="submission-history-section usa-table-container--scrollable"
style={{ maxWidth: '100%' }}
tabIndex={0}
>
<table className="usa-table usa-table--striped">
<caption>{`Section ${section} - ${label}`}</caption>
{files && files.length > 0 ? (
<>
<thead>
<tr>
<th>Submitted On</th>
<th>Submitted By</th>
<th>File Name</th>
<th>Acceptance Status</th>
<th>Error Reports (In development)</th>
<th scope="col" rowSpan={2}>
Submitted On
</th>
<th scope="col" rowSpan={2}>
Submitted By
</th>
<th scope="col" rowSpan={2}>
File Name
</th>
<CaseAggregatesHeader section={section} />
<th scope="col" rowSpan={2}>
Status
</th>
<th scope="col" rowSpan={2}>
Error Reports (In development)
</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,25 @@ describe('SubmissionHistory', () => {
})

it.each([
elipe17 marked this conversation as resolved.
Show resolved Hide resolved
'Pending',
'Accepted',
'Accepted with Errors',
'Partially Accepted with Errors',
'Rejected',
null,
])('Shows the submission acceptance status', (status) => {
['Pending', 'Active Case Data'],
['Pending', 'Closed Case Data'],
['Pending', 'Aggregate Data'],
['Accepted', 'Active Case Data'],
['Accepted', 'Closed Case Data'],
['Accepted', 'Aggregate Data'],
['Accepted with Errors', 'Active Case Data'],
['Accepted with Errors', 'Closed Case Data'],
['Accepted with Errors', 'Aggregate Data'],
['Partially Accepted with Errors', 'Active Case Data'],
['Partially Accepted with Errors', 'Closed Case Data'],
['Partially Accepted with Errors', 'Aggregate Data'],
['Rejected', 'Active Case Data'],
['Rejected', 'Closed Case Data'],
['Rejected', 'Aggregate Data'],
[null, 'Active Case Data'],
[null, 'Closed Case Data'],
[null, 'Aggregate Data'],
])('Shows the submission acceptance status section 3', (status, section) => {
const state = {
reports: {
files: [
Expand All @@ -354,7 +366,7 @@ describe('SubmissionHistory', () => {
fileName: 'test1.txt',
fileType: 'TANF',
quarter: 'Q1',
section: 'Active Case Data',
section: section,
uuid: '123-4-4-321',
year: '2023',
s3_version_id: '321-0-0-123',
Expand Down Expand Up @@ -392,8 +404,13 @@ describe('SubmissionHistory', () => {

setup(store)

expect(screen.queryByText('Acceptance Status')).toBeInTheDocument()
expect(screen.queryByText('Status')).toBeInTheDocument()
expect(screen.queryByText('test1.txt')).toBeInTheDocument()
expect(screen.queryByText(status || 'Pending')).toBeInTheDocument()

if (status && status !== 'Pending') {
expect(screen.queryByText(status)).toBeInTheDocument()
} else {
expect(screen.queryAllByText('Pending')).toHaveLength(2)
}
})
})
Loading