Skip to content

Commit b5d2f3e

Browse files
committed
update real-project
1 parent c7ec1c9 commit b5d2f3e

File tree

13 files changed

+846
-1617
lines changed

13 files changed

+846
-1617
lines changed

05-testing/01-react/05-real-project/00-boilerplate/package-lock.json

Lines changed: 804 additions & 1575 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

05-testing/01-react/05-real-project/00-boilerplate/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,34 @@
2626
"@lemoncode/fonk-formik": "^4.0.1",
2727
"@lemoncode/fonk-match-field-validator": "^1.0.1",
2828
"@lemoncode/fonk-required-by-field-validator": "^1.0.1",
29-
"@mui/icons-material": "^6.2.0",
30-
"@mui/material": "^6.2.0",
31-
"@tanstack/react-table": "^8.20.6",
32-
"axios": "^1.7.9",
29+
"@mui/icons-material": "^7.1.0",
30+
"@mui/material": "^7.1.0",
31+
"@tanstack/react-table": "^8.21.3",
32+
"axios": "^1.9.0",
3333
"formik": "^2.4.6",
3434
"graphql-request": "^7.1.2",
3535
"immer": "^10.1.1",
3636
"lodash.flowright": "^3.5.0",
3737
"lodash.get": "^4.4.2",
3838
"lodash.merge": "^4.6.2",
39-
"react": "^19.0.0",
40-
"react-dom": "^19.0.0",
39+
"react": "^19.1.0",
40+
"react-dom": "^19.1.0",
4141
"react-promise-tracker": "^2.1.1",
42-
"react-router-dom": "^7.0.2",
43-
"react-spinners": "^0.15.0"
42+
"react-router-dom": "^7.5.3",
43+
"react-spinners": "^0.17.0"
4444
},
4545
"devDependencies": {
4646
"@testing-library/dom": "^10.4.0",
4747
"@testing-library/jest-dom": "^6.6.3",
48-
"@testing-library/react": "^16.1.0",
49-
"@types/react": "^19.0.1",
50-
"@types/react-dom": "^19.0.2",
51-
"@vitejs/plugin-react": "^4.3.4",
52-
"jsdom": "^25.0.1",
48+
"@testing-library/react": "^16.3.0",
49+
"@types/react": "^19.1.3",
50+
"@types/react-dom": "^19.1.3",
51+
"@vitejs/plugin-react": "^4.4.1",
52+
"jsdom": "^26.1.0",
5353
"npm-run-all": "^4.1.5",
5454
"rimraf": "^6.0.1",
55-
"typescript": "^5.7.2",
56-
"vite": "^6.0.3",
57-
"vitest": "^2.1.8"
55+
"typescript": "^5.8.3",
56+
"vite": "^6.3.5",
57+
"vitest": "^3.1.3"
5858
}
5959
}

05-testing/01-react/05-real-project/00-boilerplate/src/common-app/app-bar/app-bar.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
Toolbar,
99
Typography,
1010
} from '@mui/material';
11-
import { AccountCircle, Menu as MenuIcon } from '@mui/icons-material';
11+
import AccountCircle from '@mui/icons-material/AccountCircle';
12+
import MenuIcon from '@mui/icons-material/Menu';
1213
import { literals } from '#core/i18n';
1314
import { AuthContext, useLogout } from '#common-app/auth';
1415
import { SideMenuComponent } from './components';

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/dashboard/components/item.component.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { PeopleAlt as PeopleAltIcon } from '@mui/icons-material';
2+
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
33
import { fireEvent } from '@testing-library/react';
44
import { renderWithRouter } from '#common/test';
55
import { Route } from 'react-router-dom';

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/dashboard/dashboard.component.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { PeopleAlt as PeopleAltIcon } from '@mui/icons-material';
2+
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
33
import { Route } from 'react-router-dom';
44
import { renderWithRouter } from '#common/test';
55
import { DashboardComponent } from './dashboard.component';

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/search-bar/search-bar.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { TextField } from '@mui/material';
3-
import { Search as SearchIcon } from '@mui/icons-material';
3+
import SearchIcon from '@mui/icons-material/Search';
44

55
interface LabelProps {
66
placeholder: string;

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/snackbar/snackbar.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
SnackbarContent,
66
IconButton,
77
} from '@mui/material';
8-
import { Close as CloseIcon } from '@mui/icons-material';
8+
import CloseIcon from '@mui/icons-material/Close';
99
import { SnackbarContext } from './snackbar.context';
1010
import * as classes from './snackbar.styles';
1111

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/table/components/body.component.spec.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,30 @@ import { render } from '@testing-library/react';
44
import { BodyComponent } from './body.component';
55
import { RowComponent } from './row.component';
66
import { CellComponent } from './cell.component';
7-
import { RowRendererProps } from '../table.vm';
7+
8+
interface TestRow {
9+
testRow: number;
10+
}
811

912
describe('common/table/BodyComponent', () => {
1013
it('should render as expected', () => {
1114
// Arrange
12-
const TestRowComponent: React.FunctionComponent<RowRendererProps<any>> = (
13-
props
14-
) => (
15-
<RowComponent>
16-
<CellComponent>{props.row.testRow}</CellComponent>
17-
</RowComponent>
18-
);
19-
2015
const props = {
2116
rows: [
2217
{ original: { testRow: 1 } },
2318
{ original: { testRow: 2 } },
2419
{ original: { testRow: 3 } },
25-
] as unknown as Row<any>[],
26-
rowRenderer: TestRowComponent,
20+
] as unknown as Row<TestRow>[],
21+
rowRenderer: (props) => (
22+
<RowComponent>
23+
<CellComponent>{props.row.testRow}</CellComponent>
24+
</RowComponent>
25+
),
2726
prepareRow: vi.fn(),
2827
};
2928

3029
// Act
31-
const { getByText } = render(<BodyComponent {...props} />);
30+
const { getByText } = render(<BodyComponent<TestRow> {...props} />);
3231

3332
// Assert
3433
expect(getByText('1')).toBeInTheDocument();

05-testing/01-react/05-real-project/00-boilerplate/src/common/components/table/components/body.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { Row } from '@tanstack/react-table';
33
import { TableBody } from '@mui/material';
44
import { RowRendererProps } from '../table.vm';
55

6-
interface Props<T extends object = {}> {
6+
interface Props<T> {
77
rows: Row<T>[];
88
rowRenderer: (props: RowRendererProps<T>) => React.ReactNode;
99
}
1010

11-
export const BodyComponent: React.FunctionComponent<Props> = (props) => {
11+
export const BodyComponent = <T,>(props: Props<T>) => {
1212
const { rows, rowRenderer } = props;
1313
return (
1414
<TableBody>

05-testing/01-react/05-real-project/00-boilerplate/src/pods/employee-list/components/employee-row.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Checkbox, IconButton } from '@mui/material';
3-
import { Edit as EditIcon, Delete as DeleteIcon } from '@mui/icons-material';
3+
import EditIcon from '@mui/icons-material/Edit';
4+
import DeleteIcon from '@mui/icons-material/Delete';
45
import {
56
RowRendererProps,
67
RowComponent,

05-testing/01-react/05-real-project/00-boilerplate/src/pods/login/components/container.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Container, Avatar, Typography } from '@mui/material';
3-
import { LockOutlined as LockOutlinedIcon } from '@mui/icons-material';
3+
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
44
import * as classes from './container.styles';
55

66
interface Props {

05-testing/01-react/05-real-project/00-boilerplate/src/pods/project-list/components/project-row.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Checkbox, IconButton } from '@mui/material';
3-
import { Edit as EditIcon, Delete as DeleteIcon } from '@mui/icons-material';
3+
import EditIcon from '@mui/icons-material/Edit';
4+
import DeleteIcon from '@mui/icons-material/Delete';
45
import {
56
RowRendererProps,
67
RowComponent,

05-testing/01-react/05-real-project/00-boilerplate/src/pods/submodule-list/submodule-list.container.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
2-
import {
3-
AccountBalance as AccountBalanceIcon,
4-
Group as GroupIcon,
5-
} from '@mui/icons-material';
2+
import AccountBalanceIcon from '@mui/icons-material/AccountBalance';
3+
import GroupIcon from '@mui/icons-material/Group';
64
import { SumoduleListComponent } from './submodule-list.component';
75
import { DashboardItemProps } from '#common/components';
86
import { routes } from '#core/router';

0 commit comments

Comments
 (0)