Skip to content

Commit a196d44

Browse files
awiboxRailven
andcommitted
#532: Tests updated
Co-authored-by: Railven <[email protected]>
1 parent 09c7019 commit a196d44

File tree

9 files changed

+460
-396
lines changed

9 files changed

+460
-396
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-app-template",
3-
"version": "1.0.0",
3+
"version": "1.2.0",
44
"description": "The template that will help you quickly start developing your project using React.",
55
"repository": {
66
"type": "git",

src/components/AuthorInfo/AuthorInfo.test.js.snap

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`AuthorInfo should render correctly 1`] = `
4-
<Card
4+
<ForwardRef(Card)
55
className="authorInfo"
6-
indent={15}
7-
padding={15}
8-
theme="light"
96
>
107
<div
118
className="logo"
@@ -33,17 +30,17 @@ exports[`AuthorInfo should render correctly 1`] = `
3330
<div
3431
className="button"
3532
>
36-
<Button
37-
icon={
33+
<ForwardRef(Button)
34+
onClick={[Function]}
35+
startIcon={
3836
<i
3937
className="fa fa-github"
4038
/>
4139
}
42-
indent={0}
43-
onClick={[Function]}
40+
variant="contained"
4441
>
4542
Github page
46-
</Button>
43+
</ForwardRef(Button)>
4744
</div>
48-
</Card>
45+
</ForwardRef(Card)>
4946
`;

src/components/HomeInfo/HomeInfo.test.js.snap

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ exports[`HomeInfo should render correctly 1`] = `
44
<div
55
className="homeInfo"
66
>
7-
<Card
8-
indent={15}
9-
padding={15}
10-
theme="light"
11-
>
7+
<ForwardRef(Card)>
128
<div
139
className="homeLogo"
1410
>
@@ -32,19 +28,19 @@ exports[`HomeInfo should render correctly 1`] = `
3228
<div
3329
className="button"
3430
>
35-
<Button
36-
icon={
31+
<ForwardRef(Button)
32+
onClick={[Function]}
33+
startIcon={
3734
<i
3835
className="fa fa-github"
3936
/>
4037
}
41-
indent={0}
42-
onClick={[Function]}
38+
variant="contained"
4339
>
4440
Download with Github
45-
</Button>
41+
</ForwardRef(Button)>
4642
</div>
4743
</div>
48-
</Card>
44+
</ForwardRef(Card)>
4945
</div>
5046
`;

src/components/ReposCard/ReposCard.test.js.snap

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ exports[`ReposCard should render correctly 1`] = `
44
<div
55
className="repo"
66
>
7-
<Card
8-
indent={15}
9-
padding={15}
10-
theme="light"
7+
<ForwardRef(Card)
8+
style={
9+
Object {
10+
"marginBottom": 15,
11+
"padding": 15,
12+
}
13+
}
1114
>
1215
<a
1316
className="name"
@@ -63,6 +66,6 @@ exports[`ReposCard should render correctly 1`] = `
6366
10
6467
</div>
6568
</div>
66-
</Card>
69+
</ForwardRef(Card)>
6770
</div>
6871
`;

src/pages/Author/Author.test.js.snap

Lines changed: 116 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,131 @@
22

33
exports[`Author should render coorectly 1`] = `
44
<div>
5-
<div
6-
className="css-ciu1tw"
7-
style={
8-
Object {
9-
"display": "block",
10-
}
11-
}
12-
>
13-
Fake error
14-
</div>
15-
<div
16-
className="authorInfo css-wk4os9"
17-
>
18-
<div
19-
className="css-1v1qs4"
20-
>
5+
Array [
6+
"",
7+
Array [
8+
"",
219
<div
22-
className="logo"
10+
className="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardError MuiAlert-standard css-xilmwd-MuiPaper-root-MuiAlert-root"
11+
role="alert"
2312
style={
2413
Object {
25-
"backgroundImage": "url(http://localhost:8888/avatar)",
14+
"marginBottom": 15,
2615
}
2716
}
28-
/>
29-
<div
30-
className="title"
31-
>
32-
John
33-
</div>
34-
<div
35-
className="titleVersion"
36-
>
37-
USA
38-
</div>
39-
<div
40-
className="infoText"
4117
>
42-
Addition information
43-
</div>
18+
Array [
19+
"",
20+
<div
21+
className="MuiAlert-icon css-1ytlwq5-MuiAlert-icon"
22+
>
23+
Array [
24+
"",
25+
<svg
26+
aria-hidden={true}
27+
className="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1vooibu-MuiSvgIcon-root"
28+
data-testid="ErrorOutlineIcon"
29+
focusable="false"
30+
viewBox="0 0 24 24"
31+
>
32+
<path
33+
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
34+
/>
35+
</svg>,
36+
]
37+
</div>,
38+
]
39+
Array [
40+
"",
41+
<div
42+
className="MuiAlert-message css-1pxa9xg-MuiAlert-message"
43+
>
44+
Fake error
45+
</div>,
46+
]
47+
</div>,
48+
],
49+
]
50+
Array [
51+
"",
52+
Array [
53+
"",
4454
<div
45-
className="button"
55+
className="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 MuiCard-root authorInfo css-bhp9pd-MuiPaper-root-MuiCard-root"
4656
>
47-
<button
48-
className="css-1ixngjg"
49-
onClick={[Function]}
57+
<div
58+
className="logo"
59+
style={
60+
Object {
61+
"backgroundImage": "url(http://localhost:8888/avatar)",
62+
}
63+
}
64+
/>
65+
<div
66+
className="title"
5067
>
51-
<span
52-
className="css-1dl6nox"
53-
>
54-
<i
55-
className="fa fa-github"
56-
/>
57-
</span>
58-
Github page
59-
</button>
60-
</div>
61-
</div>
62-
</div>
68+
John
69+
</div>
70+
<div
71+
className="titleVersion"
72+
>
73+
USA
74+
</div>
75+
<div
76+
className="infoText"
77+
>
78+
Addition information
79+
</div>
80+
<div
81+
className="button"
82+
>
83+
Array [
84+
"",
85+
Array [
86+
"",
87+
<button
88+
className="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-sghohy-MuiButtonBase-root-MuiButton-root"
89+
disabled={false}
90+
onBlur={[Function]}
91+
onClick={[Function]}
92+
onContextMenu={[Function]}
93+
onDragLeave={[Function]}
94+
onFocus={[Function]}
95+
onKeyDown={[Function]}
96+
onKeyUp={[Function]}
97+
onMouseDown={[Function]}
98+
onMouseLeave={[Function]}
99+
onMouseUp={[Function]}
100+
onTouchEnd={[Function]}
101+
onTouchMove={[Function]}
102+
onTouchStart={[Function]}
103+
tabIndex={0}
104+
type="button"
105+
>
106+
Array [
107+
"",
108+
<span
109+
className="MuiButton-startIcon MuiButton-iconSizeMedium css-1d6wzja-MuiButton-startIcon"
110+
>
111+
<i
112+
className="fa fa-github"
113+
/>
114+
</span>,
115+
]
116+
Github page
117+
Array [
118+
"",
119+
<span
120+
className="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
121+
/>,
122+
]
123+
</button>,
124+
],
125+
]
126+
</div>
127+
</div>,
128+
],
129+
]
63130
<div
64131
style={
65132
Object {

0 commit comments

Comments
 (0)