diff --git a/src/data/services/LmsApiService.js b/src/data/services/LmsApiService.js index 7fd5fc65e7..40a388e1a6 100644 --- a/src/data/services/LmsApiService.js +++ b/src/data/services/LmsApiService.js @@ -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) { diff --git a/src/data/services/tests/LmsApiService.test.js b/src/data/services/tests/LmsApiService.test.js index b74d78846e..67d86e4590 100644 --- a/src/data/services/tests/LmsApiService.test.js +++ b/src/data/services/tests/LmsApiService.test.js @@ -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', + }], + }, + }); + }); });