Skip to content

Commit 8fa49ac

Browse files
committed
Updated the test for TeamMemberMap.
1 parent e97ae97 commit 8fa49ac

File tree

2 files changed

+40
-116
lines changed

2 files changed

+40
-116
lines changed

web-ui/src/components/reports-section/checkin-report/TeamMemberMap.test.jsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@ adminState.state.userProfile = { ...adminState.state.userProfile };
3939
adminState.state.userProfile.role = ['MEMBER', 'ADMIN'];
4040

4141
describe('TeamMemberMap', () => {
42-
it('should render the component without team members', () => {
43-
const withoutTeamMembers = {
44-
members: [],
45-
id: '2c1b77e2-e2fc-46d1-92f2-beabbd28ee3d',
46-
closed: true,
47-
planned: true,
48-
reportDate: new Date()
49-
};
50-
render(
51-
<AppContextProvider value={initialState}>
52-
<TeamMemberMap {...withoutTeamMembers} />
53-
</AppContextProvider>
54-
);
55-
const message = screen.getByText(
56-
'No team members associated with this PDL.'
57-
);
58-
expect(message).toBeInTheDocument();
59-
});
60-
6142
it('should render the component with team members', () => {
6243
const withTeamMembers = {
6344
members,

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

Lines changed: 40 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -13,95 +13,6 @@ exports[`renders correctly 1`] = `
1313
<div
1414
class="checkins-report-page"
1515
>
16-
<div
17-
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 MuiCard-root member-selector-card css-bhp9pd-MuiPaper-root-MuiCard-root"
18-
>
19-
<div
20-
class="MuiCardHeader-root css-185gdzj-MuiCardHeader-root"
21-
>
22-
<div
23-
class="MuiCardHeader-content css-1qbkelo-MuiCardHeader-content"
24-
>
25-
<span
26-
class="MuiTypography-root MuiTypography-h5 MuiCardHeader-title css-1qvr50w-MuiTypography-root"
27-
>
28-
<div
29-
class="member-selector-card-title-container"
30-
>
31-
<h5
32-
class="MuiTypography-root MuiTypography-h5 MuiTypography-noWrap member-selector-card-title css-1961ak2-MuiTypography-root"
33-
>
34-
Select PDLs
35-
</h5>
36-
<h6
37-
class="MuiTypography-root MuiTypography-h6 member-selector-card-count css-r8391j-MuiTypography-root"
38-
>
39-
(
40-
0
41-
)
42-
</h6>
43-
</div>
44-
</span>
45-
</div>
46-
<div
47-
class="MuiCardHeader-action css-sgoict-MuiCardHeader-action"
48-
>
49-
<div
50-
class="MuiBox-root css-1ay9vb9"
51-
>
52-
<span
53-
aria-label="Change PDL"
54-
class=""
55-
data-mui-internal-clone-element="true"
56-
>
57-
<button
58-
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-78trlr-MuiButtonBase-root-MuiIconButton-root"
59-
style="margin: 4px 8px 0px 0px;"
60-
tabindex="0"
61-
type="button"
62-
>
63-
<svg
64-
aria-hidden="true"
65-
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
66-
data-testid="AddIcon"
67-
focusable="false"
68-
viewBox="0 0 24 24"
69-
>
70-
<path
71-
d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
72-
/>
73-
</svg>
74-
<span
75-
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
76-
/>
77-
</button>
78-
</span>
79-
<button
80-
aria-label="Download"
81-
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-1yq5fb3-MuiButtonBase-root-MuiIconButton-root"
82-
data-mui-internal-clone-element="true"
83-
tabindex="0"
84-
type="button"
85-
>
86-
<svg
87-
aria-hidden="true"
88-
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
89-
data-testid="FileDownloadIcon"
90-
focusable="false"
91-
viewBox="0 0 24 24"
92-
>
93-
<path
94-
d="M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"
95-
/>
96-
</svg>
97-
<span
98-
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
99-
/>
100-
</button>
101-
</div>
102-
</div>
103-
</div>
104-
</div>
10516
<div
10617
class="MuiBox-root css-1l4w6pd"
10718
>
@@ -201,16 +112,48 @@ exports[`renders correctly 1`] = `
201112
class="checkins-report-page-reports"
202113
>
203114
<div
204-
class="checkins-report-page-no-data"
115+
class="team-member-map MuiBox-root css-0"
205116
>
206-
<h2>
207-
No PDLs selected
208-
</h2>
209-
<p
210-
class="MuiTypography-root MuiTypography-body1 css-ahj2mt-MuiTypography-root"
117+
<div
118+
class="MuiBox-root css-k008qs"
211119
>
212-
Please select some PDLs using the Member Selector.
213-
</p>
120+
<div
121+
class="MuiBox-root css-kzfr2u"
122+
>
123+
<h5
124+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
125+
>
126+
Member
127+
</h5>
128+
</div>
129+
<div
130+
class="MuiBox-root css-1rr4qq7"
131+
>
132+
<h5
133+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
134+
>
135+
PDL
136+
</h5>
137+
</div>
138+
<div
139+
class="MuiBox-root css-1rr4qq7"
140+
>
141+
<h5
142+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
143+
>
144+
Check-In Date
145+
</h5>
146+
</div>
147+
<div
148+
class="MuiBox-root css-1rr4qq7"
149+
>
150+
<h5
151+
class="MuiTypography-root MuiTypography-h5 css-ag7rrr-MuiTypography-root"
152+
>
153+
Status
154+
</h5>
155+
</div>
156+
</div>
214157
</div>
215158
</div>
216159
</div>

0 commit comments

Comments
 (0)