Skip to content

Commit fd89a76

Browse files
committed
CCM-10387: ownership by default
1 parent 4abc3e0 commit fd89a76

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

lambdas/backend-api/src/__tests__/templates/app/template-client.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('templateClient', () => {
183183
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
184184
data,
185185
user,
186-
false,
186+
true,
187187
'NOT_YET_SUBMITTED',
188188
undefined
189189
);
@@ -235,7 +235,7 @@ describe('templateClient', () => {
235235
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
236236
data,
237237
user,
238-
false,
238+
true,
239239
'NOT_YET_SUBMITTED',
240240
undefined
241241
);
@@ -293,7 +293,7 @@ describe('templateClient', () => {
293293
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
294294
data,
295295
user,
296-
false,
296+
true,
297297
'NOT_YET_SUBMITTED',
298298
'campaignId'
299299
);
@@ -401,15 +401,15 @@ describe('templateClient', () => {
401401
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
402402
{ ...dataWithFiles, proofingEnabled: true },
403403
user,
404-
false,
404+
true,
405405
'PENDING_UPLOAD',
406406
'campaignId'
407407
);
408408

409409
expect(mocks.letterUploadRepository.upload).toHaveBeenCalledWith(
410410
templateId,
411411
user,
412-
false,
412+
true,
413413
versionId,
414414
pdf,
415415
csv
@@ -550,7 +550,7 @@ describe('templateClient', () => {
550550
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
551551
{ ...dataWithFiles, proofingEnabled: expected },
552552
user,
553-
false,
553+
true,
554554
'PENDING_UPLOAD',
555555
'campaignId'
556556
);
@@ -799,7 +799,7 @@ describe('templateClient', () => {
799799
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
800800
{ ...dataWithFiles, proofingEnabled: false },
801801
user,
802-
false,
802+
true,
803803
'PENDING_UPLOAD',
804804
undefined
805805
);
@@ -925,15 +925,15 @@ describe('templateClient', () => {
925925
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
926926
{ ...dataWithFiles, proofingEnabled: false },
927927
user,
928-
false,
928+
true,
929929
'PENDING_UPLOAD',
930930
undefined
931931
);
932932

933933
expect(mocks.letterUploadRepository.upload).toHaveBeenCalledWith(
934934
templateId,
935935
user,
936-
false,
936+
true,
937937
versionId,
938938
pdf,
939939
undefined
@@ -1015,15 +1015,15 @@ describe('templateClient', () => {
10151015
expect(mocks.templateRepository.create).toHaveBeenCalledWith(
10161016
{ ...dataWithFiles, proofingEnabled: false },
10171017
user,
1018-
false,
1018+
true,
10191019
'PENDING_UPLOAD',
10201020
undefined
10211021
);
10221022

10231023
expect(mocks.letterUploadRepository.upload).toHaveBeenCalledWith(
10241024
templateId,
10251025
user,
1026-
false,
1026+
true,
10271027
versionId,
10281028
pdf,
10291029
undefined

lambdas/backend-api/src/templates/app/template-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class TemplateClient {
7979
const createResult = await this.templateRepository.create(
8080
validationResult.data,
8181
user,
82-
clientConfigurationResult.data?.features.clientOwnership || false,
82+
clientConfigurationResult.data?.features.clientOwnership ?? true,
8383
'NOT_YET_SUBMITTED',
8484
clientConfigurationResult.data?.campaignId
8585
);
@@ -189,7 +189,7 @@ export class TemplateClient {
189189
};
190190

191191
const clientOwnershipEnabled =
192-
clientConfigurationResult.data?.features.clientOwnership || false;
192+
clientConfigurationResult.data?.features.clientOwnership ?? true;
193193

194194
const createResult = await this.templateRepository.create(
195195
letterTemplateFields,

tests/accessibility/test-user-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class TestUserClient {
2828
new PutParameterCommand({
2929
Name: `${this.clientSsmPathPrefix}/${clientId}`,
3030
Value: JSON.stringify({
31-
features: { proofing: true, clientOwnership: true },
31+
features: { proofing: true },
3232
campaignId: 'accessibility-test-campaign',
3333
} satisfies ClientConfiguration),
3434
Overwrite: true,

tests/test-team/helpers/client/client-helper.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
type ClientConfiguration = {
88
features: {
99
proofing: boolean;
10-
clientOwnership: boolean;
10+
clientOwnership?: boolean;
1111
};
1212
campaignId?: string;
1313
};
@@ -24,7 +24,6 @@ export const testClients = {
2424
campaignId: 'Campaign1',
2525
features: {
2626
proofing: true,
27-
clientOwnership: true,
2827
},
2928
},
3029
/**
@@ -34,7 +33,6 @@ export const testClients = {
3433
campaignId: 'Campaign2',
3534
features: {
3635
proofing: false,
37-
clientOwnership: true,
3836
},
3937
},
4038
/**
@@ -48,7 +46,6 @@ export const testClients = {
4846
campaignId: undefined,
4947
features: {
5048
proofing: false,
51-
clientOwnership: true,
5249
},
5350
},
5451
/**

0 commit comments

Comments
 (0)