Skip to content

Commit c103649

Browse files
CM-11976: Fix tests
1 parent 0640bce commit c103649

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test.describe('Event publishing - Routing Config', () => {
3030
cascadeGroups: ['standard'],
3131
channel: 'NHSAPP',
3232
channelType: 'primary',
33-
defaultTemplateId: 'template-id',
33+
defaultTemplateId: 'b1854a33-fc1b-4e7d-99d0-6f7b92b8c530',
3434
},
3535
],
3636
}).apiPayload;
@@ -73,8 +73,6 @@ test.describe('Event publishing - Routing Config', () => {
7373
await expect(async () => {
7474
const events = await eventCacheHelper.findEvents(start, [id]);
7575

76-
expect(events).toHaveLength(2);
77-
7876
expect(events).toContainEqual(
7977
expect.objectContaining({
8078
type: 'uk.nhs.notify.template-management.RoutingConfigDrafted.v1',
@@ -94,6 +92,8 @@ test.describe('Event publishing - Routing Config', () => {
9492
}),
9593
})
9694
);
95+
96+
expect(events).toHaveLength(2);
9797
}).toPass({ timeout: 60_000 });
9898
});
9999

@@ -104,7 +104,7 @@ test.describe('Event publishing - Routing Config', () => {
104104
cascadeGroups: ['standard'],
105105
channel: 'NHSAPP',
106106
channelType: 'primary',
107-
defaultTemplateId: 'template-id',
107+
defaultTemplateId: 'b1854a33-fc1b-4e7d-99d0-6f7b92b8c530',
108108
},
109109
],
110110
}).apiPayload;
@@ -147,8 +147,6 @@ test.describe('Event publishing - Routing Config', () => {
147147
await expect(async () => {
148148
const events = await eventCacheHelper.findEvents(start, [id]);
149149

150-
expect(events).toHaveLength(2);
151-
152150
expect(events).toContainEqual(
153151
expect.objectContaining({
154152
type: 'uk.nhs.notify.template-management.RoutingConfigDrafted.v1',
@@ -168,6 +166,8 @@ test.describe('Event publishing - Routing Config', () => {
168166
}),
169167
})
170168
);
169+
170+
expect(events).toHaveLength(2);
171171
}).toPass({ timeout: 60_000 });
172172
});
173173
});

0 commit comments

Comments
 (0)