richie-education 2.25.0-b2.dev25 → 2.25.0-b2.dev27

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.
@@ -151,6 +151,11 @@ describe('<AbstractContractFrame />', () => {
151
151
  await waitFor(() => {
152
152
  expect(screen.getByRole('heading', { name: 'Verifying signature ...' })).toBeInTheDocument();
153
153
  });
154
+ expect(
155
+ screen.getByText(
156
+ 'We are waiting for the signature to be validated from our signature platform. It can take up to few minutes. Do not close this page.',
157
+ ),
158
+ ).toBeInTheDocument();
154
159
  expect(screen.getByRole('status')).toBeInTheDocument();
155
160
 
156
161
  checkSignatureDeferred.resolve({ isSigned: true });
@@ -207,6 +212,11 @@ describe('<AbstractContractFrame />', () => {
207
212
  await waitFor(() => {
208
213
  expect(screen.getByRole('heading', { name: 'Verifying signature ...' })).toBeInTheDocument();
209
214
  });
215
+ expect(
216
+ screen.getByText(
217
+ 'We are waiting for the signature to be validated from our signature platform. It can take up to few minutes. Do not close this page.',
218
+ ),
219
+ ).toBeInTheDocument();
210
220
  expect(screen.getByRole('status')).toBeInTheDocument();
211
221
 
212
222
  checkSignatureDeferred.reject(new HttpError(500, 'Interval server error'));
@@ -263,6 +273,11 @@ describe('<AbstractContractFrame />', () => {
263
273
  await waitFor(() => {
264
274
  expect(screen.getByRole('heading', { name: 'Verifying signature ...' })).toBeInTheDocument();
265
275
  });
276
+ expect(
277
+ screen.getByText(
278
+ 'We are waiting for the signature to be validated from our signature platform. It can take up to few minutes. Do not close this page.',
279
+ ),
280
+ ).toBeInTheDocument();
266
281
  expect(screen.getByRole('status')).toBeInTheDocument();
267
282
 
268
283
  checkSignatureDeferred.resolve({ isSigned: false });
@@ -50,6 +50,12 @@ export const messages = defineMessages({
50
50
  description: 'Message displayed inside the contract signin modal when polling the order.',
51
51
  id: 'components.DashboardItem.Order.ContractFrame.polling',
52
52
  },
53
+ pollingDescription: {
54
+ defaultMessage:
55
+ 'We are waiting for the signature to be validated from our signature platform. It can take up to few minutes. Do not close this page.',
56
+ description: 'Message displayed inside the contract signin modal when polling the order.',
57
+ id: 'components.DashboardItem.Order.ContractFrame.pollingDescription',
58
+ },
53
59
  finishedCaption: {
54
60
  defaultMessage: 'Congratulations!',
55
61
  description: 'Title displayed inside the contract signin modal when the contract is signed.',
@@ -251,9 +257,14 @@ const ContractFrameContent = ({
251
257
  )}
252
258
  {step === ContractSteps.POLLING && (
253
259
  <div className="ContractFrame__loading-container">
254
- <h3 className="ContractFrame__caption">
255
- <FormattedMessage {...messages.polling} />
256
- </h3>
260
+ <div>
261
+ <h3 className="ContractFrame__caption">
262
+ <FormattedMessage {...messages.polling} />
263
+ </h3>
264
+ <p className="ContractFrame__content">
265
+ <FormattedMessage {...messages.pollingDescription} />
266
+ </p>
267
+ </div>
257
268
  <Loader />
258
269
  </div>
259
270
  )}
@@ -94,11 +94,11 @@ describe('OrganizationContractFrame', () => {
94
94
  user: true,
95
95
  queriesCallback: (queries) => {
96
96
  // Push contract and orders queries
97
- queries.push(QueryStateFactory(['user', 'contracts'], { data: [] }));
97
+ queries.push(QueryStateFactory(['user', 'organization_contracts'], { data: [] }));
98
98
  },
99
99
  });
100
100
 
101
- let contractsQueryState = client.getQueryState(['user', 'contracts']);
101
+ let contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
102
102
  expect(contractsQueryState?.isInvalidated).toBe(false);
103
103
 
104
104
  await act(async () => {
@@ -126,7 +126,7 @@ describe('OrganizationContractFrame', () => {
126
126
 
127
127
  // onDone should be tweaked to invalidate the user orders and contracts queries
128
128
  // and passed down to AbstractContractFrame
129
- contractsQueryState = client.getQueryState(['user', 'contracts']);
129
+ contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
130
130
  expect(contractsQueryState?.isInvalidated).toBe(true);
131
131
  expect(handleDone).toHaveBeenCalledTimes(1);
132
132
 
@@ -158,11 +158,11 @@ describe('OrganizationContractFrame', () => {
158
158
  user: true,
159
159
  queriesCallback: (queries) => {
160
160
  // Push contract and orders queries
161
- queries.push(QueryStateFactory(['user', 'contracts'], { data: [] }));
161
+ queries.push(QueryStateFactory(['user', 'organization_contracts'], { data: [] }));
162
162
  },
163
163
  });
164
164
 
165
- let contractsQueryState = client.getQueryState(['user', 'contracts']);
165
+ let contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
166
166
  expect(contractsQueryState?.isInvalidated).toBe(false);
167
167
 
168
168
  await act(async () => {
@@ -191,7 +191,7 @@ describe('OrganizationContractFrame', () => {
191
191
 
192
192
  // onDone should be tweaked to invalidate the user orders and contracts queries
193
193
  // and passed down to AbstractContractFrame
194
- contractsQueryState = client.getQueryState(['user', 'contracts']);
194
+ contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
195
195
  expect(contractsQueryState?.isInvalidated).toBe(true);
196
196
  expect(handleDone).toHaveBeenCalledTimes(1);
197
197
 
@@ -45,7 +45,7 @@ const OrganizationContractFrame = ({ organizationId, contractIds, onDone, ...pro
45
45
  };
46
46
 
47
47
  const onDoneWithInvalidation = () => {
48
- queryClient.invalidateQueries({ queryKey: ['user', 'contracts'] });
48
+ queryClient.invalidateQueries({ queryKey: ['user', 'organization_contracts'] });
49
49
  onDone?.();
50
50
  };
51
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "2.25.0-b2.dev25",
3
+ "version": "2.25.0-b2.dev27",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {