richie-education 3.0.1-dev8 → 3.0.1-dev9

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.
@@ -6,32 +6,32 @@ import { CourseOffer } from 'types/Course';
6
6
 
7
7
  const messages = defineMessages({
8
8
  dateIconAlt: {
9
- defaultMessage: 'Course date',
9
+ defaultMessage: 'Availability',
10
10
  description: 'Course date logo alternative text for screen reader users',
11
11
  id: 'components.CourseGlimpseFooter.dateIconAlt',
12
12
  },
13
13
  enrollmentOfferIconFreeAlt: {
14
- defaultMessage: 'The entire course can be completed for free.',
14
+ defaultMessage: 'All content is available for free',
15
15
  description: 'Course offers free alternative text',
16
16
  id: 'components.CourseGlimpseFooter.enrollmentOfferIconFreeAlt',
17
17
  },
18
18
  enrollmentOfferIconPartiallyFreeAlt: {
19
- defaultMessage: 'More than half of the course is for free.',
19
+ defaultMessage: 'Most of the content is available for free',
20
20
  description: 'Course offers partially free alternative text',
21
21
  id: 'components.CourseGlimpseFooter.enrollmentOfferIconPartiallyFreeAlt',
22
22
  },
23
23
  enrollmentOfferIconPaidAlt: {
24
- defaultMessage: 'Course requires a payment.',
24
+ defaultMessage: 'Access requires payment',
25
25
  description: 'Course offers paid alternative text',
26
26
  id: 'components.CourseGlimpseFooter.enrollmentOfferIconPaidAlt',
27
27
  },
28
28
  enrollmentOfferIconSubscriptionAlt: {
29
- defaultMessage: 'Course requires to be a subscriber or a paid member.',
29
+ defaultMessage: 'Access requires a subscription',
30
30
  description: 'Course offers subscription alternative text',
31
31
  id: 'components.CourseGlimpseFooter.enrollmentOfferIconSubscriptionAlt',
32
32
  },
33
33
  certificateOfferIconAlt: {
34
- defaultMessage: 'The course offers a certification.',
34
+ defaultMessage: 'An exam is available',
35
35
  description: 'Course certificate offer alternative text',
36
36
  id: 'components.CourseGlimpseFooter.certificateOfferIconAlt',
37
37
  },
@@ -85,7 +85,7 @@ describe('widgets/Search/components/CourseGlimpse', () => {
85
85
  screen.getByText('Some Organization');
86
86
  screen.getByText('Category');
87
87
  // Matches on 'Starting on March 14, 2019', date is wrapped with intl <span>
88
- screen.getByLabelText('Course date');
88
+ screen.getByLabelText('Availability');
89
89
  screen.getByText('Starting on March 14, 2019');
90
90
 
91
91
  // Check course logo
@@ -110,10 +110,10 @@ describe('widgets/Search/components/CourseGlimpse', () => {
110
110
  expect(orgImg).toHaveAttribute('src', '/thumbs/org_small.png');
111
111
 
112
112
  // Check certificate offer
113
- within(container).getByRole('img', { name: 'The course offers a certification.' });
113
+ within(container).getByRole('img', { name: 'An exam is available' });
114
114
 
115
115
  // Check offer information
116
- const offerIcon = within(container).getByRole('img', { name: 'Course requires a payment.' });
116
+ const offerIcon = within(container).getByRole('img', { name: 'Access requires payment' });
117
117
  const useElement = offerIcon.lastChild;
118
118
  expect(useElement).toHaveAttribute('href', '#icon-offer-paid');
119
119
 
@@ -193,7 +193,7 @@ describe('widgets/Search/components/CourseGlimpse', () => {
193
193
  expect(containerElement).toHaveClass('course-glimpse--offer-free');
194
194
 
195
195
  const offerIcon = within(container).getByRole('img', {
196
- name: 'The entire course can be completed for free.',
196
+ name: 'All content is available for free',
197
197
  });
198
198
  const useElement = offerIcon.lastChild;
199
199
  expect(useElement).toHaveAttribute('href', '#icon-offer-free');
@@ -203,10 +203,10 @@ describe('widgets/Search/components/CourseGlimpse', () => {
203
203
  });
204
204
 
205
205
  it.each([
206
- [CourseOffer.FREE, 'The entire course can be completed for free.'],
207
- [CourseOffer.PARTIALLY_FREE, 'More than half of the course is for free.'],
208
- [CourseOffer.PAID, 'Course requires a payment.'],
209
- [CourseOffer.SUBSCRIPTION, 'Course requires to be a subscriber or a paid member.'],
206
+ [CourseOffer.FREE, 'All content is available for free'],
207
+ [CourseOffer.PARTIALLY_FREE, 'Most of the content is available for free'],
208
+ [CourseOffer.PAID, 'Access requires payment'],
209
+ [CourseOffer.SUBSCRIPTION, 'Access requires a subscription'],
210
210
  ])('does show a specific course offer icon', (offer, altText) => {
211
211
  const { container } = renderCourseGlimpse({
212
212
  contextProps,
@@ -54,42 +54,42 @@ const messages = defineMessages({
54
54
  certificationPrice: {
55
55
  id: 'components.SyllabusCourseRun.certificationPrice',
56
56
  description: 'Title of the certification price section of an opened course run block',
57
- defaultMessage: 'Certification price',
57
+ defaultMessage: 'Certificate enrollment fee (optional)',
58
58
  },
59
59
  coursePaidOffer: {
60
60
  id: 'components.SyllabusCourseRun.coursePaidOffer',
61
61
  description: 'Message for the paid course offer of an opened course run block',
62
- defaultMessage: 'The course content is paid.',
62
+ defaultMessage: 'Paid access',
63
63
  },
64
64
  courseFreeOffer: {
65
65
  id: 'components.SyllabusCourseRun.courseFreeOffer',
66
66
  description: 'Message for the free course offer of an opened course run block',
67
- defaultMessage: 'The course content is free.',
67
+ defaultMessage: 'Free access',
68
68
  },
69
69
  coursePartiallyFree: {
70
70
  id: 'components.SyllabusCourseRun.coursePartiallyFree',
71
71
  description: 'Message for the partially free course offer of an opened course run block',
72
- defaultMessage: 'The course content is free.',
72
+ defaultMessage: 'Partially free access',
73
73
  },
74
74
  courseSubscriptionOffer: {
75
75
  id: 'components.SyllabusCourseRun.courseSubscriptionOffer',
76
76
  description: 'Message for the subscription course offer of an opened course run block',
77
- defaultMessage: 'Subscribe to access the course content.',
77
+ defaultMessage: 'Subscribe to access the course content',
78
78
  },
79
79
  certificatePaidOffer: {
80
80
  id: 'components.SyllabusCourseRun.certificatePaidOffer',
81
- description: 'Messagge for the paid certification offer of an opened course run block',
82
- defaultMessage: 'The certification process is paid.',
81
+ description: 'Message for the paid certification offer of an opened course run block',
82
+ defaultMessage: 'Paid certificate',
83
83
  },
84
84
  certificateFreeOffer: {
85
85
  id: 'components.SyllabusCourseRun.certificateFreeOffer',
86
86
  description: 'Message for the free certification offer of an opened course run block',
87
- defaultMessage: 'The certification process is free.',
87
+ defaultMessage: 'Free certificate',
88
88
  },
89
89
  certificateSubscriptionOffer: {
90
90
  id: 'components.SyllabusCourseRun.certificateSubscriptionOffer',
91
91
  description: 'Message for the subscription certification offer of an opened course run block',
92
- defaultMessage: 'The certification process is offered through subscription.',
92
+ defaultMessage: 'Offered certificate through subscription',
93
93
  },
94
94
  });
95
95
 
@@ -49,42 +49,42 @@ const messages = defineMessages({
49
49
  certificationPrice: {
50
50
  id: 'components.SyllabusCourseRunCompacted.certificationPrice',
51
51
  description: 'Title of the certification price section of an opened course run block',
52
- defaultMessage: 'Certification price',
52
+ defaultMessage: 'Certificate enrollment fee (optional)',
53
53
  },
54
54
  coursePaidOffer: {
55
55
  id: 'components.SyllabusCourseRunCompacted.coursePaidOffer',
56
56
  description: 'Message for the paid course offer of an opened course run block',
57
- defaultMessage: 'The course content is paid.',
57
+ defaultMessage: 'Paid access',
58
58
  },
59
59
  courseFreeOffer: {
60
60
  id: 'components.SyllabusCourseRunCompacted.courseFreeOffer',
61
61
  description: 'Message for the free course offer of an opened course run block',
62
- defaultMessage: 'The course content is free.',
62
+ defaultMessage: 'Free access',
63
63
  },
64
64
  coursePartiallyFree: {
65
65
  id: 'components.SyllabusCourseRunCompacted.coursePartiallyFree',
66
66
  description: 'Message for the partially free course offer of an opened course run block',
67
- defaultMessage: 'The course content is free.',
67
+ defaultMessage: 'Partially free access',
68
68
  },
69
69
  courseSubscriptionOffer: {
70
70
  id: 'components.SyllabusCourseRunCompacted.courseSubscriptionOffer',
71
71
  description: 'Message for the subscription course offer of an opened course run block',
72
- defaultMessage: 'Subscribe to access the course content.',
72
+ defaultMessage: 'Subscribe to access the course content',
73
73
  },
74
74
  certificatePaidOffer: {
75
75
  id: 'components.SyllabusCourseRunCompacted.certificatePaidOffer',
76
76
  description: 'Messagge for the paid certification offer of an opened course run block',
77
- defaultMessage: 'The certification process is paid.',
77
+ defaultMessage: 'Paid certificate',
78
78
  },
79
79
  certificateFreeOffer: {
80
80
  id: 'components.SyllabusCourseRunCompacted.certificateFreeOffer',
81
81
  description: 'Message for the free certification offer of an opened course run block',
82
- defaultMessage: 'The certification process is free.',
82
+ defaultMessage: 'Free certificate',
83
83
  },
84
84
  certificateSubscriptionOffer: {
85
85
  id: 'components.SyllabusCourseRunCompacted.certificateSubscriptionOffer',
86
86
  description: 'Message for the subscription certification offer of an opened course run block',
87
- defaultMessage: 'The certification process is offered through subscription.',
87
+ defaultMessage: 'Offered certificate through subscription',
88
88
  },
89
89
  });
90
90
 
@@ -1044,8 +1044,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1044
1044
  );
1045
1045
 
1046
1046
  const content = getHeaderContainer().innerHTML;
1047
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1048
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1047
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1048
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1049
1049
  });
1050
1050
 
1051
1051
  it('renders price information as subscription on SyllabusCourseRunCompacted', async () => {
@@ -1066,10 +1066,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1066
1066
  );
1067
1067
 
1068
1068
  const content = getHeaderContainer().innerHTML;
1069
- expect(content).toContain('<dd>Subscribe to access the course content.<br>€49.99</dd>');
1070
- expect(content).toContain(
1071
- '<dd>The certification process is offered through subscription.<br>€59.99</dd>',
1072
- );
1069
+ expect(content).toContain('<dd>Subscribe to access the course content<br>€49.99</dd>');
1070
+ expect(content).toContain('<dd>Offered certificate through subscription<br>€59.99</dd>');
1073
1071
  });
1074
1072
 
1075
1073
  it('renders price information as Partially free on SyllabusCourseRunCompacted', async () => {
@@ -1090,8 +1088,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1090
1088
  );
1091
1089
 
1092
1090
  const content = getHeaderContainer().innerHTML;
1093
- expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1094
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1091
+ expect(content).toContain('<dd>Partially free access<br>€0.00</dd>');
1092
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1095
1093
  });
1096
1094
 
1097
1095
  it('renders price information as paid and free on SyllabusCourseRunCompacted', async () => {
@@ -1112,8 +1110,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1112
1110
  );
1113
1111
 
1114
1112
  const content = getHeaderContainer().innerHTML;
1115
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1116
- expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1113
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1114
+ expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
1117
1115
  });
1118
1116
 
1119
1117
  it('does not render price information on SyllabusCourseRunCompacted', async () => {
@@ -1133,8 +1131,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1133
1131
  );
1134
1132
 
1135
1133
  const content = getHeaderContainer().innerHTML;
1136
- expect(content).not.toContain('The course content is paid');
1137
- expect(content).not.toContain('The certification process is paid.');
1134
+ expect(content).not.toContain('Paid access');
1135
+ expect(content).not.toContain('Paid certificate');
1138
1136
  });
1139
1137
 
1140
1138
  it('does not render course price information on SyllabusCourseRunCompacted', async () => {
@@ -1155,8 +1153,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1155
1153
  );
1156
1154
 
1157
1155
  const content = getHeaderContainer().innerHTML;
1158
- expect(content).not.toContain('The course content is paid.');
1159
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1156
+ expect(content).not.toContain('Paid access');
1157
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1160
1158
  });
1161
1159
 
1162
1160
  it('does not render certificate price information on SyllabusCourseRunCompacted', async () => {
@@ -1177,8 +1175,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1177
1175
  );
1178
1176
 
1179
1177
  const content = getHeaderContainer().innerHTML;
1180
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1181
- expect(content).not.toContain('The certification process is paid.');
1178
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1179
+ expect(content).not.toContain('Paid certificate');
1182
1180
  });
1183
1181
 
1184
1182
  it('does not render prices but only offers on SyllabusCourseRunCompacted', async () => {
@@ -1199,8 +1197,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1199
1197
  );
1200
1198
 
1201
1199
  const content = getHeaderContainer().innerHTML;
1202
- expect(content).toContain('<dd>The course content is free.<br></dd>');
1203
- expect(content).toContain('<dd>The certification process is free.<br></dd>');
1200
+ expect(content).toContain('<dd>Free access<br></dd>');
1201
+ expect(content).toContain('<dd>Free certificate<br></dd>');
1204
1202
  });
1205
1203
 
1206
1204
  it('renders prices as zero on SyllabusCourseRunCompacted', async () => {
@@ -1221,8 +1219,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1221
1219
  );
1222
1220
 
1223
1221
  const content = getHeaderContainer().innerHTML;
1224
- expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1225
- expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1222
+ expect(content).toContain('<dd>Free access<br>€0.00</dd>');
1223
+ expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
1226
1224
  });
1227
1225
 
1228
1226
  it('does not render invalid offers on SyllabusCourseRunCompacted', async () => {
@@ -1266,8 +1264,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1266
1264
  );
1267
1265
 
1268
1266
  const content = getHeaderContainer().innerHTML;
1269
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1270
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1267
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1268
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1271
1269
  });
1272
1270
 
1273
1271
  it('renders price information as subscription on SyllabusCourseRun', async () => {
@@ -1288,10 +1286,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1288
1286
  );
1289
1287
 
1290
1288
  const content = getHeaderContainer().innerHTML;
1291
- expect(content).toContain('<dd>Subscribe to access the course content.<br>€49.99</dd>');
1292
- expect(content).toContain(
1293
- '<dd>The certification process is offered through subscription.<br>€59.99</dd>',
1294
- );
1289
+ expect(content).toContain('<dd>Subscribe to access the course content<br>€49.99</dd>');
1290
+ expect(content).toContain('<dd>Offered certificate through subscription<br>€59.99</dd>');
1295
1291
  });
1296
1292
 
1297
1293
  it('renders price information as Partially free on SyllabusCourseRun', async () => {
@@ -1312,8 +1308,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1312
1308
  );
1313
1309
 
1314
1310
  const content = getHeaderContainer().innerHTML;
1315
- expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1316
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1311
+ expect(content).toContain('<dd>Partially free access<br>€0.00</dd>');
1312
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1317
1313
  });
1318
1314
 
1319
1315
  it('renders price information as paid and free on SyllabusCourseRun', async () => {
@@ -1334,8 +1330,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1334
1330
  );
1335
1331
 
1336
1332
  const content = getHeaderContainer().innerHTML;
1337
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1338
- expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1333
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1334
+ expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
1339
1335
  });
1340
1336
 
1341
1337
  it('does not render price information on SyllabusCourseRun', async () => {
@@ -1355,8 +1351,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1355
1351
  );
1356
1352
 
1357
1353
  const content = getHeaderContainer().innerHTML;
1358
- expect(content).not.toContain('The course content is paid');
1359
- expect(content).not.toContain('The certification process is paid.');
1354
+ expect(content).not.toContain('Paid access');
1355
+ expect(content).not.toContain('Paid certificate');
1360
1356
  });
1361
1357
 
1362
1358
  it('does not render course price information on SyllabusCourseRun', async () => {
@@ -1377,8 +1373,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1377
1373
  );
1378
1374
 
1379
1375
  const content = getHeaderContainer().innerHTML;
1380
- expect(content).not.toContain('The course content is paid.');
1381
- expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1376
+ expect(content).not.toContain('Paid access');
1377
+ expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
1382
1378
  });
1383
1379
 
1384
1380
  it('does not render certificate price information on SyllabusCourseRun', async () => {
@@ -1399,8 +1395,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1399
1395
  );
1400
1396
 
1401
1397
  const content = getHeaderContainer().innerHTML;
1402
- expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1403
- expect(content).not.toContain('The certification process is paid.');
1398
+ expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1399
+ expect(content).not.toContain('Paid certificate');
1404
1400
  });
1405
1401
 
1406
1402
  it('does not render prices but only offers on SyllabusCourseRun', async () => {
@@ -1421,8 +1417,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1421
1417
  );
1422
1418
 
1423
1419
  const content = getHeaderContainer().innerHTML;
1424
- expect(content).toContain('<dd>The course content is free.<br></dd>');
1425
- expect(content).toContain('<dd>The certification process is free.<br></dd>');
1420
+ expect(content).toContain('<dd>Free access<br></dd>');
1421
+ expect(content).toContain('<dd>Free certificate<br></dd>');
1426
1422
  });
1427
1423
 
1428
1424
  it('renders prices as zero on SyllabusCourseRun', async () => {
@@ -1443,8 +1439,8 @@ describe('<SyllabusCourseRunsList/>', () => {
1443
1439
  );
1444
1440
 
1445
1441
  const content = getHeaderContainer().innerHTML;
1446
- expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1447
- expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1442
+ expect(content).toContain('<dd>Free access<br>€0.00</dd>');
1443
+ expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
1448
1444
  });
1449
1445
 
1450
1446
  it('does not render invalid offers on SyllabusCourseRun', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "3.0.1-dev8",
3
+ "version": "3.0.1-dev9",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {