Skip to content

Commit 659e0eb

Browse files
committed
Testing library upgrades and updated snapshots
1 parent 5e81d95 commit 659e0eb

File tree

6 files changed

+1807
-1242
lines changed

6 files changed

+1807
-1242
lines changed

web-ui/package.json

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"react-jss": "^10.4.0",
4444
"react-modal": "^3.14.3",
4545
"react-router-dom": "^5.3.0",
46-
"react-swipeable-views": "^0.14.0",
4746
"recharts": "^2.12.4",
4847
"reselect": "^4.0.0",
4948
"styled-components": "^6.1.8"
@@ -76,31 +75,29 @@
7675
]
7776
},
7877
"devDependencies": {
79-
"@ladle/react": "^4.1.2",
78+
"@ladle/react": "^5.0.1",
8079
"@testing-library/jest-dom": "^6.6.3",
8180
"@testing-library/react": "^16.2.0",
8281
"@testing-library/user-event": "^14.6.1",
8382
"@testing-library/dom": "^10.4.0",
84-
"@types/react-router-dom": "^5.3.0",
85-
"@vitejs/plugin-react-swc": "^3.6.0",
86-
"@vitest/coverage-v8": "^1.4.0",
87-
"eslint": "^9.1.1",
88-
"eslint-plugin-react": "^7.34.1",
89-
"eslint-plugin-react-hooks": "^4.6.0",
83+
"@types/react-router-dom": "^5.3.3",
84+
"@vitejs/plugin-react-swc": "^3.8.0",
85+
"@vitest/coverage-v8": "^3.0.8",
86+
"eslint": "^9.22.0",
87+
"eslint-plugin-react": "^7.37.4",
88+
"eslint-plugin-react-hooks": "^5.2.0",
9089
"eslint-plugin-vitest": "^0.5.4",
91-
"globals": "^15.0.0",
92-
"happy-dom": "^15.10.2",
93-
"jest-fetch-mock": "^3.0.3",
94-
"jsdom": "^24.0.0",
95-
"msw": "^2.6.4",
96-
"prettier": "3.2.5",
90+
"globals": "^16.0.0",
91+
"jsdom": "^26.0.0",
92+
"msw": "^2.7.3",
93+
"prettier": "3.5.3",
9794
"prop-types": "^15.8.1",
9895
"react-test-renderer": "^18.3.1",
99-
"typescript": "^5.4.5",
100-
"typescript-eslint": "^7.7.1",
101-
"vite": "^5.4.12",
102-
"vite-tsconfig-paths": "^4.3.2",
103-
"vitest": "^1.6.1",
104-
"vitest-fetch-mock": "^0.2.2"
96+
"typescript": "^5.8.2",
97+
"typescript-eslint": "^8.26.1",
98+
"vite": "^6.2.1",
99+
"vite-tsconfig-paths": "^5.1.4",
100+
"vitest": "^3.0.8",
101+
"vitest-fetch-mock": "^0.4.5"
105102
}
106103
}

web-ui/src/components/member-directory/__snapshots__/MemberModal.test.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`renders correctly 1`] = `
1111
>
1212
<a
1313
href="/profile/2o34i2j34"
14-
style="text-decoration: none;"
14+
style="color: var(--checkins-palette-content-color); text-decoration: none;"
1515
>
1616
<div
1717
class="MuiCardHeader-root MemberSummaryCard-header css-149tc0y-MuiCardHeader-root"

web-ui/src/components/member-directory/__snapshots__/MemberSummaryCard.test.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`renders correctly 1`] = `
1111
>
1212
<a
1313
href="/profile/2o34i2j34"
14-
style="text-decoration: none;"
14+
style="color: var(--checkins-palette-content-color); text-decoration: none;"
1515
>
1616
<div
1717
class="MuiCardHeader-root MemberSummaryCard-header css-149tc0y-MuiCardHeader-root"

web-ui/src/components/reviews/TeamMemberReview.jsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useContext, useState, useCallback } from 'react';
22
import { styled, useTheme } from '@mui/material/styles';
3-
import SwipeableViews from 'react-swipeable-views';
43
import PropTypes from 'prop-types';
54
import { AppContext } from '../../context/AppContext';
65
import { selectCsrfToken, selectCurrentUser, selectProfile } from '../../context/selectors';
@@ -9,12 +8,6 @@ import HourglassEmptyIcon from '@mui/icons-material/HourglassEmpty';
98
import {
109
AppBar,
1110
Box,
12-
Button,
13-
Card,
14-
CardActions,
15-
CardContent,
16-
CardHeader,
17-
Modal,
1811
Tab,
1912
Tabs,
2013
Typography
@@ -103,10 +96,6 @@ const TeamMemberReview = ({
10396
setValue(newValue);
10497
};
10598

106-
const handleChangeIndex = index => {
107-
setValue(index);
108-
};
109-
11099
let selfReviewIcon = <HourglassEmptyIcon />;
111100
if (selfReview && selfReview.status?.toUpperCase() === 'SUBMITTED') {
112101
selfReviewIcon = <CheckCircleIcon />;
@@ -157,11 +146,6 @@ const TeamMemberReview = ({
157146
})}
158147
</Tabs>
159148
</AppBar>
160-
<SwipeableViews
161-
axis={theme.direction === 'rtl' ? 'x-reverse' : 'x'}
162-
index={value}
163-
onChangeIndex={handleChangeIndex}
164-
>
165149
<TabPanel key={0} value={value} index={0} dir={theme.direction}>
166150
{selfReview?.id ? (
167151
<FeedbackSubmitForm
@@ -196,7 +180,6 @@ const TeamMemberReview = ({
196180
</TabPanel>
197181
);
198182
})}
199-
</SwipeableViews>
200183
</Box>
201184
</Root>
202185
);

web-ui/src/pages/__snapshots__/FeedbackSubmitPage.test.jsx.snap

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -94,47 +94,39 @@ exports[`renders correctly - submitted 1`] = `
9494
</div>
9595
</header>
9696
<div
97-
style="overflow-x: hidden;"
97+
aria-labelledby="full-width-tab-0"
98+
dir="ltr"
99+
hidden=""
100+
id="full-width-tabpanel-0"
101+
role="tabpanel"
102+
/>
103+
<div
104+
aria-labelledby="full-width-tab-1"
105+
dir="ltr"
106+
id="full-width-tabpanel-1"
107+
role="tabpanel"
98108
>
99109
<div
100-
class="react-swipeable-view-container"
101-
style="flex-direction: row; transition: all 0s ease 0s; direction: ltr; display: flex; will-change: transform;"
110+
class="MuiBox-root css-19kzrtu"
102111
>
103-
<div
104-
aria-hidden="false"
105-
data-swipeable="true"
106-
style="width: 100%; flex-shrink: 0; overflow: auto;"
112+
<p
113+
class="MuiTypography-root MuiTypography-body1 css-rizt0-MuiTypography-root"
107114
>
108115
<div
109-
aria-labelledby="full-width-tab-1"
110-
dir="ltr"
111-
id="full-width-tabpanel-1"
112-
role="tabpanel"
116+
class="submit-form css-1799q8o"
113117
>
114-
<div
115-
class="MuiBox-root css-19kzrtu"
118+
<span
119+
class="MuiTypography-root MuiTypography-h3 FeedbackSubmitForm-announcement css-13msox4-MuiTypography-root"
116120
>
117-
<p
118-
class="MuiTypography-root MuiTypography-body1 css-rizt0-MuiTypography-root"
119-
>
120-
<div
121-
class="submit-form css-1799q8o"
122-
>
123-
<span
124-
class="MuiTypography-root MuiTypography-h3 FeedbackSubmitForm-announcement css-13msox4-MuiTypography-root"
125-
>
126-
Reviewing
127-
Feedback on
128-
129-
<b>
130-
James Johnson
131-
</b>
132-
</span>
133-
</div>
134-
</p>
135-
</div>
121+
Reviewing
122+
Feedback on
123+
124+
<b>
125+
James Johnson
126+
</b>
127+
</span>
136128
</div>
137-
</div>
129+
</p>
138130
</div>
139131
</div>
140132
</div>

0 commit comments

Comments
 (0)