@openedx/frontend-app-learner-dashboard 1.0.0-alpha.3 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -5
- package/src/app.scss +2 -5
- package/src/components/Banner.test.jsx +21 -21
- package/src/containers/CourseCard/CourseCard.scss +4 -6
- package/src/containers/CourseCard/components/CourseCardActions/ActionButton/hooks.test.js +27 -0
- package/src/containers/CourseCard/components/CourseCardActions/ActionButton/index.test.jsx +17 -14
- package/src/containers/CourseCard/components/CourseCardActions/BeginCourseButton.test.jsx +37 -34
- package/src/containers/CourseCard/components/CourseCardActions/ResumeButton.test.jsx +28 -28
- package/src/containers/CourseCard/components/CourseCardActions/SelectSessionButton.test.jsx +26 -17
- package/src/containers/CourseCard/components/CourseCardActions/ViewCourseButton.test.jsx +29 -19
- package/src/containers/CourseCard/components/CourseCardActions/index.test.jsx +32 -34
- package/src/containers/CourseCard/components/CourseCardBanners/CertificateBanner.test.jsx +205 -190
- package/src/containers/CourseCard/components/CourseCardBanners/CourseBanner.test.jsx +35 -62
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/hooks.test.js +3 -3
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/index.test.jsx +49 -79
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/ApprovedContent.jsx +1 -2
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/ApprovedContent.test.jsx +51 -34
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/EligibleContent.test.jsx +36 -44
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/MustRequestContent.jsx +1 -2
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/MustRequestContent.test.jsx +74 -44
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/PendingContent.jsx +1 -2
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/PendingContent.test.jsx +40 -34
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/RejectedContent.test.jsx +16 -26
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/CreditContent.test.jsx +38 -28
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/CreditRequestForm/hooks.test.js +6 -0
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/CreditRequestForm/index.test.jsx +25 -24
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/CreditRequestForm/ref.test.jsx +0 -3
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/ProviderLink.test.jsx +15 -13
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/hooks.test.js +3 -3
- package/src/containers/CourseCard/components/CourseCardBanners/EntitlementBanner.test.jsx +33 -24
- package/src/containers/CourseCard/components/CourseCardBanners/RelatedProgramsBanner/ProgramsList.test.jsx +13 -5
- package/src/containers/CourseCard/components/CourseCardBanners/RelatedProgramsBanner/index.test.jsx +34 -27
- package/src/containers/CourseCard/components/CourseCardBanners/index.test.jsx +44 -15
- package/src/containers/CourseCard/components/CourseCardDetails/hooks.test.js +19 -9
- package/src/containers/CourseCard/components/CourseCardDetails/index.scss +1 -5
- package/src/containers/CourseCard/components/CourseCardDetails/index.test.jsx +20 -8
- package/src/containers/CourseCard/components/CourseCardImage.test.jsx +48 -41
- package/src/containers/CourseCard/components/CourseCardMenu/SocialShareMenu.jsx +3 -4
- package/src/containers/CourseCard/components/CourseCardMenu/SocialShareMenu.test.jsx +62 -92
- package/src/containers/CourseCard/components/CourseCardMenu/hooks.js +8 -7
- package/src/containers/CourseCard/components/CourseCardMenu/hooks.test.js +8 -15
- package/src/containers/CourseCard/components/CourseCardMenu/index.jsx +2 -3
- package/src/containers/CourseCard/components/CourseCardMenu/index.test.jsx +78 -112
- package/src/containers/CourseCard/components/CourseCardTitle.test.jsx +51 -45
- package/src/containers/CourseCard/components/RelatedProgramsBadge/hooks.jsx +2 -2
- package/src/containers/CourseCard/components/RelatedProgramsBadge/hooks.test.js +18 -4
- package/src/containers/CourseCard/components/RelatedProgramsBadge/index.jsx +1 -1
- package/src/containers/CourseCard/components/RelatedProgramsBadge/index.test.jsx +17 -13
- package/src/containers/CourseCard/components/hooks.test.js +19 -8
- package/src/containers/CourseCard/hooks.test.js +12 -2
- package/src/containers/CourseCard/index.test.jsx +33 -12
- package/src/containers/CourseFilterControls/ActiveCourseFilters.test.jsx +19 -8
- package/src/containers/CourseFilterControls/CourseFilterControls.test.jsx +51 -36
- package/src/containers/CourseFilterControls/components/Checkbox.test.jsx +8 -5
- package/src/containers/CourseFilterControls/components/FilterForm.test.jsx +45 -20
- package/src/containers/CourseFilterControls/components/SortForm.test.jsx +19 -9
- package/src/containers/CourseFilterControls/hooks.test.js +25 -13
- package/src/containers/CoursesPanel/CourseList/index.test.jsx +39 -22
- package/src/containers/CoursesPanel/NoCoursesView/index.scss +5 -7
- package/src/containers/CoursesPanel/NoCoursesView/index.test.jsx +26 -6
- package/src/containers/CoursesPanel/hooks.test.js +4 -4
- package/src/containers/CoursesPanel/index.scss +5 -7
- package/src/containers/CoursesPanel/index.test.jsx +55 -21
- package/src/containers/Dashboard/DashboardLayout.test.jsx +43 -52
- package/src/containers/Dashboard/LoadingView.test.jsx +5 -10
- package/src/containers/Dashboard/hooks.test.js +21 -19
- package/src/containers/Dashboard/index.scss +8 -10
- package/src/containers/Dashboard/index.test.jsx +51 -92
- package/src/containers/EmailSettingsModal/hooks.test.js +3 -3
- package/src/containers/EmailSettingsModal/index.test.jsx +27 -10
- package/src/containers/RelatedProgramsModal/components/ProgramCard.test.jsx +31 -11
- package/src/containers/RelatedProgramsModal/index.test.jsx +27 -15
- package/src/containers/SelectSessionModal/constants.js +0 -1
- package/src/containers/SelectSessionModal/hooks.test.js +15 -5
- package/src/containers/SelectSessionModal/index.test.jsx +24 -11
- package/src/containers/UnenrollConfirmModal/components/ConfirmPane.test.jsx +24 -8
- package/src/containers/UnenrollConfirmModal/components/FinishedPane.test.jsx +39 -14
- package/src/containers/UnenrollConfirmModal/components/ReasonPane.test.jsx +23 -6
- package/src/containers/UnenrollConfirmModal/hooks/index.test.js +74 -26
- package/src/containers/UnenrollConfirmModal/hooks/reasons.test.js +4 -4
- package/src/containers/UnenrollConfirmModal/index.test.jsx +34 -17
- package/src/data/constants/app.js +0 -3
- package/src/data/constants/app.test.js +0 -12
- package/src/data/redux/app/selectors/courseCard.test.js +4 -4
- package/src/data/redux/app/selectors/currentList.test.js +5 -3
- package/src/data/redux/app/selectors/simpleSelectors.test.js +1 -1
- package/src/data/redux/requests/reducer.test.js +1 -1
- package/src/data/redux/requests/selectors.js +1 -2
- package/src/data/redux/requests/selectors.test.js +1 -29
- package/src/data/services/lms/api.test.js +6 -6
- package/src/data/services/lms/urls.test.js +1 -1
- package/src/data/services/segment/utils.test.js +1 -1
- package/src/data/store.test.js +2 -2
- package/src/hooks/api.test.js +59 -64
- package/src/hooks/utils.test.js +4 -0
- package/src/segment.js +1 -2
- package/src/setupTest.jsx +0 -206
- package/src/slots/WidgetSidebarSlot/index.test.jsx +21 -11
- package/src/test/app.test.jsx +65 -75
- package/src/test/inspector.js +0 -6
- package/src/test/messages.js +1 -1
- package/src/testUtils.js +1 -1
- package/src/tracking/trackers/course.test.js +4 -4
- package/src/tracking/trackers/credit.test.js +5 -5
- package/src/tracking/trackers/engagement.test.js +3 -3
- package/src/tracking/trackers/entitlements.test.js +3 -3
- package/src/tracking/trackers/filter.test.js +3 -3
- package/src/tracking/trackers/findCourses.test.js +3 -3
- package/src/tracking/trackers/socialShare.test.js +2 -2
- package/src/utils/StrictDict.test.js +4 -12
- package/src/widgets/LearnerDashboardHeader/ConfirmEmailBanner/messages.js +1 -1
- package/src/widgets/LearnerDashboardHeader/MasqueradeBar/index.scss +10 -12
- package/src/widgets/LearnerDashboardHeader/hooks.js +1 -1
- package/src/widgets/LookingForChallengeWidget/index.test.jsx +22 -8
- package/src/__snapshots__/App.test.jsx.snap +0 -83
- package/src/__snapshots__/index.test.jsx.snap +0 -43
- package/src/components/__snapshots__/Banner.test.jsx.snap +0 -31
- package/src/containers/CourseCard/__snapshots__/index.test.jsx.snap +0 -111
- package/src/containers/CourseCard/components/CourseCardActions/ActionButton/__snapshots__/index.test.jsx.snap +0 -14
- package/src/containers/CourseCard/components/CourseCardActions/__snapshots__/BeginCourseButton.test.jsx.snap +0 -39
- package/src/containers/CourseCard/components/CourseCardActions/__snapshots__/ResumeButton.test.jsx.snap +0 -39
- package/src/containers/CourseCard/components/CourseCardActions/__snapshots__/SelectSessionButton.test.jsx.snap +0 -19
- package/src/containers/CourseCard/components/CourseCardActions/__snapshots__/ViewCourseButton.test.jsx.snap +0 -39
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/__snapshots__/index.test.jsx.snap +0 -58
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/CreditRequestForm/__snapshots__/index.test.jsx.snap +0 -32
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/__snapshots__/CreditContent.test.jsx.snap +0 -60
- package/src/containers/CourseCard/components/CourseCardBanners/CreditBanner/views/components/__snapshots__/ProviderLink.test.jsx.snap +0 -11
- package/src/containers/CourseCard/components/CourseCardBanners/RelatedProgramsBanner/__snapshots__/ProgramsList.test.jsx.snap +0 -28
- package/src/containers/CourseCard/components/CourseCardBanners/RelatedProgramsBanner/__snapshots__/index.test.jsx.snap +0 -29
- package/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CertificateBanner.test.jsx.snap +0 -205
- package/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/CourseBanner.test.jsx.snap +0 -38
- package/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/EntitlementBanner.test.jsx.snap +0 -53
- package/src/containers/CourseCard/components/CourseCardBanners/__snapshots__/index.test.jsx.snap +0 -41
- package/src/containers/CourseCard/components/CourseCardDetails/__snapshots__/index.test.jsx.snap +0 -56
- package/src/containers/CourseCard/components/CourseCardMenu/__snapshots__/index.test.jsx.snap +0 -81
- package/src/containers/CourseCard/components/RelatedProgramsBadge/__snapshots__/index.test.jsx.snap +0 -25
- package/src/containers/CourseCard/components/__snapshots__/CourseCardImage.test.jsx.snap +0 -72
- package/src/containers/CourseCard/components/__snapshots__/CourseCardTitle.test.jsx.snap +0 -33
- package/src/containers/CourseFilterControls/__snapshots__/ActiveCourseFilters.test.jsx.snap +0 -39
- package/src/containers/CourseFilterControls/__snapshots__/CourseFilterControls.test.jsx.snap +0 -169
- package/src/containers/CourseFilterControls/components/__snapshots__/Checkbox.test.jsx.snap +0 -46
- package/src/containers/CourseFilterControls/components/__snapshots__/FilterForm.test.jsx.snap +0 -41
- package/src/containers/CourseFilterControls/components/__snapshots__/SortForm.test.jsx.snap +0 -29
- package/src/containers/CoursesPanel/CourseList/__snapshots__/index.test.jsx.snap +0 -70
- package/src/containers/CoursesPanel/NoCoursesView/__snapshots__/index.test.jsx.snap +0 -29
- package/src/containers/CoursesPanel/__snapshots__/index.test.jsx.snap +0 -55
- package/src/containers/Dashboard/__snapshots__/DashboardLayout.test.jsx.snap +0 -197
- package/src/containers/Dashboard/__snapshots__/LoadingView.test.jsx.snap +0 -13
- package/src/containers/Dashboard/__snapshots__/index.test.jsx.snap +0 -69
- package/src/containers/EmailSettingsModal/__snapshots__/index.test.jsx.snap +0 -133
- package/src/containers/RelatedProgramsModal/__snapshots__/index.test.jsx.snap +0 -169
- package/src/containers/RelatedProgramsModal/components/__snapshots__/ProgramCard.test.jsx.snap +0 -60
- package/src/containers/SelectSessionModal/__snapshots__/index.test.jsx.snap +0 -176
- package/src/containers/UnenrollConfirmModal/__snapshots__/index.test.jsx.snap +0 -101
- package/src/containers/UnenrollConfirmModal/components/__snapshots__/ConfirmPane.test.jsx.snap +0 -22
- package/src/containers/UnenrollConfirmModal/components/__snapshots__/FinishedPane.test.jsx.snap +0 -38
- package/src/containers/UnenrollConfirmModal/components/__snapshots__/ReasonPane.test.jsx.snap +0 -183
- package/src/slots/WidgetSidebarSlot/__snapshots__/index.test.jsx.snap +0 -14
- package/src/widgets/LookingForChallengeWidget/__snapshots__/index.test.jsx.snap +0 -45
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CourseCard component snapshot: collapsed 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="mb-4.5 course-card"
|
|
6
|
-
data-testid="CourseCard"
|
|
7
|
-
id="test-card-id"
|
|
8
|
-
>
|
|
9
|
-
<Card
|
|
10
|
-
orientation="vertical"
|
|
11
|
-
>
|
|
12
|
-
<div
|
|
13
|
-
className="d-flex flex-column w-100"
|
|
14
|
-
>
|
|
15
|
-
<div>
|
|
16
|
-
<CourseCardImage
|
|
17
|
-
cardId="test-card-id"
|
|
18
|
-
orientation="horizontal"
|
|
19
|
-
/>
|
|
20
|
-
<Card.Body>
|
|
21
|
-
<Card.Header
|
|
22
|
-
actions={
|
|
23
|
-
<CourseCardMenu
|
|
24
|
-
cardId="test-card-id"
|
|
25
|
-
/>
|
|
26
|
-
}
|
|
27
|
-
title={
|
|
28
|
-
<CourseCardTitle
|
|
29
|
-
cardId="test-card-id"
|
|
30
|
-
/>
|
|
31
|
-
}
|
|
32
|
-
/>
|
|
33
|
-
<Card.Section
|
|
34
|
-
className="pt-0"
|
|
35
|
-
>
|
|
36
|
-
<CourseCardDetails
|
|
37
|
-
cardId="test-card-id"
|
|
38
|
-
/>
|
|
39
|
-
</Card.Section>
|
|
40
|
-
<Card.Footer
|
|
41
|
-
orientation="vertical"
|
|
42
|
-
>
|
|
43
|
-
<CourseCardActions
|
|
44
|
-
cardId="test-card-id"
|
|
45
|
-
/>
|
|
46
|
-
</Card.Footer>
|
|
47
|
-
</Card.Body>
|
|
48
|
-
</div>
|
|
49
|
-
<CourseCardBanners
|
|
50
|
-
cardId="test-card-id"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
</Card>
|
|
54
|
-
</div>
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
exports[`CourseCard component snapshot: not collapsed 1`] = `
|
|
58
|
-
<div
|
|
59
|
-
className="mb-4.5 course-card"
|
|
60
|
-
data-testid="CourseCard"
|
|
61
|
-
id="test-card-id"
|
|
62
|
-
>
|
|
63
|
-
<Card
|
|
64
|
-
orientation="horizontal"
|
|
65
|
-
>
|
|
66
|
-
<div
|
|
67
|
-
className="d-flex flex-column w-100"
|
|
68
|
-
>
|
|
69
|
-
<div
|
|
70
|
-
className="d-flex"
|
|
71
|
-
>
|
|
72
|
-
<CourseCardImage
|
|
73
|
-
cardId="test-card-id"
|
|
74
|
-
orientation="horizontal"
|
|
75
|
-
/>
|
|
76
|
-
<Card.Body>
|
|
77
|
-
<Card.Header
|
|
78
|
-
actions={
|
|
79
|
-
<CourseCardMenu
|
|
80
|
-
cardId="test-card-id"
|
|
81
|
-
/>
|
|
82
|
-
}
|
|
83
|
-
title={
|
|
84
|
-
<CourseCardTitle
|
|
85
|
-
cardId="test-card-id"
|
|
86
|
-
/>
|
|
87
|
-
}
|
|
88
|
-
/>
|
|
89
|
-
<Card.Section
|
|
90
|
-
className="pt-0"
|
|
91
|
-
>
|
|
92
|
-
<CourseCardDetails
|
|
93
|
-
cardId="test-card-id"
|
|
94
|
-
/>
|
|
95
|
-
</Card.Section>
|
|
96
|
-
<Card.Footer
|
|
97
|
-
orientation="horizontal"
|
|
98
|
-
>
|
|
99
|
-
<CourseCardActions
|
|
100
|
-
cardId="test-card-id"
|
|
101
|
-
/>
|
|
102
|
-
</Card.Footer>
|
|
103
|
-
</Card.Body>
|
|
104
|
-
</div>
|
|
105
|
-
<CourseCardBanners
|
|
106
|
-
cardId="test-card-id"
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
</Card>
|
|
110
|
-
</div>
|
|
111
|
-
`;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`ActionButton snapshot is collapsed 1`] = `
|
|
4
|
-
<Button
|
|
5
|
-
arbitary="props"
|
|
6
|
-
size="sm"
|
|
7
|
-
/>
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
exports[`ActionButton snapshot is not collapsed 1`] = `
|
|
11
|
-
<Button
|
|
12
|
-
arbitary="props"
|
|
13
|
-
/>
|
|
14
|
-
`;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`BeginCourseButton snapshot disabled snapshot 1`] = `
|
|
4
|
-
<ActionButton
|
|
5
|
-
as="a"
|
|
6
|
-
disabled={true}
|
|
7
|
-
href="#"
|
|
8
|
-
onClick={
|
|
9
|
-
{
|
|
10
|
-
"trackCourseEvent": {
|
|
11
|
-
"cardId": "cardId",
|
|
12
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
13
|
-
"url": "home-urlexec-ed-tracking-path=cardId",
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
>
|
|
18
|
-
Begin Course
|
|
19
|
-
</ActionButton>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`BeginCourseButton snapshot enabled snapshot 1`] = `
|
|
23
|
-
<ActionButton
|
|
24
|
-
as="a"
|
|
25
|
-
disabled={false}
|
|
26
|
-
href="#"
|
|
27
|
-
onClick={
|
|
28
|
-
{
|
|
29
|
-
"trackCourseEvent": {
|
|
30
|
-
"cardId": "cardId",
|
|
31
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
32
|
-
"url": "home-urlexec-ed-tracking-path=cardId",
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
>
|
|
37
|
-
Begin Course
|
|
38
|
-
</ActionButton>
|
|
39
|
-
`;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`ResumeButton snapshot disabled snapshot 1`] = `
|
|
4
|
-
<ActionButton
|
|
5
|
-
as="a"
|
|
6
|
-
disabled={true}
|
|
7
|
-
href="#"
|
|
8
|
-
onClick={
|
|
9
|
-
{
|
|
10
|
-
"trackCourseEvent": {
|
|
11
|
-
"cardId": "cardId",
|
|
12
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
13
|
-
"url": "resume-urlexec-ed-tracking-path=cardId",
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
>
|
|
18
|
-
Resume
|
|
19
|
-
</ActionButton>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`ResumeButton snapshot enabled snapshot 1`] = `
|
|
23
|
-
<ActionButton
|
|
24
|
-
as="a"
|
|
25
|
-
disabled={false}
|
|
26
|
-
href="#"
|
|
27
|
-
onClick={
|
|
28
|
-
{
|
|
29
|
-
"trackCourseEvent": {
|
|
30
|
-
"cardId": "cardId",
|
|
31
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
32
|
-
"url": "resume-urlexec-ed-tracking-path=cardId",
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
>
|
|
37
|
-
Resume
|
|
38
|
-
</ActionButton>
|
|
39
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`SelectSessionButton default render 1`] = `
|
|
4
|
-
<ActionButton
|
|
5
|
-
disabled={false}
|
|
6
|
-
onClick={[MockFunction mockOpenSessionModal]}
|
|
7
|
-
>
|
|
8
|
-
Select Session
|
|
9
|
-
</ActionButton>
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports[`SelectSessionButton disabled states 1`] = `
|
|
13
|
-
<ActionButton
|
|
14
|
-
disabled={true}
|
|
15
|
-
onClick={[MockFunction mockOpenSessionModal]}
|
|
16
|
-
>
|
|
17
|
-
Select Session
|
|
18
|
-
</ActionButton>
|
|
19
|
-
`;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`ViewCourseButton learner can view course 1`] = `
|
|
4
|
-
<ActionButton
|
|
5
|
-
as="a"
|
|
6
|
-
disabled={false}
|
|
7
|
-
href="#"
|
|
8
|
-
onClick={
|
|
9
|
-
{
|
|
10
|
-
"trackCourseEvent": {
|
|
11
|
-
"cardId": "cardId",
|
|
12
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
13
|
-
"url": "homeUrl",
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
>
|
|
18
|
-
View Course
|
|
19
|
-
</ActionButton>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`ViewCourseButton learner cannot view course 1`] = `
|
|
23
|
-
<ActionButton
|
|
24
|
-
as="a"
|
|
25
|
-
disabled={true}
|
|
26
|
-
href="#"
|
|
27
|
-
onClick={
|
|
28
|
-
{
|
|
29
|
-
"trackCourseEvent": {
|
|
30
|
-
"cardId": "cardId",
|
|
31
|
-
"eventName": [MockFunction segment.enterCourseClicked],
|
|
32
|
-
"url": "homeUrl",
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
>
|
|
37
|
-
View Course
|
|
38
|
-
</ActionButton>
|
|
39
|
-
`;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CreditBanner component render with error state snapshot 1`] = `
|
|
4
|
-
<Banner
|
|
5
|
-
variant="danger"
|
|
6
|
-
>
|
|
7
|
-
<p
|
|
8
|
-
className="credit-error-msg"
|
|
9
|
-
data-testid="credit-error-msg"
|
|
10
|
-
>
|
|
11
|
-
<format-message-function
|
|
12
|
-
message={
|
|
13
|
-
{
|
|
14
|
-
"defaultMessage": "An error occurred with this transaction. For help, contact {supportEmailLink}.",
|
|
15
|
-
"description": "",
|
|
16
|
-
"id": "learner-dash.courseCard.banners.credit.error",
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
values={
|
|
20
|
-
{
|
|
21
|
-
"supportEmailLink": <MailtoLink
|
|
22
|
-
to="test-support-email"
|
|
23
|
-
>
|
|
24
|
-
test-support-email
|
|
25
|
-
</MailtoLink>,
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/>
|
|
29
|
-
</p>
|
|
30
|
-
<ContentComponent
|
|
31
|
-
cardId="test-card-id"
|
|
32
|
-
/>
|
|
33
|
-
</Banner>
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
exports[`CreditBanner component render with error state with no email snapshot 1`] = `
|
|
37
|
-
<Banner
|
|
38
|
-
variant="danger"
|
|
39
|
-
>
|
|
40
|
-
<p
|
|
41
|
-
className="credit-error-msg"
|
|
42
|
-
data-testid="credit-error-msg"
|
|
43
|
-
>
|
|
44
|
-
An error occurred with this transaction.
|
|
45
|
-
</p>
|
|
46
|
-
<ContentComponent
|
|
47
|
-
cardId="test-card-id"
|
|
48
|
-
/>
|
|
49
|
-
</Banner>
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
exports[`CreditBanner component render with no error state snapshot 1`] = `
|
|
53
|
-
<Banner>
|
|
54
|
-
<ContentComponent
|
|
55
|
-
cardId="test-card-id"
|
|
56
|
-
/>
|
|
57
|
-
</Banner>
|
|
58
|
-
`;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CreditRequestForm component render output valid requestData snapshot 1`] = `
|
|
4
|
-
<Form
|
|
5
|
-
accept-method="UTF-8"
|
|
6
|
-
action="test-request-data-url"
|
|
7
|
-
className="hidden"
|
|
8
|
-
method="POST"
|
|
9
|
-
>
|
|
10
|
-
<FormControl
|
|
11
|
-
as="textarea"
|
|
12
|
-
key="key1"
|
|
13
|
-
name="key1"
|
|
14
|
-
value="val1"
|
|
15
|
-
/>
|
|
16
|
-
<FormControl
|
|
17
|
-
as="textarea"
|
|
18
|
-
key="key2"
|
|
19
|
-
name="key2"
|
|
20
|
-
value="val2"
|
|
21
|
-
/>
|
|
22
|
-
<FormControl
|
|
23
|
-
as="textarea"
|
|
24
|
-
key="key3"
|
|
25
|
-
name="key3"
|
|
26
|
-
value="val3"
|
|
27
|
-
/>
|
|
28
|
-
<Button
|
|
29
|
-
type="submit"
|
|
30
|
-
/>
|
|
31
|
-
</Form>
|
|
32
|
-
`;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CreditContent component render with action snapshot 1`] = `
|
|
4
|
-
<Fragment>
|
|
5
|
-
<div
|
|
6
|
-
className="message-copy credit-msg"
|
|
7
|
-
data-testid="credit-msg"
|
|
8
|
-
>
|
|
9
|
-
test-message
|
|
10
|
-
</div>
|
|
11
|
-
<ActionRow
|
|
12
|
-
className="mt-4"
|
|
13
|
-
>
|
|
14
|
-
<Button
|
|
15
|
-
as="a"
|
|
16
|
-
className="border-gray-400"
|
|
17
|
-
data-testid="action-row-btn"
|
|
18
|
-
disabled={false}
|
|
19
|
-
href="test-action-href"
|
|
20
|
-
onClick={[MockFunction test-action-onClick]}
|
|
21
|
-
rel="noopener"
|
|
22
|
-
target="_blank"
|
|
23
|
-
variant="outline-primary"
|
|
24
|
-
>
|
|
25
|
-
test-action-message
|
|
26
|
-
</Button>
|
|
27
|
-
</ActionRow>
|
|
28
|
-
<CreditRequestForm
|
|
29
|
-
requestData={
|
|
30
|
-
{
|
|
31
|
-
"parameters": {
|
|
32
|
-
"key1": "val1",
|
|
33
|
-
},
|
|
34
|
-
"url": "test-request-data-url",
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/>
|
|
38
|
-
</Fragment>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
exports[`CreditContent component render without action snapshot 1`] = `
|
|
42
|
-
<Fragment>
|
|
43
|
-
<div
|
|
44
|
-
className="message-copy credit-msg"
|
|
45
|
-
data-testid="credit-msg"
|
|
46
|
-
>
|
|
47
|
-
test-message
|
|
48
|
-
</div>
|
|
49
|
-
<CreditRequestForm
|
|
50
|
-
requestData={
|
|
51
|
-
{
|
|
52
|
-
"parameters": {
|
|
53
|
-
"key1": "val1",
|
|
54
|
-
},
|
|
55
|
-
"url": "test-request-data-url",
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/>
|
|
59
|
-
</Fragment>
|
|
60
|
-
`;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`ProgramsList renders correctly 1`] = `
|
|
4
|
-
<ul
|
|
5
|
-
className="related-programs-list-container"
|
|
6
|
-
>
|
|
7
|
-
<li
|
|
8
|
-
className="my-2"
|
|
9
|
-
key="http://example.com"
|
|
10
|
-
>
|
|
11
|
-
<a
|
|
12
|
-
href="http://example.com"
|
|
13
|
-
>
|
|
14
|
-
Example Program 1
|
|
15
|
-
</a>
|
|
16
|
-
</li>
|
|
17
|
-
<li
|
|
18
|
-
className="my-2"
|
|
19
|
-
key="http://example.com"
|
|
20
|
-
>
|
|
21
|
-
<a
|
|
22
|
-
href="http://example.com"
|
|
23
|
-
>
|
|
24
|
-
Example Program 2
|
|
25
|
-
</a>
|
|
26
|
-
</li>
|
|
27
|
-
</ul>
|
|
28
|
-
`;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`RelatedProgramsBanner render with programs 1`] = `
|
|
4
|
-
<Banner
|
|
5
|
-
className="bg-white border-top border-bottom mb-0 related-programs-banner"
|
|
6
|
-
icon={[MockFunction icons.Program]}
|
|
7
|
-
variant="info"
|
|
8
|
-
>
|
|
9
|
-
<span
|
|
10
|
-
className="font-weight-bolder"
|
|
11
|
-
>
|
|
12
|
-
Related Programs:
|
|
13
|
-
</span>
|
|
14
|
-
<ProgramsList
|
|
15
|
-
programs={
|
|
16
|
-
[
|
|
17
|
-
{
|
|
18
|
-
"title": "Program 1",
|
|
19
|
-
"url": "http://example.com/program1",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"title": "Program 2",
|
|
23
|
-
"url": "http://example.com/program2",
|
|
24
|
-
},
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
/>
|
|
28
|
-
</Banner>
|
|
29
|
-
`;
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CertificateBanner snapshot is passing and is downloadable 1`] = `
|
|
4
|
-
<Banner
|
|
5
|
-
icon={[MockFunction icons.CheckCircle]}
|
|
6
|
-
variant="success"
|
|
7
|
-
>
|
|
8
|
-
Congratulations. Your certificate is ready.
|
|
9
|
-
</Banner>
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports[`CertificateBanner snapshot is passing and is earned but unavailable 1`] = `
|
|
13
|
-
<Banner>
|
|
14
|
-
Your grade and certificate will be ready after 10/20/3030.
|
|
15
|
-
</Banner>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
exports[`CertificateBanner snapshot is passing and not downloadable render empty 1`] = `null`;
|
|
19
|
-
|
|
20
|
-
exports[`CertificateBanner snapshot is restricted 1`] = `
|
|
21
|
-
<Banner
|
|
22
|
-
variant="danger"
|
|
23
|
-
>
|
|
24
|
-
Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
|
|
25
|
-
</Banner>
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
exports[`CertificateBanner snapshot is restricted and verified 1`] = `
|
|
29
|
-
<Banner
|
|
30
|
-
variant="danger"
|
|
31
|
-
>
|
|
32
|
-
Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
|
|
33
|
-
|
|
34
|
-
If you would like a refund on your Certificate of Achievement, please contact us.
|
|
35
|
-
</Banner>
|
|
36
|
-
`;
|
|
37
|
-
|
|
38
|
-
exports[`CertificateBanner snapshot is restricted and verified with billing email 1`] = `
|
|
39
|
-
<Banner
|
|
40
|
-
variant="danger"
|
|
41
|
-
>
|
|
42
|
-
Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
|
|
43
|
-
|
|
44
|
-
<format-message-function
|
|
45
|
-
message={
|
|
46
|
-
{
|
|
47
|
-
"defaultMessage": "If you would like a refund on your Certificate of Achievement, please contact our billing address {billingEmail}",
|
|
48
|
-
"description": "Message to learners to contact billing for certificate refunds",
|
|
49
|
-
"id": "learner-dash.courseCard.banners.certificateRefundContactBilling",
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
values={
|
|
53
|
-
{
|
|
54
|
-
"billingEmail": <MailtoLink
|
|
55
|
-
to="billing@email"
|
|
56
|
-
>
|
|
57
|
-
billing@email
|
|
58
|
-
</MailtoLink>,
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/>
|
|
62
|
-
</Banner>
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
exports[`CertificateBanner snapshot is restricted and verified with support and billing email 1`] = `
|
|
66
|
-
<Banner
|
|
67
|
-
variant="danger"
|
|
68
|
-
>
|
|
69
|
-
<format-message-function
|
|
70
|
-
message={
|
|
71
|
-
{
|
|
72
|
-
"defaultMessage": "Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {supportEmail}.",
|
|
73
|
-
"description": "Restricted certificate warning message",
|
|
74
|
-
"id": "learner-dash.courseCard.banners.certificateRestricted",
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
values={
|
|
78
|
-
{
|
|
79
|
-
"supportEmail": <MailtoLink
|
|
80
|
-
to="suport@email"
|
|
81
|
-
>
|
|
82
|
-
suport@email
|
|
83
|
-
</MailtoLink>,
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/>
|
|
87
|
-
|
|
88
|
-
<format-message-function
|
|
89
|
-
message={
|
|
90
|
-
{
|
|
91
|
-
"defaultMessage": "If you would like a refund on your Certificate of Achievement, please contact our billing address {billingEmail}",
|
|
92
|
-
"description": "Message to learners to contact billing for certificate refunds",
|
|
93
|
-
"id": "learner-dash.courseCard.banners.certificateRefundContactBilling",
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
values={
|
|
97
|
-
{
|
|
98
|
-
"billingEmail": <MailtoLink
|
|
99
|
-
to="billing@email"
|
|
100
|
-
>
|
|
101
|
-
billing@email
|
|
102
|
-
</MailtoLink>,
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
/>
|
|
106
|
-
</Banner>
|
|
107
|
-
`;
|
|
108
|
-
|
|
109
|
-
exports[`CertificateBanner snapshot is restricted and verified with support email 1`] = `
|
|
110
|
-
<Banner
|
|
111
|
-
variant="danger"
|
|
112
|
-
>
|
|
113
|
-
<format-message-function
|
|
114
|
-
message={
|
|
115
|
-
{
|
|
116
|
-
"defaultMessage": "Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {supportEmail}.",
|
|
117
|
-
"description": "Restricted certificate warning message",
|
|
118
|
-
"id": "learner-dash.courseCard.banners.certificateRestricted",
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
values={
|
|
122
|
-
{
|
|
123
|
-
"supportEmail": <MailtoLink
|
|
124
|
-
to="suport@email"
|
|
125
|
-
>
|
|
126
|
-
suport@email
|
|
127
|
-
</MailtoLink>,
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/>
|
|
131
|
-
|
|
132
|
-
If you would like a refund on your Certificate of Achievement, please contact us.
|
|
133
|
-
</Banner>
|
|
134
|
-
`;
|
|
135
|
-
|
|
136
|
-
exports[`CertificateBanner snapshot is restricted with billing email 1`] = `
|
|
137
|
-
<Banner
|
|
138
|
-
variant="danger"
|
|
139
|
-
>
|
|
140
|
-
Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know.
|
|
141
|
-
</Banner>
|
|
142
|
-
`;
|
|
143
|
-
|
|
144
|
-
exports[`CertificateBanner snapshot is restricted with support email 1`] = `
|
|
145
|
-
<Banner
|
|
146
|
-
variant="danger"
|
|
147
|
-
>
|
|
148
|
-
<format-message-function
|
|
149
|
-
message={
|
|
150
|
-
{
|
|
151
|
-
"defaultMessage": "Your Certificate of Achievement is being held pending confirmation that the issuance of your Certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria, and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {supportEmail}.",
|
|
152
|
-
"description": "Restricted certificate warning message",
|
|
153
|
-
"id": "learner-dash.courseCard.banners.certificateRestricted",
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
values={
|
|
157
|
-
{
|
|
158
|
-
"supportEmail": <MailtoLink
|
|
159
|
-
to="suport@email"
|
|
160
|
-
>
|
|
161
|
-
suport@email
|
|
162
|
-
</MailtoLink>,
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/>
|
|
166
|
-
</Banner>
|
|
167
|
-
`;
|
|
168
|
-
|
|
169
|
-
exports[`CertificateBanner snapshot not passing and audit 1`] = `
|
|
170
|
-
<Banner>
|
|
171
|
-
Grade required to pass the course: 0.8%
|
|
172
|
-
</Banner>
|
|
173
|
-
`;
|
|
174
|
-
|
|
175
|
-
exports[`CertificateBanner snapshot not passing and has finished 1`] = `
|
|
176
|
-
<Banner
|
|
177
|
-
variant="warning"
|
|
178
|
-
>
|
|
179
|
-
You are not eligible for a certificate.
|
|
180
|
-
|
|
181
|
-
<Hyperlink
|
|
182
|
-
destination="progressUrl"
|
|
183
|
-
isInline={true}
|
|
184
|
-
>
|
|
185
|
-
View grades.
|
|
186
|
-
</Hyperlink>
|
|
187
|
-
</Banner>
|
|
188
|
-
`;
|
|
189
|
-
|
|
190
|
-
exports[`CertificateBanner snapshot not passing and is downloadable 1`] = `
|
|
191
|
-
<Banner
|
|
192
|
-
icon={[MockFunction icons.CheckCircle]}
|
|
193
|
-
variant="success"
|
|
194
|
-
>
|
|
195
|
-
Congratulations. Your certificate is ready.
|
|
196
|
-
</Banner>
|
|
197
|
-
`;
|
|
198
|
-
|
|
199
|
-
exports[`CertificateBanner snapshot not passing and not audit and not finished 1`] = `
|
|
200
|
-
<Banner
|
|
201
|
-
variant="warning"
|
|
202
|
-
>
|
|
203
|
-
Grade required for a certificate: 0.8%
|
|
204
|
-
</Banner>
|
|
205
|
-
`;
|