Skip to content

Commit

Permalink
feat: update pagination for reporting configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
jajjibhai008 committed Dec 3, 2024
1 parent 927f8c0 commit 7d6cf54
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/services/LmsApiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class LmsApiService {
}

static fetchReportingConfigs(uuid) {
return LmsApiService.apiClient().get(`${LmsApiService.reportingConfigUrl}?enterprise_customer=${uuid}`);
return LmsApiService.apiClient().get(`${LmsApiService.reportingConfigUrl}?enterprise_customer=${uuid}&page_size=100`);
}

static fetchReportingConfigTypes(uuid) {
Expand Down
25 changes: 25 additions & 0 deletions src/data/services/tests/LmsApiService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,29 @@ describe('LmsApiService', () => {
},
});
});
test('fetchReportingConfigs returns reporting configs', async () => {
axios.get.mockResolvedValue({
status: 200,
data: {
results: [{
active: true,
data_type: 'test-data-type',
uuid: 'test-uuid',
enterprise_customer: 'test-enterprise-customer',
}],
},
});
const response = await LmsApiService.fetchReportingConfigs();
expect(response).toEqual({
status: 200,
data: {
results: [{
active: true,
data_type: 'test-data-type',
uuid: 'test-uuid',
enterprise_customer: 'test-enterprise-customer',
}],
},
});
});
});

0 comments on commit 7d6cf54

Please sign in to comment.