richie-education 3.3.2-dev19 → 3.3.2-dev25

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.
Files changed (117) hide show
  1. package/.eslintrc.json +0 -3
  2. package/.storybook/preview.tsx +1 -1
  3. package/cunningham.cjs +1 -0
  4. package/i18n/compile-translations.js +12 -10
  5. package/jest.config.js +5 -0
  6. package/js/components/AddressesManagement/AddressForm/index.stories.tsx +1 -1
  7. package/js/components/AddressesManagement/AddressForm/index.tsx +4 -3
  8. package/js/components/AddressesManagement/index.stories.tsx +1 -1
  9. package/js/components/AddressesManagement/index.tsx +5 -3
  10. package/js/components/Badge/index.stories.tsx +1 -1
  11. package/js/components/Badge/index.tsx +1 -1
  12. package/js/components/Banner/index.stories.tsx +1 -1
  13. package/js/components/CourseGlimpse/index.stories.tsx +1 -1
  14. package/js/components/CourseGlimpseList/index.stories.tsx +1 -1
  15. package/js/components/CreditCardSelector/index.tsx +11 -3
  16. package/js/components/DownloadCertificateButton/index.tsx +2 -1
  17. package/js/components/DownloadContractButton/index.tsx +7 -1
  18. package/js/components/Form/Form/index.tsx +4 -2
  19. package/js/components/Icon/index.stories.tsx +2 -1
  20. package/js/components/Modal/index.stories.tsx +1 -1
  21. package/js/components/Modal/index.tsx +2 -1
  22. package/js/components/OpenEdxFullNameForm/index.stories.tsx +1 -1
  23. package/js/components/OpenEdxFullNameForm/index.tsx +2 -2
  24. package/js/components/PurchaseButton/index.stories.tsx +1 -1
  25. package/js/components/RegisteredAddress/index.stories.tsx +1 -1
  26. package/js/components/RegisteredAddress/index.tsx +4 -2
  27. package/js/components/SaleTunnel/AddressSelector/CreateAddressFormModal.tsx +1 -1
  28. package/js/components/SaleTunnel/AddressSelector/EditAddressFormModal.tsx +1 -1
  29. package/js/components/SaleTunnel/AddressSelector/index.tsx +4 -2
  30. package/js/components/SaleTunnel/SaleTunnelInformation/SaleTunnelInformationGroup.tsx +4 -3
  31. package/js/components/SaleTunnel/SaleTunnelInformation/SaleTunnelInformationSingular.tsx +8 -2
  32. package/js/components/SaleTunnel/index.stories.tsx +1 -1
  33. package/js/components/Spinner/index.stories.tsx +1 -1
  34. package/js/components/Tabs/index.stories.tsx +1 -1
  35. package/js/components/Tabs/index.tsx +2 -1
  36. package/js/components/TeacherDashboardCourseList/index.tsx +2 -1
  37. package/js/hooks/useAddressesManagement.tsx +4 -2
  38. package/js/hooks/useCreditCards/index.ts +6 -4
  39. package/js/hooks/useDashboardAddressForm.tsx +3 -3
  40. package/js/hooks/useMatchMedia.ts +1 -1
  41. package/js/hooks/useResources/useResourcesRoot.ts +1 -1
  42. package/js/hooks/useUnionResource/index.ts +6 -2
  43. package/js/hooks/useUnionResource/utils/fetchEntity.ts +1 -0
  44. package/js/pages/DashboardAddressesManagement/DashboardAddressBox.tsx +3 -3
  45. package/js/pages/DashboardAddressesManagement/DashboardCreateAddress.stories.tsx +1 -1
  46. package/js/pages/DashboardAddressesManagement/DashboardCreateAddress.tsx +1 -1
  47. package/js/pages/DashboardAddressesManagement/DashboardEditAddress.stories.tsx +1 -1
  48. package/js/pages/DashboardAddressesManagement/DashboardEditAddress.tsx +3 -2
  49. package/js/pages/DashboardAddressesManagement/index.stories.tsx +1 -1
  50. package/js/pages/DashboardAddressesManagement/index.tsx +1 -1
  51. package/js/pages/DashboardCourses/index.tsx +2 -1
  52. package/js/pages/DashboardCreditCardsManagement/CreditCardBrandLogo.stories.tsx +1 -1
  53. package/js/pages/DashboardCreditCardsManagement/DashboardCreditCardBox.tsx +3 -3
  54. package/js/pages/DashboardCreditCardsManagement/DashboardEditCreditCard.stories.tsx +1 -1
  55. package/js/pages/DashboardCreditCardsManagement/DashboardEditCreditCard.tsx +3 -2
  56. package/js/pages/DashboardCreditCardsManagement/index.stories.tsx +1 -1
  57. package/js/pages/DashboardOpenEdxProfile/index.stories.tsx +1 -1
  58. package/js/pages/TeacherDashboardContractsLayout/components/BulkDownloadContractButton/index.tsx +4 -2
  59. package/js/pages/TeacherDashboardContractsLayout/components/SignOrganizationContractButton/index.tsx +2 -1
  60. package/js/pages/TeacherDashboardContractsLayout/hooks/useCheckContractArchiveExists/index.spec.tsx +4 -4
  61. package/js/pages/TeacherDashboardContractsLayout/hooks/useDownloadContractArchive/index.spec.tsx +8 -9
  62. package/js/pages/TeacherDashboardContractsLayout/hooks/useDownloadContractArchive/index.tsx +14 -3
  63. package/js/pages/TeacherDashboardCourseLearnersLayout/components/CourseLearnerDataGrid/index.tsx +6 -1
  64. package/js/pages/TeacherDashboardCourseLoader/CourseRunList/utils.tsx +2 -1
  65. package/js/pages/TeacherDashboardOrganizationAgreements/BulkAgreementContractButton.tsx +4 -2
  66. package/js/pages/TeacherDashboardOrganizationAgreements/SignOrganizationAgreementButton.tsx +2 -1
  67. package/js/pages/TeacherDashboardOrganizationQuotes/index.tsx +2 -1
  68. package/js/utils/ProductHelper/index.spec.ts +1 -1
  69. package/js/utils/cunningham-tokens.ts +1111 -142
  70. package/js/utils/errors/handle.spec.ts +3 -3
  71. package/js/utils/react-query/useSessionMutation/index.ts +8 -3
  72. package/js/widgets/Dashboard/components/DashboardAvatar/index.stories.tsx +1 -1
  73. package/js/widgets/Dashboard/components/DashboardBox/index.stories.tsx +13 -5
  74. package/js/widgets/Dashboard/components/DashboardBreadcrumbs/index.stories.tsx +1 -1
  75. package/js/widgets/Dashboard/components/DashboardBreadcrumbs/index.tsx +3 -2
  76. package/js/widgets/Dashboard/components/DashboardCard/index.spec.tsx +13 -2
  77. package/js/widgets/Dashboard/components/DashboardCard/index.stories.tsx +12 -4
  78. package/js/widgets/Dashboard/components/DashboardCard/index.tsx +1 -1
  79. package/js/widgets/Dashboard/components/DashboardItem/BatchOrder/BatchOrderPaymentModal/BatchOrderPaymentManager.tsx +1 -1
  80. package/js/widgets/Dashboard/components/DashboardItem/BatchOrder/BatchOrderPaymentModal/index.tsx +2 -1
  81. package/js/widgets/Dashboard/components/DashboardItem/Certificate/index.stories.tsx +1 -1
  82. package/js/widgets/Dashboard/components/DashboardItem/Contract/index.stories.tsx +1 -1
  83. package/js/widgets/Dashboard/components/DashboardItem/CourseEnrolling/index.stories.tsx +1 -1
  84. package/js/widgets/Dashboard/components/DashboardItem/CourseEnrolling/index.tsx +8 -4
  85. package/js/widgets/Dashboard/components/DashboardItem/Enrollment/DashboardItemEnrollment.stories.tsx +1 -1
  86. package/js/widgets/Dashboard/components/DashboardItem/Enrollment/ProductCertificateFooter/index.tsx +1 -1
  87. package/js/widgets/Dashboard/components/DashboardItem/Order/DashboardItemOrderReadonly.stories.tsx +1 -1
  88. package/js/widgets/Dashboard/components/DashboardItem/Order/DashboardItemOrderWritable.stories.tsx +1 -1
  89. package/js/widgets/Dashboard/components/DashboardItem/Order/Installment/index.tsx +1 -1
  90. package/js/widgets/Dashboard/components/DashboardItem/Order/OrderPaymentRetryModal/index.tsx +2 -1
  91. package/js/widgets/Dashboard/components/DashboardItem/Order/OrganizationBlock/index.tsx +6 -3
  92. package/js/widgets/Dashboard/components/DashboardItem/index.stories.tsx +1 -1
  93. package/js/widgets/Dashboard/components/DashboardItem/index.tsx +2 -1
  94. package/js/widgets/Dashboard/components/DashboardListAvatar/index.stories.tsx +1 -1
  95. package/js/widgets/Dashboard/components/DashboardSidebar/index.stories.tsx +1 -1
  96. package/js/widgets/Dashboard/components/LearnerDashboardSidebar/index.stories.tsx +1 -1
  97. package/js/widgets/Dashboard/components/ProtectedOutlet/AuthenticatedOutlet.spec.tsx +1 -1
  98. package/js/widgets/Dashboard/components/ProtectedOutlet/ProtectedOutlet.spec.tsx +1 -1
  99. package/js/widgets/Dashboard/components/SearchBar/index.tsx +2 -1
  100. package/js/widgets/Dashboard/components/TeacherDashboardOrganizationSidebar/index.stories.tsx +1 -1
  101. package/js/widgets/Dashboard/components/TeacherDashboardProfileSidebar/index.stories.tsx +1 -1
  102. package/js/widgets/Dashboard/index.spec.tsx +1 -1
  103. package/js/widgets/Search/components/SearchFilterValueParent/index.stories.tsx +1 -1
  104. package/js/widgets/Search/components/SearchFiltersPane/index.tsx +2 -1
  105. package/js/widgets/Slider/index.stories.tsx +1 -1
  106. package/js/widgets/SyllabusCourseRunsList/components/CourseProductItem/components/CourseProductCertificateItem/index.stories.tsx +1 -1
  107. package/js/widgets/SyllabusCourseRunsList/components/CourseProductItem/components/CourseRunItem/index.stories.tsx +1 -1
  108. package/js/widgets/SyllabusCourseRunsList/components/CourseProductItem/index.stories.tsx +1 -1
  109. package/js/widgets/SyllabusCourseRunsList/components/CourseWishButton/index.tsx +4 -2
  110. package/js/widgets/SyllabusCourseRunsList/components/SyllabusCourseRun/index.stories.tsx +1 -1
  111. package/js/widgets/SyllabusCourseRunsList/components/SyllabusCourseRunCompacted/index.stories.tsx +1 -1
  112. package/js/widgets/UserLogin/index.stories.tsx +1 -1
  113. package/package.json +75 -75
  114. package/scss/vendors/css/cunningham-tokens.css +1259 -154
  115. package/scss/vendors/cunningham-tokens.scss +1479 -150
  116. package/tsconfig.json +1 -1
  117. package/webpack.config.js +6 -0
@@ -47,16 +47,16 @@ export const DashboardAddressBox = ({
47
47
  <>
48
48
  <div className="dashboard-address-box__buttons">
49
49
  {!address.is_main && (
50
- <Button color="primary" onClick={() => promote(address)}>
50
+ <Button color="brand" variant="primary" onClick={() => promote(address)}>
51
51
  <FormattedMessage {...messages.setMain} />
52
52
  </Button>
53
53
  )}
54
- <Button color="primary" onClick={() => edit(address)}>
54
+ <Button color="brand" variant="primary" onClick={() => edit(address)}>
55
55
  <FormattedMessage {...messages.edit} />
56
56
  </Button>
57
57
  </div>
58
58
  {!address.is_main && (
59
- <Button color="primary" onClick={() => remove(address)}>
59
+ <Button color="brand" variant="primary" onClick={() => remove(address)}>
60
60
  <FormattedMessage {...messages.delete} />
61
61
  </Button>
62
62
  )}
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { StorybookHelper } from 'utils/StorybookHelper';
3
3
  import { DashboardCreateAddress } from './DashboardCreateAddress';
4
4
 
@@ -38,7 +38,7 @@ export const DashboardCreateAddress = ({ onSettled }: { onSettled?: Function })
38
38
  <DashboardCard
39
39
  header={<FormattedMessage {...messages.header} />}
40
40
  footer={
41
- <Button color="primary" onClick={handleSubmit(onSubmit)}>
41
+ <Button color="brand" variant="primary" onClick={handleSubmit(onSubmit)}>
42
42
  <FormattedMessage {...messages.submit} />
43
43
  </Button>
44
44
  }
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { StorybookHelper } from 'utils/StorybookHelper';
3
3
  import { AddressFactory } from 'utils/test/factories/joanie';
4
4
  import { DashboardEditAddress } from './DashboardEditAddress';
@@ -54,12 +54,13 @@ export const DashboardEditAddress = ({ address, onSettled = noop }: DashboardEdi
54
54
  header={<FormattedMessage {...messages.header} values={{ title: address.title }} />}
55
55
  footer={
56
56
  <>
57
- <Button color="secondary" onClick={handleSubmit(onSubmit)}>
57
+ <Button color="brand" variant="secondary" onClick={handleSubmit(onSubmit)}>
58
58
  <FormattedMessage {...messages.submit} />
59
59
  </Button>
60
60
  {!address.is_main && (
61
61
  <Button
62
- color="secondary"
62
+ color="brand"
63
+ variant="secondary"
63
64
  onClick={() => {
64
65
  remove(address, {
65
66
  onSuccess: () => onSettled(),
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { StorybookHelper } from 'utils/StorybookHelper';
3
3
  import { DashboardAddressesManagement } from './index';
4
4
 
@@ -86,7 +86,7 @@ export const DashboardAddressesManagement = ({
86
86
  ))}
87
87
  </DashboardBox.List>
88
88
  )}
89
- <Button color="secondary" fullWidth onClick={() => onClickCreate?.()}>
89
+ <Button color="brand" variant="secondary" fullWidth onClick={() => onClickCreate?.()}>
90
90
  <Icon name={IconTypeEnum.PLUS} className="button__icon" />
91
91
  <FormattedMessage {...messages.add} />
92
92
  </Button>
@@ -88,7 +88,8 @@ export const DashboardCourses = () => {
88
88
  onClick={() => next()}
89
89
  disabled={isLoadingMore}
90
90
  ref={loadMoreButtonRef}
91
- color="tertiary"
91
+ color="brand"
92
+ variant="tertiary"
92
93
  >
93
94
  <FormattedMessage {...messages.loadMore} />
94
95
  </Button>
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { CreditCardFactory } from 'utils/test/factories/joanie';
3
3
  import { CreditCard, CreditCardBrand } from 'types/Joanie';
4
4
  import { CreditCardBrandLogo } from './CreditCardBrandLogo';
@@ -68,15 +68,15 @@ export const DashboardCreditCardBox = ({ creditCard, promote, edit, remove }: Pr
68
68
  <>
69
69
  <div className="dashboard-credit-card__buttons">
70
70
  {!creditCard.is_main && (
71
- <Button color="primary" onClick={() => promote(creditCard)}>
71
+ <Button color="brand" variant="primary" onClick={() => promote(creditCard)}>
72
72
  <FormattedMessage {...messages.setMain} />
73
73
  </Button>
74
74
  )}
75
- <Button color="primary" onClick={() => edit(creditCard)}>
75
+ <Button color="brand" variant="primary" onClick={() => edit(creditCard)}>
76
76
  <FormattedMessage {...messages.edit} />
77
77
  </Button>
78
78
  </div>
79
- <Button color="primary" onClick={() => remove(creditCard)}>
79
+ <Button color="brand" variant="primary" onClick={() => remove(creditCard)}>
80
80
  <FormattedMessage {...messages.delete} />
81
81
  </Button>
82
82
  </>
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { StorybookHelper } from 'utils/StorybookHelper';
3
3
  import { CreditCardFactory } from 'utils/test/factories/joanie';
4
4
  import { DashboardEditCreditCard } from './DashboardEditCreditCard';
@@ -159,12 +159,13 @@ export const DashboardEditCreditCard = ({ creditCard, onSettled = noop }: Props)
159
159
  header={<FormattedMessage {...messages.header} />}
160
160
  footer={
161
161
  <>
162
- <Button color="secondary" onClick={handleSubmit(onSubmit)}>
162
+ <Button color="brand" variant="secondary" onClick={handleSubmit(onSubmit)}>
163
163
  <FormattedMessage {...messages.submit} />
164
164
  </Button>
165
165
  {!creditCard.is_main && (
166
166
  <Button
167
- color="secondary"
167
+ color="brand"
168
+ variant="secondary"
168
169
  onClick={() =>
169
170
  safeDelete(creditCard, {
170
171
  onSuccess: () => {
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { StorybookHelper } from 'utils/StorybookHelper';
3
3
  import { DashboardCreditCardsManagement } from '.';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import DashboardOpenEdxProfile from '.';
3
3
 
4
4
  export default {
@@ -49,7 +49,8 @@ const BulkDownloadContractButton = ({
49
49
  return (
50
50
  <Button
51
51
  disabled={true}
52
- color="tertiary"
52
+ color="brand"
53
+ variant="tertiary"
53
54
  size="small"
54
55
  icon={<div className="spinner spinner--small" />}
55
56
  >
@@ -62,7 +63,8 @@ const BulkDownloadContractButton = ({
62
63
  <Button
63
64
  onClick={downloadContractArchive}
64
65
  disabled={status === ContractDownloadStatus.INITIALIZING}
65
- color={status === ContractDownloadStatus.READY ? 'primary' : 'tertiary'}
66
+ color="brand"
67
+ variant={status === ContractDownloadStatus.READY ? 'primary' : 'tertiary'}
66
68
  size="small"
67
69
  icon={<span className="material-icons">download</span>}
68
70
  >
@@ -32,7 +32,8 @@ const SignOrganizationContractButton = ({
32
32
  {hasContractToSign && (
33
33
  <Button
34
34
  size="small"
35
- color="primary"
35
+ color="brand"
36
+ variant="primary"
36
37
  onClick={() => setContractFrameOpened(true)}
37
38
  disabled={contractFrameOpened}
38
39
  icon={
@@ -116,9 +116,9 @@ describe.each([
116
116
  });
117
117
 
118
118
  await waitFor(() => {
119
- expect(result.current.isPolling).toBe(false);
119
+ expect(result.current.isContractArchiveExists).toBe(true);
120
120
  });
121
- expect(result.current.isContractArchiveExists).toBe(true);
121
+ expect(result.current.isPolling).toBe(false);
122
122
  });
123
123
 
124
124
  it('should do nothing when enable is false', () => {
@@ -160,8 +160,8 @@ describe.each([
160
160
  mockCheckArchive.mockResolvedValue(true);
161
161
  await waitFor(() => {
162
162
  expect(mockCheckArchive).toHaveBeenCalledTimes(2);
163
+ expect(result.current.isContractArchiveExists).toBe(true);
164
+ expect(result.current.isPolling).toBe(false);
163
165
  });
164
- expect(result.current.isPolling).toBe(false);
165
- expect(result.current.isContractArchiveExists).toBe(true);
166
166
  });
167
167
  });
@@ -232,6 +232,7 @@ describe.each([
232
232
  const contractArchiveId = faker.string.uuid();
233
233
  storeContractArchiveId({ ...localStorageArchiveFilters, contractArchiveId });
234
234
  mockCheckArchive.mockResolvedValue(true);
235
+ mockGetArchive.mockResolvedValue('fake-content');
235
236
 
236
237
  const { result } = renderHook(
237
238
  () => useDownloadContractArchive(localStorageArchiveFilters),
@@ -246,8 +247,8 @@ describe.each([
246
247
  });
247
248
  expect(mockCheckArchive).toHaveBeenCalledTimes(1);
248
249
 
249
- act(() => {
250
- result.current.downloadContractArchive();
250
+ await act(async () => {
251
+ await result.current.downloadContractArchive();
251
252
  });
252
253
 
253
254
  await waitFor(() => {
@@ -255,11 +256,8 @@ describe.each([
255
256
  });
256
257
 
257
258
  expect(mockCheckArchive).toHaveBeenCalledTimes(1);
258
- // backend is called to download the archive
259
- expect(mockGetArchive).toHaveBeenCalledTimes(1);
260
-
261
- // but not to generate the archive
262
259
  expect(mockCreateArchive).not.toHaveBeenCalled();
260
+ expect(mockGetArchive).toHaveBeenCalledTimes(1);
263
261
  });
264
262
 
265
263
  it("doDownloadArchive should call 'createArchive' if no contractArchiveId is stored", async () => {
@@ -271,9 +269,11 @@ describe.each([
271
269
  );
272
270
 
273
271
  mockCheckArchive.mockResolvedValue(true);
272
+
274
273
  mockCreateArchive.mockResolvedValue(faker.string.uuid());
275
- act(() => {
276
- result.current.downloadContractArchive();
274
+
275
+ await act(async () => {
276
+ await result.current.downloadContractArchive();
277
277
  });
278
278
 
279
279
  await waitFor(() => {
@@ -282,7 +282,6 @@ describe.each([
282
282
 
283
283
  expect(mockCreateArchive).toHaveBeenCalledTimes(1);
284
284
  expect(mockCheckArchive).toHaveBeenCalledTimes(1);
285
- expect(mockGetArchive).toHaveBeenCalledTimes(1);
286
285
  });
287
286
  });
288
287
 
@@ -157,10 +157,21 @@ const useDownloadContractArchive = ({
157
157
  // this effect will trigger the download
158
158
  // if it have been previously requested by the user
159
159
  useEffect(() => {
160
- if (isDownloadRequest && isContractArchiveExists) {
161
- downloadContractArchive();
160
+ if (isDownloadRequest && isContractArchiveExists && contractArchiveId !== null) {
161
+ (async () => {
162
+ await getArchive(contractArchiveId);
163
+ setIsDownloadRequest(false);
164
+ setContractArchiveId(null);
165
+ unstoreContractArchiveId(localstorageArchiveFilters);
166
+ })();
162
167
  }
163
- }, [isDownloadRequest, isContractArchiveExists]);
168
+ }, [
169
+ isDownloadRequest,
170
+ isContractArchiveExists,
171
+ contractArchiveId,
172
+ localstorageArchiveFilters,
173
+ getArchive,
174
+ ]);
164
175
 
165
176
  return {
166
177
  status: contractDownloadStatus,
@@ -82,7 +82,12 @@ const CourseLearnerDataGrid = ({
82
82
  headerName: intl.formatMessage(messages.columnActions),
83
83
  renderCell: (params: { row: Row }) => {
84
84
  return (
85
- <Button href={`mailto:${params.row.owner__email}`} size="small" color="secondary">
85
+ <Button
86
+ href={`mailto:${params.row.owner__email}`}
87
+ size="small"
88
+ color="brand"
89
+ variant="secondary"
90
+ >
86
91
  <FormattedMessage {...messages.contactButton} />
87
92
  </Button>
88
93
  );
@@ -69,7 +69,8 @@ export const buildCourseRunData = (intl: IntlShape, courseRuns: CourseRun[]) =>
69
69
  <CourseRunListCell variant={CourseRunListCell.ALIGN_RIGHT}>
70
70
  <Button
71
71
  href={courseRun.resource_link}
72
- color="secondary"
72
+ color="brand"
73
+ variant="secondary"
73
74
  size="small"
74
75
  icon={<Icon name={IconTypeEnum.LOGOUT_SQUARE} size="small" />}
75
76
  >
@@ -50,7 +50,8 @@ const BulkDownloadAgreementButton = ({
50
50
  return (
51
51
  <Button
52
52
  disabled={true}
53
- color="tertiary"
53
+ color="brand"
54
+ variant="tertiary"
54
55
  size="small"
55
56
  icon={<div className="spinner spinner--small" />}
56
57
  >
@@ -63,7 +64,8 @@ const BulkDownloadAgreementButton = ({
63
64
  <Button
64
65
  onClick={downloadContractArchive}
65
66
  disabled={status === ContractDownloadStatus.INITIALIZING}
66
- color={status === ContractDownloadStatus.READY ? 'primary' : 'tertiary'}
67
+ color="brand"
68
+ variant={status === ContractDownloadStatus.READY ? 'primary' : 'tertiary'}
67
69
  size="small"
68
70
  icon={<span className="material-icons">download</span>}
69
71
  >
@@ -32,7 +32,8 @@ const SignOrganizationAgreementButton = ({
32
32
  {hasAgreementToSign && (
33
33
  <Button
34
34
  size="small"
35
- color="primary"
35
+ color="brand"
36
+ variant="primary"
36
37
  onClick={() => setAgreementFrameOpened(true)}
37
38
  disabled={agreementFrameOpened}
38
39
  icon={
@@ -371,7 +371,8 @@ const TeacherDashboardOrganizationQuotes = () => {
371
371
  <div>
372
372
  <Button
373
373
  size="small"
374
- color="secondary"
374
+ color="brand"
375
+ variant="secondary"
375
376
  className="mr-2"
376
377
  onClick={() => handleDownloadQuote(quote.id)}
377
378
  icon={<span className="material-icons">download</span>}
@@ -248,7 +248,7 @@ describe('ProductHelper', () => {
248
248
  it('should throw an error when the product is a certificate and the enrollment is undefined', () => {
249
249
  const product = CertificateProductFactory().one();
250
250
 
251
- expect(() => ProductHelper.hasOpenedTargetCourse(product, undefined)).toThrowError(
251
+ expect(() => ProductHelper.hasOpenedTargetCourse(product, undefined)).toThrow(
252
252
  'Unable to check if the certificate product relies on an opened course run without enrollment.',
253
253
  );
254
254
  });