Skip to content

Commit e36aa22

Browse files
committed
Fix mock handlers for UserAccounts and Delegations GraphQL queries
1 parent 5071165 commit e36aa22

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

src/apps/ums.web-app/src/test/mocks/handlers.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,36 @@ export const handlers = [
2727
});
2828
}),
2929

30+
graphql.query('UserAccounts', () => {
31+
return HttpResponse.json({
32+
data: {
33+
getUserAccounts: {
34+
items: [],
35+
totalItems: 0,
36+
totalPages: 1,
37+
page: 1,
38+
pageSize: 20,
39+
},
40+
},
41+
});
42+
}),
43+
44+
graphql.query('DelegationsByDelegatedAdmin', () => {
45+
return HttpResponse.json({
46+
data: {
47+
getDelegationsByDelegatedAdmin: [],
48+
},
49+
});
50+
}),
51+
52+
graphql.query('DelegationsByDelegatingAdmin', () => {
53+
return HttpResponse.json({
54+
data: {
55+
getDelegationsByDelegatingAdmin: [],
56+
},
57+
});
58+
}),
59+
3060
// Catch-all for unmocked GraphQL queries to prevent 500 errors in Dev mode
3161
http.post('*/graphql', () => {
3262
return HttpResponse.json({

0 commit comments

Comments
 (0)