Skip to content

Commit a5522fa

Browse files
test: update related tests
1 parent 3542c38 commit a5522fa

File tree

4 files changed

+33
-22
lines changed

4 files changed

+33
-22
lines changed

src/containers/CoursesPanel/NoCoursesView/__snapshots__/index.test.jsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ exports[`NoCoursesView snapshot 1`] = `
99
alt="No Courses view banner"
1010
src="icon/mock/path"
1111
/>
12-
<h1>
12+
<h3
13+
className="h1"
14+
>
1315
Looking for a new challenge?
14-
</h1>
16+
</h3>
1517
<p>
1618
Explore our courses to add them to your dashboard.
1719
</p>

src/containers/Dashboard/DashboardLayout.test.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ describe('DashboardLayout', () => {
8484

8585
describe('not collapsed', () => {
8686
const testWidgetSpacing = () => {
87-
it('shows a blank (nbsp) h2 spacer component above widget sidebar', () => {
87+
it('shows not-collapsed class on widget sidebar', () => {
8888
const columns = el.instance.findByType(Col);
89-
// nonbreaking space equivalent
90-
expect(columns[1].findByType('h2')[0].children[0].el).toEqual('\xA0');
89+
expect(columns[1].props.className).toContain('not-collapsed');
9190
});
9291
};
9392
describe('sidebar showing', () => {

src/containers/Dashboard/__snapshots__/DashboardLayout.test.jsx.snap

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ exports[`DashboardLayout collapsed sidebar not showing snapshot 1`] = `
2424
test-children
2525
</Col>
2626
<Col
27-
className="sidebar-column"
27+
className={
28+
[
29+
"sidebar-column",
30+
false,
31+
]
32+
}
2833
lg={
2934
{
3035
"offset": 0,
@@ -68,7 +73,12 @@ exports[`DashboardLayout collapsed sidebar showing snapshot 1`] = `
6873
test-children
6974
</Col>
7075
<Col
71-
className="sidebar-column"
76+
className={
77+
[
78+
"sidebar-column",
79+
false,
80+
]
81+
}
7282
lg={
7383
{
7484
"offset": 0,
@@ -112,7 +122,12 @@ exports[`DashboardLayout not collapsed sidebar not showing snapshot 1`] = `
112122
test-children
113123
</Col>
114124
<Col
115-
className="sidebar-column"
125+
className={
126+
[
127+
"sidebar-column",
128+
"not-collapsed",
129+
]
130+
}
116131
lg={
117132
{
118133
"offset": 0,
@@ -126,11 +141,6 @@ exports[`DashboardLayout not collapsed sidebar not showing snapshot 1`] = `
126141
}
127142
}
128143
>
129-
<h2
130-
className="course-list-title"
131-
>
132-
 
133-
</h2>
134144
<WidgetSidebarSlot />
135145
</Col>
136146
</Row>
@@ -161,7 +171,12 @@ exports[`DashboardLayout not collapsed sidebar showing snapshot 1`] = `
161171
test-children
162172
</Col>
163173
<Col
164-
className="sidebar-column"
174+
className={
175+
[
176+
"sidebar-column",
177+
"not-collapsed",
178+
]
179+
}
165180
lg={
166181
{
167182
"offset": 0,
@@ -175,11 +190,6 @@ exports[`DashboardLayout not collapsed sidebar showing snapshot 1`] = `
175190
}
176191
}
177192
>
178-
<h2
179-
className="course-list-title"
180-
>
181-
 
182-
</h2>
183193
<WidgetSidebarSlot />
184194
</Col>
185195
</Row>

src/containers/LearnerDashboardHeader/ConfirmEmailBanner/__snapshots__/index.test.jsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ exports[`ConfirmEmailBanner snapshot Show on unverified 1`] = `
5555
onClose={[MockFunction closeConfirmModal]}
5656
title=""
5757
>
58-
<h1
59-
className="text-center p-3"
58+
<h4
59+
className="text-center p-3 h1"
6060
>
6161
Confirm your email
62-
</h1>
62+
</h4>
6363
<p
6464
className="text-center"
6565
>

0 commit comments

Comments
 (0)