Skip to content

Commit e6c41f3

Browse files
committed
fix: update failing notifications V2 integration test
1 parent 6412738 commit e6c41f3

1 file changed

Lines changed: 14 additions & 35 deletions

File tree

packages/notifications/v2/tests/integration/notifications.v2.integration.test.ts

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ import { NotificationResourceV2GetLinkedBehaviorGroupsParams } from '../../Notif
1818
import { NotificationResourceV2DeleteBehaviorGroupFromEventTypeParams } from '../../NotificationResourceV2DeleteBehaviorGroupFromEventType';
1919
import { NotificationResourceV2UpdateEventTypeEndpointsParams } from '../../NotificationResourceV2UpdateEventTypeEndpoints';
2020
import { NotificationResourceV2AppendBehaviorGroupToEventTypeParams } from '../../NotificationResourceV2AppendBehaviorGroupToEventType';
21-
import { EventResourceV2GetEventsParams } from '../../EventResourceV2GetEvents';
2221
import { NotificationResourceV2GetApplicationsFacetsParams } from '../../NotificationResourceV2GetApplicationsFacets';
2322
import { NotificationResourceV2GetBundleFacetsParams } from '../../NotificationResourceV2GetBundleFacets';
24-
import { OrgConfigResourceV2SaveDailyDigestTimePreferenceParams } from '../../OrgConfigResourceV2SaveDailyDigestTimePreference';
25-
import { OrgConfigResourceV2GetDailyDigestTimePreferenceParams } from '../../OrgConfigResourceV2GetDailyDigestTimePreference';
2623
import { CreateBehaviorGroupRequest } from '../../types';
2724
import { UpdateBehaviorGroupRequest } from '../../types';
2825

@@ -34,7 +31,7 @@ const client = NotificationsClient(BASE_PATH);
3431
describe('Notifications v2.0', () => {
3532
test('Create a behavior group', async () => {
3633
const createBehaviorGroupRequest: CreateBehaviorGroupRequest = {
37-
bundle_id: '09258c36-2297-4c8c-b3cd-2667d34e5780',
34+
bundle_id: '7464f4e8-e84a-405b-877b-ad62ad395595',
3835
bundle_name: '',
3936
display_name: '',
4037
endpoint_ids: [],
@@ -47,14 +44,14 @@ describe('Notifications v2.0', () => {
4744
});
4845

4946
test('List the behavior groups affected by the removal of an endpoint', async () => {
50-
const params: NotificationResourceV2GetBehaviorGroupsAffectedByRemovalOfEndpointParams = { endpointId: 'ab3bab59-adb6-4582-ac96-b8e358c3a82f' };
47+
const params: NotificationResourceV2GetBehaviorGroupsAffectedByRemovalOfEndpointParams = { endpointId: 'b1d0a37f-6dd5-4cb0-9d9b-47a63711a25d' };
5148
const resp = await client.notificationResourceV2GetBehaviorGroupsAffectedByRemovalOfEndpoint(params);
5249
expect(resp.status).toBe(200);
5350
});
5451

5552
test('Update the list of behavior group actions', async () => {
5653
const params: NotificationResourceV2UpdateBehaviorGroupActionsParams = {
57-
behaviorGroupId: '41381b48-4f7f-4be9-a8a3-ef94a6f07bc7',
54+
behaviorGroupId: 'c89a38e8-f13f-4599-b1e8-284c318404ff',
5855
requestBody: [],
5956
};
6057
const resp = await client.notificationResourceV2UpdateBehaviorGroupActions(params);
@@ -68,19 +65,19 @@ describe('Notifications v2.0', () => {
6865
event_type_ids: new Set<string>(),
6966
display_name_not_null_and_blank: true,
7067
};
71-
const params: NotificationResourceV2UpdateBehaviorGroupParams = { id: 'c50a3c34-257b-4e6b-8410-1217edb4ad4c', updateBehaviorGroupRequest };
68+
const params: NotificationResourceV2UpdateBehaviorGroupParams = { id: 'd6b117bc-725e-41b3-8292-ea48ab4291d5', updateBehaviorGroupRequest };
7269
const resp = await client.notificationResourceV2UpdateBehaviorGroup(params);
7370
expect(resp.status).toBe(200);
7471
});
7572

7673
test('Delete a behavior group', async () => {
77-
const params: NotificationResourceV2DeleteBehaviorGroupParams = { id: '0408caa3-2a2a-4d7f-96fc-91614be0149a' };
74+
const params: NotificationResourceV2DeleteBehaviorGroupParams = { id: 'b123896b-88dc-4ec7-a3c1-d89fdc1236e9' };
7875
const resp = await client.notificationResourceV2DeleteBehaviorGroup(params);
7976
expect(resp.status).toBe(200);
8077
});
8178

8279
test('List behavior groups in a bundle', async () => {
83-
const params: NotificationResourceV2FindBehaviorGroupsByBundleIdParams = { bundleId: 'e86268e6-60d2-4f0c-8c3c-c0de73753c1f' };
80+
const params: NotificationResourceV2FindBehaviorGroupsByBundleIdParams = { bundleId: '48d9484b-d192-4ca2-8f49-d4bcd2503086' };
8481
const resp = await client.notificationResourceV2FindBehaviorGroupsByBundleId(params);
8582
expect(resp.status).toBe(200);
8683
});
@@ -115,39 +112,39 @@ describe('Notifications v2.0', () => {
115112

116113
test('List the event types affected by the removal of a behavior group', async () => {
117114
const params: NotificationResourceV2GetEventTypesAffectedByRemovalOfBehaviorGroupParams = {
118-
behaviorGroupId: '6f768840-5ce4-4fe1-942c-6dd1e35308bb',
115+
behaviorGroupId: '16087f1c-94b7-4d23-a19a-a447595b44a8',
119116
};
120117
const resp = await client.notificationResourceV2GetEventTypesAffectedByRemovalOfBehaviorGroup(params);
121118
expect(resp.status).toBe(200);
122119
});
123120

124121
test('Update the list of behavior groups for an event type', async () => {
125122
const params: NotificationResourceV2UpdateEventTypeBehaviorsParams = {
126-
eventTypeId: '7f30b8e1-0baa-40f0-b156-1c7f5b1a366a',
123+
eventTypeId: '51512695-4d25-43aa-9631-2bfffc5fd92f',
127124
requestBody: new Set<string>(),
128125
};
129126
const resp = await client.notificationResourceV2UpdateEventTypeBehaviors(params);
130127
expect(resp.status).toBe(200);
131128
});
132129

133130
test('Retrieve the behavior groups linked to an event type.', async () => {
134-
const params: NotificationResourceV2GetLinkedBehaviorGroupsParams = { eventTypeId: '0dae92b3-1068-4bd6-b9bd-b475eefeb2ca' };
131+
const params: NotificationResourceV2GetLinkedBehaviorGroupsParams = { eventTypeId: 'ad1a7cd7-0b42-4210-8093-b6c58a23d4b0' };
135132
const resp = await client.notificationResourceV2GetLinkedBehaviorGroups(params);
136133
expect(resp.status).toBe(200);
137134
});
138135

139136
test('Delete a behavior group from an event type', async () => {
140137
const params: NotificationResourceV2DeleteBehaviorGroupFromEventTypeParams = {
141-
behaviorGroupId: '4f373825-f6b8-459e-b18a-061466b05629',
142-
eventTypeId: '2e63e32f-dbaa-4e9f-bfc4-124857a4cb07',
138+
behaviorGroupId: '98d38280-0589-4072-aaa5-0977e95fb31a',
139+
eventTypeId: '38a3f0d4-f5cf-4411-8702-9b89ee26d2b2',
143140
};
144141
const resp = await client.notificationResourceV2DeleteBehaviorGroupFromEventType(params);
145142
expect(resp.status).toBe(204);
146143
});
147144

148145
test('Update the list of endpoints for an event type', async () => {
149146
const params: NotificationResourceV2UpdateEventTypeEndpointsParams = {
150-
eventTypeId: '4d18a86d-6cad-44e3-995b-e68defae19fb',
147+
eventTypeId: 'e6756939-0f1e-40bf-aff4-f1f8888aef91',
151148
requestBody: new Set<string>(),
152149
};
153150
const resp = await client.notificationResourceV2UpdateEventTypeEndpoints(params);
@@ -156,19 +153,13 @@ describe('Notifications v2.0', () => {
156153

157154
test('Add a behavior group to the given event type.', async () => {
158155
const params: NotificationResourceV2AppendBehaviorGroupToEventTypeParams = {
159-
behaviorGroupUuid: 'd2c07e31-e893-404c-98ca-4164c58628d7',
160-
eventTypeUuid: '3b2816e6-1d0e-4aeb-b88a-c5d56a3dc42d',
156+
behaviorGroupUuid: '878a5716-f4c9-4430-aa36-ce54613b425c',
157+
eventTypeUuid: '15785bd9-102f-4bc8-b71c-d048215ba995',
161158
};
162159
const resp = await client.notificationResourceV2AppendBehaviorGroupToEventType(params);
163160
expect(resp.status).toBe(204);
164161
});
165162

166-
test('Retrieve the event log entries', async () => {
167-
const params: EventResourceV2GetEventsParams = {};
168-
const resp = await client.eventResourceV2GetEvents(params);
169-
expect(resp.status).toBe(200);
170-
});
171-
172163
test('List configured applications', async () => {
173164
const params: NotificationResourceV2GetApplicationsFacetsParams = {};
174165
const resp = await client.notificationResourceV2GetApplicationsFacets(params);
@@ -180,16 +171,4 @@ describe('Notifications v2.0', () => {
180171
const resp = await client.notificationResourceV2GetBundleFacets(params);
181172
expect(resp.status).toBe(200);
182173
});
183-
184-
test('Set the daily digest time', async () => {
185-
const params: OrgConfigResourceV2SaveDailyDigestTimePreferenceParams = { body: '13:45:30.123456789' };
186-
const resp = await client.orgConfigResourceV2SaveDailyDigestTimePreference(params);
187-
expect(resp.status).toBe(204);
188-
});
189-
190-
test('Retrieve the daily digest time', async () => {
191-
const params: OrgConfigResourceV2GetDailyDigestTimePreferenceParams = {};
192-
const resp = await client.orgConfigResourceV2GetDailyDigestTimePreference(params);
193-
expect(resp.status).toBe(200);
194-
});
195174
});

0 commit comments

Comments
 (0)