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

Poulter/46624 react 18 upgrade 10 23 #23328

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
50914a0
react 18 test upgrade
gcd253 May 15, 2024
84a283f
styled-components
gcd253 May 21, 2024
43b1347
EditPOAInformation test refactor, in progrss NonratingRIUModal test
AdamShawBAH Jun 5, 2024
928cf93
additional tests refactored
AdamShawBAH Jun 10, 2024
349c0d1
Refactors Enzyme -> RTL
AdamShawBAH Jun 11, 2024
96617c2
more changes
AdamShawBAH Jun 11, 2024
210a6af
Enzyme -> RTL refactors (cont)
AdamShawBAH Jun 11, 2024
8307f4c
Enzyme -> RTL refactor (cont)
AdamShawBAH Jun 13, 2024
20796bf
Enzyme -> RTL refactor (cont)
AdamShawBAH Jun 13, 2024
d81b383
Enzyme -> RTL refactor (cont)
AdamShawBAH Jun 18, 2024
66f01f8
Enzyme -> RTL refactor (cont)
AdamShawBAH Jun 19, 2024
3ad9abd
Cherry-picking from v2 branch --cont
AdamShawBAH Jun 20, 2024
1e4daf3
fixed badge test
AdamShawBAH Jun 26, 2024
807eb3c
Enzyme -> RTL (establishClaim-test)
AdamShawBAH Jun 27, 2024
11c74af
Enzyme -> RTL (cont, Batch 3)
AdamShawBAH Jul 1, 2024
8c9bca3
Batch 3 refactor cont
AdamShawBAH Jul 5, 2024
cf7e354
Batch 3 In Progress
AdamShawBAH Jul 8, 2024
2a47de2
Batch 3 to review
AdamShawBAH Jul 9, 2024
bbf252c
Batch 4 updates
AdamShawBAH Jul 16, 2024
4b02687
ScheduleVeteran.test refactor finished
AdamShawBAH Jul 16, 2024
ce38eb9
Batch 4 and cleanups
AdamShawBAH Jul 17, 2024
fd8d700
Batch 4 continued
AdamShawBAH Jul 19, 2024
98d1dd6
Outstanding Enzyme -> RTL refactors
AdamShawBAH Jul 19, 2024
93d58aa
batch 4 changes and non used enzyme test removal
AdamShawBAH Jul 24, 2024
2b3a7ed
clean up
AdamShawBAH Aug 8, 2024
58cd792
snapshot and failing test clean up
AdamShawBAH Aug 13, 2024
d01b5fe
Test updates and Snapshot fixes
AdamShawBAH Aug 14, 2024
df87ebc
Package updates with a couple fixed tests
AdamShawBAH Aug 15, 2024
3c03da1
Make test less brittle
hawkespoulterva Aug 15, 2024
aa55b07
switch to for...of instead of forEach to fix async problems
hawkespoulterva Aug 15, 2024
7232743
remove unnecessary
hawkespoulterva Aug 15, 2024
0ed5d86
lint fixes
AdamShawBAH Aug 20, 2024
f8ea031
disable linters
hawkespoulterva Aug 21, 2024
f65ecbb
APPEALS-55525: Disable tests for seed files and lock Chrome version t…
craigrva Aug 22, 2024
1751ca5
React Dependency upgrade
AdamShawBAH Aug 25, 2024
4c0fca8
force wepback-bundle.js
hawkespoulterva Aug 26, 2024
1dfdd3a
Fix for bva_dispatch_return_flow_spec
AdamShawBAH Aug 27, 2024
9c4fcf1
fixed spec method to click pdf
AdamShawBAH Aug 28, 2024
ff223ed
Fixed task_queue_spec.rb
AdamShawBAH Aug 29, 2024
36e72d2
add indicated_for_contested_claims flag to legacy appeals
hawkespoulterva Aug 29, 2024
972a236
update legacy appeal spec
hawkespoulterva Aug 30, 2024
95a7d37
fix for scm_judge_assignment_spec.rb
AdamShawBAH Sep 3, 2024
3d6525f
force state update
hawkespoulterva Sep 3, 2024
ab792ac
fixed admin_ui_spec.rb
AdamShawBAH Sep 4, 2024
6383aa7
fixed user_organization_spec.rb
AdamShawBAH Sep 5, 2024
f32052b
flow modal refactor to functional component and fix state renders, re…
hawkespoulterva Sep 6, 2024
5400912
fixed motion_to_vacate_spec.rb
AdamShawBAH Sep 6, 2024
eae6536
revert changes
hawkespoulterva Sep 6, 2024
0820757
revert all changes
hawkespoulterva Sep 6, 2024
8083683
stop letting null pass
hawkespoulterva Sep 6, 2024
01e388c
revert more changes
hawkespoulterva Sep 6, 2024
53d6879
test null condition
hawkespoulterva Sep 6, 2024
33e0631
comment
hawkespoulterva Sep 6, 2024
fe9b2e6
revert test
hawkespoulterva Sep 6, 2024
d3daaa6
add flushsync
hawkespoulterva Sep 9, 2024
00d90e7
Merge branch 'master' into Poulter/46624-React-18-Upgrade
hawkespoulterva Sep 10, 2024
d99dcbc
Merge branch 'Shaw/APPEALS-46624-caseflow-react-v18.20.x-v3' into Pou…
hawkespoulterva Sep 10, 2024
d69e653
remove enzyme and update snapshots
hawkespoulterva Sep 10, 2024
ee1d866
fixed EmailConfirmationModal.test.js
AdamShawBAH Sep 10, 2024
47b6d98
fixed NonratingRequestIssueModal-test.js
AdamShawBAH Sep 10, 2024
28dec9e
fixed Timezone.test.js
AdamShawBAH Sep 10, 2024
b43fcb7
fixed ScheduleVeteranForm.test.js
AdamShawBAH Sep 10, 2024
3fc4432
fixed HearingTime.test.js
AdamShawBAH Sep 10, 2024
ef591b6
fixed IssueTags.test.js
AdamShawBAH Sep 10, 2024
d34b1a4
linting
hawkespoulterva Sep 10, 2024
8023aea
updated daily_docket_spec.rb
AdamShawBAH Sep 10, 2024
d9d3e7f
fix duplicated code for code climate
hawkespoulterva Sep 11, 2024
a1e7d7d
fix more shared test setup
hawkespoulterva Sep 11, 2024
eb6d821
hopefully the last duplicate code
hawkespoulterva Sep 11, 2024
ab07c36
remove sleeps
hawkespoulterva Sep 11, 2024
d1407d4
update for daily_docket_spec.rb
AdamShawBAH Sep 12, 2024
5da5449
add flush sync and add initialState back in
hawkespoulterva Sep 13, 2024
9fc935a
Merge branch 'master' into Poulter/46624-React-18-Upgrade
hawkespoulterva Sep 13, 2024
aa19bd1
Merge branch 'master' into Poulter/46624-React-18-Upgrade
hawkespoulterva Sep 16, 2024
c2c2279
added waits to vso_change_hearing_request_type_spec.rb
AdamShawBAH Sep 20, 2024
1ac8bba
remove legacy appeal flag
hawkespoulterva Sep 23, 2024
957683d
Merge branch 'Poulter/46624-React-18-Upgrade' into Poulter/46624-reac…
hawkespoulterva Sep 23, 2024
c3b10c5
Remove debugging statement
hawkespoulterva Sep 24, 2024
0997b5c
revert change spec and fix state sync
hawkespoulterva Sep 24, 2024
e8f6da0
Merge branch 'main' into Poulter/46624-react-18-upgrade-1
hawkespoulterva Sep 25, 2024
a2e8233
remove file changes
hawkespoulterva Sep 25, 2024
6423593
Merge branch 'main' into Poulter/46624-react-18-upgrade-1
hawkespoulterva Oct 9, 2024
f08051e
fix snapshot
hawkespoulterva Oct 9, 2024
8c6d88c
Merge branch 'main' into Poulter/46624-react-18-upgrade-1
AdamShawBAH Oct 10, 2024
04e9fe7
Merge branch 'Poulter/46624-react-18-upgrade-1' into Poulter/APPEALS-…
hawkespoulterva Oct 21, 2024
37299cc
fixed tests
hawkespoulterva Oct 22, 2024
2436a54
revert unnecesarry change
hawkespoulterva Oct 22, 2024
a59edc7
remove old spec changes
hawkespoulterva Oct 22, 2024
60aec26
fix syncable job
hawkespoulterva Oct 22, 2024
f6ce01f
Merge branch 'Poulter/APPEALS-46624-react-18-upgrade-final' into Poul…
hawkespoulterva Oct 23, 2024
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
2 changes: 1 addition & 1 deletion client/app/components/TableFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class TableFilter extends React.PureComponent {
getFilterValues;

return (
<span {...iconStyle}>
<span {...iconStyle} data-testid="table-filter-testid">
<FilterIcon
aria-label={this.filterIconAriaLabel()}
label={this.filterIconAriaLabel()}
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/Tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Tooltip = (props) => {
return (
<React.Fragment>
{React.cloneElement(props.children, tooltipProps)}
<span {...tooltipStyling}>
<span {...tooltipStyling} data-testid="tooltip-testid">
<ReactTooltip
effect="solid"
id={id}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import React from 'react';
import { mount } from 'enzyme';
import { render, screen, waitFor } from '@testing-library/react';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';

import rootReducer from 'app/queue/reducers';
import ContestedClaimBadge from './ContestedClaimBadge';
import COPY from 'COPY';

describe('ContestedClaimBadge', () => {
const defaultAppeal = {
contested_claim: true,
id: '1234',
contestedClaim: true
};

const getStore = () => createStore(rootReducer, applyMiddleware(thunk));

const setupContestedClaimBadge = (store) => {
return mount(
return (
<Provider store={store}>
<ContestedClaimBadge
appeal={defaultAppeal}
Expand All @@ -24,10 +26,15 @@ describe('ContestedClaimBadge', () => {
);
};

it('renders correctly', () => {
it('renders correctly', async () => {
const store = getStore();
const component = setupContestedClaimBadge(store);
const { asFragment } = render(setupContestedClaimBadge(store));

expect(component).toMatchSnapshot();
waitFor(() => {
expect(screen.getByText('CC')).toBeInTheDocument();
expect(screen.getByText(COPY.CC_BADGE_TOOLTIP)).toBeInTheDocument();
});

expect(asFragment()).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -1,23 +1,119 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ContestedClaimBadge renders correctly 1`] = `
<Provider
store={
Object {
"dispatch": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
}
>
<ContestedClaimBadge
appeal={
Object {
"contested_claim": true,
}
}
/>
</Provider>
<DocumentFragment>
<div
class="cf-contested-badge"
>
<span
aria-describedby="badge-cc-1234"
aria-label="contested claim"
currentitem="false"
data-css-j1ndum=""
data-event="focus mouseenter"
data-event-off="mouseleave keydown"
data-for="badge-cc-1234"
data-tip="true"
tabindex="0"
>
CC
</span>
<span
data-css-s9vlzg=""
data-testid="tooltip-testid"
>
<div
class="__react_component_tooltip t00000000-0000-0000-0000-000000000000 place-bottom type-dark"
data-id="tooltip"
id="badge-cc-1234"
role="tooltip"
>
<style>
.t00000000-0000-0000-0000-000000000000 {
color: #fff;
background: #222;
border: 1px solid transparent;
}
.t00000000-0000-0000-0000-000000000000.place-top {
margin-top: -10px;
}
.t00000000-0000-0000-0000-000000000000.place-top::before {
border-top: 8px solid transparent;
}
.t00000000-0000-0000-0000-000000000000.place-top::after {
border-left: 8px solid transparent;
border-right: 8px solid transparent;
bottom: -6px;
left: 50%;
margin-left: -8px;
border-top-color: #222;
border-top-style: solid;
border-top-width: 6px;
}
.t00000000-0000-0000-0000-000000000000.place-bottom {
margin-top: 10px;
}
.t00000000-0000-0000-0000-000000000000.place-bottom::before {
border-bottom: 8px solid transparent;
}
.t00000000-0000-0000-0000-000000000000.place-bottom::after {
border-left: 8px solid transparent;
border-right: 8px solid transparent;
top: -6px;
left: 50%;
margin-left: -8px;
border-bottom-color: #222;
border-bottom-style: solid;
border-bottom-width: 6px;
}
.t00000000-0000-0000-0000-000000000000.place-left {
margin-left: -10px;
}
.t00000000-0000-0000-0000-000000000000.place-left::before {
border-left: 8px solid transparent;
}
.t00000000-0000-0000-0000-000000000000.place-left::after {
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
right: -6px;
top: 50%;
margin-top: -4px;
border-left-color: #222;
border-left-style: solid;
border-left-width: 6px;
}
.t00000000-0000-0000-0000-000000000000.place-right {
margin-left: 10px;
}
.t00000000-0000-0000-0000-000000000000.place-right::before {
border-right: 8px solid transparent;
}
.t00000000-0000-0000-0000-000000000000.place-right::after {
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
left: -6px;
top: 50%;
margin-top: -4px;
border-right-color: #222;
border-right-style: solid;
border-right-width: 6px;
}
</style>
<div
style="white-space: pre-line;"
>
This is a Contested Claim and needs to be
processed by the Specialty Case team. Please
include all parties and POA in correspondence.
</div>
</div>
</span>
</div>
</DocumentFragment>
`;
40 changes: 30 additions & 10 deletions client/app/components/badges/FnodBadge/FnodBadge.test.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
import React from 'react';
import { mount } from 'enzyme';
import { render, screen, waitFor } from '@testing-library/react';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';

import rootReducer from 'app/queue/reducers';
import FnodBadge from './FnodBadge';
import { tooltipListStyling } from 'app/components/badges/style';
import { DateString } from 'app/util/DateUtil';
import COPY from 'COPY';
import Badge from '../Badge';

describe('FnodBadge', () => {
const defaultAppeal = {
veteranAppellantDeceased: true,
veteranDateOfDeath: '2019-03-17'
};

const veteranAppellantDeceased = true;
const uniqueId = '1234'
const veteranDateOfDeath = '2019-03-17';
const tooltipText = <div>
<strong>Date of Death Reported</strong>
<ul {...tooltipListStyling}>
<li><strong>Source:</strong> {COPY.FNOD_SOURCE}</li>
{veteranDateOfDeath &&
<li><strong>Date of Death:</strong> <DateString date={veteranDateOfDeath} /></li>
}
</ul>
</div>;

const getStore = () => createStore(rootReducer, applyMiddleware(thunk));

const setupFnodBadge = (store) => {
return mount(
return (
<Provider store={store}>
<FnodBadge
appeal={defaultAppeal}
uniqueId={uniqueId}
veteranAppellantDeceased={veteranAppellantDeceased}
tooltipText={tooltipText}
/>
</Provider>
);
};

it('renders correctly', () => {
it.only('renders correctly', () => {
const store = getStore();
const component = setupFnodBadge(store);
const { asFragment } = render(setupFnodBadge(store));

expect(component).toMatchSnapshot();
expect(screen.getByText('FNOD')).toBeInTheDocument();
expect(screen.getByText('Date of Death Reported')).toBeInTheDocument()
expect(screen.getByText('Source:')).toBeInTheDocument();
expect(screen.getByText('Date of Death:')).toBeInTheDocument();
expect(screen.getByText('03/17/19')).toBeInTheDocument();
expect(asFragment()).toMatchSnapshot();
});
});
Loading
Loading