Skip to content

Commit a16967f

Browse files
authored
WS-2660: Update UAS resourceDomain to world-service-news for WS (#14027)
* feat: update source * test: uas related payload
1 parent 8bde2af commit a16967f

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/app/hooks/useUASButton/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe('useUASButton', () => {
163163
expect(mockUasApiRequest).toHaveBeenCalledWith('POST', 'favourites', {
164164
body: {
165165
activityType: 'favourites',
166-
resourceDomain: 'articles',
166+
resourceDomain: 'world-service-news',
167167
resourceType: 'article',
168168
resourceId: '123',
169169
action: 'favourited',
@@ -211,7 +211,7 @@ describe('useUASButton', () => {
211211
});
212212

213213
expect(mockUasApiRequest).toHaveBeenCalledWith('DELETE', 'favourites', {
214-
globalId: 'urn:bbc:articles:article:123',
214+
globalId: 'urn:bbc:world-service-news:article:123',
215215
});
216216
});
217217

src/app/lib/uasApi/getRecentActivity.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const mockActivityResponse = {
2424
activityType: 'favourites',
2525
resourceId: 'article1',
2626
resourceType: 'article',
27-
resourceDomain: 'articles',
27+
resourceDomain: 'world-service-news',
2828
created: '2026-02-15T18:30:05Z',
2929
action: 'favourited',
3030
metaData: {
@@ -33,13 +33,13 @@ const mockActivityResponse = {
3333
title: 'Article Title 1',
3434
locatorUrl: '/hindi/articles/article1',
3535
},
36-
'@id': 'urn:bbc:articles:article:article1',
36+
'@id': 'urn:bbc:world-service-news:article:article1',
3737
} as UasActivityItem,
3838
{
3939
activityType: 'favourites',
4040
resourceId: 'article2',
4141
resourceType: 'article',
42-
resourceDomain: 'articles',
42+
resourceDomain: 'world-service-news',
4343
created: '2026-02-12T11:12:52Z',
4444
action: 'favourited',
4545
metaData: {
@@ -48,7 +48,7 @@ const mockActivityResponse = {
4848
title: 'Article Title 2',
4949
locatorUrl: '/Hindi/articles/article2',
5050
},
51-
'@id': 'urn:bbc:articles:article:article2',
51+
'@id': 'urn:bbc:world-service-news:article:article2',
5252
} as UasActivityItem,
5353
],
5454
};
@@ -97,7 +97,7 @@ describe('getRecentActivity', () => {
9797
queryParams: {
9898
startIndex: 10,
9999
items: 10,
100-
resourceDomain: 'articles',
100+
resourceDomain: 'world-service-news',
101101
resourceType: 'article',
102102
action: 'favourited',
103103
},
@@ -116,7 +116,7 @@ describe('getRecentActivity', () => {
116116
queryParams: {
117117
startIndex: 0,
118118
items: 10,
119-
resourceDomain: 'articles',
119+
resourceDomain: 'world-service-news',
120120
resourceType: 'article',
121121
action: 'favourited',
122122
},
@@ -148,11 +148,11 @@ describe('getRecentActivity', () => {
148148
activityType: 'favourites',
149149
resourceId: 'article1',
150150
resourceType: 'article',
151-
resourceDomain: 'articles',
151+
resourceDomain: 'world-service-news',
152152
created: '2026-02-15T18:30:05Z',
153153
action: 'favourited',
154154
metaData: {},
155-
'@id': 'urn:bbc:articles:article:article1',
155+
'@id': 'urn:bbc:world-service-news:article:article1',
156156
} as UasActivityItem,
157157
],
158158
};
@@ -182,7 +182,7 @@ describe('getRecentActivity', () => {
182182
queryParams: {
183183
startIndex: 0,
184184
items: 10,
185-
resourceDomain: 'articles',
185+
resourceDomain: 'world-service-news',
186186
resourceType: 'article',
187187
action: 'favourited',
188188
},

src/app/lib/uasApi/uasUtility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface SavedArticle {
1717

1818
const FAVOURITES_CONFIG = {
1919
activityType: 'favourites',
20-
resourceDomain: 'articles',
20+
resourceDomain: 'world-service-news',
2121
resourceType: 'article',
2222
action: 'favourited',
2323
} as const;

0 commit comments

Comments
 (0)