Skip to content

Commit f979a70

Browse files
committed
CCM-12744: fixes
1 parent df1b8ec commit f979a70

File tree

5 files changed

+26
-23
lines changed

5 files changed

+26
-23
lines changed

lambdas/backend-client/src/routing-config-api-client.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,10 @@ export const routingConfigurationApiClient = {
132132
routingConfig: UpdateRoutingConfig,
133133
lockNumber: number
134134
): Promise<Result<RoutingConfig>> {
135-
if (!uuidSchema.safeParse(id).success) {
136-
return {
137-
error: {
138-
errorMeta: {
139-
code: ErrorCase.VALIDATION_FAILED,
140-
description: 'Invalid routing configuration ID format',
141-
details: { id },
142-
},
143-
actualError: undefined,
144-
},
145-
};
146-
}
147-
const url = `/v1/routing-configuration/${id}` satisfies OpenApiToTemplate<
148-
PatchV1RoutingConfigurationByRoutingConfigIdData['url']
149-
>;
135+
const url =
136+
`/v1/routing-configuration/${encodeURIComponent(id)}` satisfies OpenApiToTemplate<
137+
PatchV1RoutingConfigurationByRoutingConfigIdData['url']
138+
>;
150139

151140
const { data, error } = await catchAxiosError(
152141
httpClient.patch<RoutingConfigSuccess>(url, routingConfig, {

tests/test-team/pages/template-mgmt-base-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export abstract class TemplateMgmtBasePage {
205205
: this.pathTemplate;
206206

207207
const regexPattern = normalizedPathTemplate.replaceAll(
208-
/:([A-Za-z][\dA-z]*)/g,
208+
/:([A-Za-z][\dA-Za-z]*)/g,
209209
'([^/]+)'
210210
);
211211

tests/test-team/template-mgmt-accessibility/routing.accessibility.spec.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,22 @@ test.describe('Routing - Accessibility', () => {
113113
});
114114

115115
test('Create message plan', async ({ page, analyze }) =>
116-
analyze(new RoutingCreateMessagePlanPage(page)));
116+
analyze(
117+
new RoutingCreateMessagePlanPage(page).setSearchParam(
118+
'messageOrder',
119+
messageOrder
120+
)
121+
));
117122

118123
test('Create message plan - error', async ({ page, analyze }) =>
119-
analyze(new RoutingCreateMessagePlanPage(page), {
120-
beforeAnalyze: (p) => p.clickSubmit(),
121-
}));
124+
analyze(
125+
new RoutingCreateMessagePlanPage(page).setSearchParam(
126+
'messageOrder',
127+
messageOrder
128+
),
129+
{
130+
beforeAnalyze: (p) => p.clickSubmit(),
131+
}
132+
));
122133
});
123134
});

tests/test-team/template-mgmt-e2e-tests/template-mgmt-letter-full.e2e.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ function requestProof(
237237
expect(entry, JSON.stringify(pdfHrefs[i])).not.toBeNull();
238238
}
239239

240+
await page.reload();
241+
240242
await previewTemplatePage.clickContinueButton();
241243
}).toPass({ timeout: 60_000 });
242244

tests/test-team/template-mgmt-event-tests/routing-config.event.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@ test.describe('Event publishing - Routing Config', () => {
2828
test('Expect no events', async ({ request }) => {
2929
const id = randomUUID();
3030

31+
const messagePlan = RoutingConfigFactory.create(user, { id }).dbEntry;
32+
3133
const start = new Date();
3234

33-
await storageHelper.seed([
34-
RoutingConfigFactory.create(user, { id }).dbEntry,
35-
]);
35+
await storageHelper.seed([messagePlan]);
3636

3737
const submittedResponse = await request.patch(
3838
`${process.env.API_BASE_URL}/v1/routing-configuration/${id}/submit`,
3939
{
4040
headers: {
4141
Authorization: await user.getAccessToken(),
42+
'X-Lock-Number': String(messagePlan.lockNumber),
4243
},
4344
}
4445
);

0 commit comments

Comments
 (0)