@velocitycareerlabs/server-careerwallet 1.25.0-dev-build.1f7bc3c94 → 1.25.0-dev-build.125ef3c19
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 +22 -22
- package/test/feedback-controller.test.js +19 -23
- package/test/verification-controller.test.js +11 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocitycareerlabs/server-careerwallet",
|
|
3
|
-
"version": "1.25.0-dev-build.
|
|
3
|
+
"version": "1.25.0-dev-build.125ef3c19",
|
|
4
4
|
"description": "Career Wallet application",
|
|
5
5
|
"repository": "https://github.com/velocitycareerlabs/packages",
|
|
6
6
|
"engines": {
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
"@fastify/static": "7.0.4",
|
|
30
30
|
"@getyoti/sdk-sandbox": "1.7.0",
|
|
31
31
|
"@spencejs/spence-mongo-repos": "^0.10.2",
|
|
32
|
-
"@velocitycareerlabs/auth": "1.25.0-dev-build.
|
|
33
|
-
"@velocitycareerlabs/aws-clients": "1.25.0-dev-build.
|
|
34
|
-
"@velocitycareerlabs/common-fetchers": "1.25.0-dev-build.
|
|
35
|
-
"@velocitycareerlabs/common-functions": "1.25.0-dev-build.
|
|
36
|
-
"@velocitycareerlabs/common-schemas": "1.25.0-dev-build.
|
|
37
|
-
"@velocitycareerlabs/config": "1.25.0-dev-build.
|
|
38
|
-
"@velocitycareerlabs/country-data": "1.25.0-dev-build.
|
|
39
|
-
"@velocitycareerlabs/crypto": "1.25.0-dev-build.
|
|
40
|
-
"@velocitycareerlabs/did-doc": "1.25.0-dev-build.
|
|
41
|
-
"@velocitycareerlabs/fastify-plugins": "1.25.0-dev-build.
|
|
42
|
-
"@velocitycareerlabs/jwt": "1.25.0-dev-build.
|
|
43
|
-
"@velocitycareerlabs/migrations": "1.25.0-dev-build.
|
|
44
|
-
"@velocitycareerlabs/organizations-registry": "1.25.0-dev-build.
|
|
45
|
-
"@velocitycareerlabs/request": "1.25.0-dev-build.
|
|
46
|
-
"@velocitycareerlabs/server-provider": "1.25.0-dev-build.
|
|
47
|
-
"@velocitycareerlabs/spencer-mongo-extensions": "1.25.0-dev-build.
|
|
48
|
-
"@velocitycareerlabs/verifiable-credentials": "1.25.0-dev-build.
|
|
49
|
-
"@velocitycareerlabs/yoti-integration-plugin": "1.25.0-dev-build.
|
|
32
|
+
"@velocitycareerlabs/auth": "1.25.0-dev-build.1aa784b06",
|
|
33
|
+
"@velocitycareerlabs/aws-clients": "1.25.0-dev-build.1aa784b06",
|
|
34
|
+
"@velocitycareerlabs/common-fetchers": "1.25.0-dev-build.1aa784b06",
|
|
35
|
+
"@velocitycareerlabs/common-functions": "1.25.0-dev-build.1aa784b06",
|
|
36
|
+
"@velocitycareerlabs/common-schemas": "1.25.0-dev-build.1aa784b06",
|
|
37
|
+
"@velocitycareerlabs/config": "1.25.0-dev-build.1aa784b06",
|
|
38
|
+
"@velocitycareerlabs/country-data": "1.25.0-dev-build.1aa784b06",
|
|
39
|
+
"@velocitycareerlabs/crypto": "1.25.0-dev-build.1aa784b06",
|
|
40
|
+
"@velocitycareerlabs/did-doc": "1.25.0-dev-build.1aa784b06",
|
|
41
|
+
"@velocitycareerlabs/fastify-plugins": "1.25.0-dev-build.1aa784b06",
|
|
42
|
+
"@velocitycareerlabs/jwt": "1.25.0-dev-build.1aa784b06",
|
|
43
|
+
"@velocitycareerlabs/migrations": "1.25.0-dev-build.125ef3c19",
|
|
44
|
+
"@velocitycareerlabs/organizations-registry": "1.25.0-dev-build.1aa784b06",
|
|
45
|
+
"@velocitycareerlabs/request": "1.25.0-dev-build.1aa784b06",
|
|
46
|
+
"@velocitycareerlabs/server-provider": "1.25.0-dev-build.1aa784b06",
|
|
47
|
+
"@velocitycareerlabs/spencer-mongo-extensions": "1.25.0-dev-build.1aa784b06",
|
|
48
|
+
"@velocitycareerlabs/verifiable-credentials": "1.25.0-dev-build.1aa784b06",
|
|
49
|
+
"@velocitycareerlabs/yoti-integration-plugin": "1.25.0-dev-build.125ef3c19",
|
|
50
50
|
"aws-sdk": "2.1692.0",
|
|
51
51
|
"canonicalize": "^2.0.0",
|
|
52
52
|
"date-fns": "^3.0.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@aws-sdk/client-ses": "3.758.0",
|
|
66
66
|
"@aws-sdk/client-sns": "3.758.0",
|
|
67
67
|
"@spencejs/spence-factories": "0.10.2",
|
|
68
|
-
"@velocitycareerlabs/test-regexes": "1.25.0-dev-build.
|
|
69
|
-
"@velocitycareerlabs/tests-helpers": "1.25.0-dev-build.
|
|
68
|
+
"@velocitycareerlabs/test-regexes": "1.25.0-dev-build.1aa784b06",
|
|
69
|
+
"@velocitycareerlabs/tests-helpers": "1.25.0-dev-build.1aa784b06",
|
|
70
70
|
"dotenv": "16.4.7",
|
|
71
71
|
"eslint": "8.57.1",
|
|
72
72
|
"eslint-config-airbnb-base": "14.2.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"nodemon": "3.1.9",
|
|
83
83
|
"prettier": "2.8.8"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "80b773908c69a68bf414622cf9be7ca614399ae0"
|
|
86
86
|
}
|
|
@@ -2,14 +2,19 @@ require('aws-sdk');
|
|
|
2
2
|
const { errorResponseMatcher } = require('@velocitycareerlabs/tests-helpers');
|
|
3
3
|
const buildFastify = require('./helpers/careerwallet-build-fastify');
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
5
|
+
const mockSendEmailNotificationNotification = jest.fn(() => {});
|
|
6
|
+
jest.mock('@velocitycareerlabs/aws-clients', () => {
|
|
7
|
+
const fp = require('fastify-plugin');
|
|
8
|
+
return {
|
|
9
|
+
...jest.requireActual('@velocitycareerlabs/aws-clients'),
|
|
10
|
+
sendEmailPlugin: fp(async (fastify) => {
|
|
11
|
+
fastify.decorate('sendEmail', mockSendEmailNotificationNotification);
|
|
12
|
+
}),
|
|
13
|
+
initSendEmailNotification: jest.fn(
|
|
14
|
+
() => mockSendEmailNotificationNotification
|
|
15
|
+
),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
13
18
|
|
|
14
19
|
describe('Feedback controller test suite', () => {
|
|
15
20
|
let fastify;
|
|
@@ -196,17 +201,11 @@ describe('Feedback controller test suite', () => {
|
|
|
196
201
|
});
|
|
197
202
|
|
|
198
203
|
expect(response.statusCode).toEqual(204);
|
|
199
|
-
expect(
|
|
200
|
-
expect(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
ReplyToAddresses: [undefined],
|
|
205
|
-
Source: 'no-reply@velocitynetwork.foundation',
|
|
206
|
-
Message: {
|
|
207
|
-
Body: {
|
|
208
|
-
Text: {
|
|
209
|
-
Data: `
|
|
204
|
+
expect(mockSendEmailNotificationNotification).toHaveBeenCalledTimes(1);
|
|
205
|
+
expect(mockSendEmailNotificationNotification).toHaveBeenCalledWith({
|
|
206
|
+
recipients: ['vcl.devnet@gmail.com'],
|
|
207
|
+
sender: 'no-reply@velocitynetwork.foundation',
|
|
208
|
+
message: `
|
|
210
209
|
Support Request - Account Feedback.
|
|
211
210
|
User Information:
|
|
212
211
|
Account ID: accountId
|
|
@@ -218,10 +217,7 @@ Device Model: deviceModel
|
|
|
218
217
|
Device OS: deviceOS
|
|
219
218
|
IP Address: ip
|
|
220
219
|
`,
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
Subject: { Data: 'TEST: Support Request - Account Feedback.' },
|
|
224
|
-
},
|
|
220
|
+
subject: 'TEST: Support Request - Account Feedback.',
|
|
225
221
|
});
|
|
226
222
|
});
|
|
227
223
|
});
|
|
@@ -24,21 +24,17 @@ const {
|
|
|
24
24
|
incorrectScopeExpectation,
|
|
25
25
|
} = require('./helpers/access-token');
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
SNSClient: jest.fn().mockImplementation(() => ({
|
|
39
|
-
send: mockSend,
|
|
40
|
-
})),
|
|
41
|
-
}));
|
|
27
|
+
const mockSendEmailNotification = jest.fn(() => {});
|
|
28
|
+
jest.mock('@velocitycareerlabs/aws-clients', () => {
|
|
29
|
+
const fp = require('fastify-plugin');
|
|
30
|
+
return {
|
|
31
|
+
...jest.requireActual('@velocitycareerlabs/aws-clients'),
|
|
32
|
+
sendEmailPlugin: fp(async (fastify) => {
|
|
33
|
+
fastify.decorate('sendEmail', mockSendEmailNotification);
|
|
34
|
+
}),
|
|
35
|
+
initSendEmailNotification: jest.fn(() => mockSendEmailNotification),
|
|
36
|
+
};
|
|
37
|
+
});
|
|
42
38
|
|
|
43
39
|
describe('Email & Phone Verification', () => {
|
|
44
40
|
let fastify;
|