FINERACT-1541: Pentaho reports converted to table format

This commit is contained in:
logoutdhaval
2022-07-05 14:34:28 +05:30
parent b44a2f2b14
commit e90dd49c81
3 changed files with 282 additions and 1 deletions
@@ -37,4 +37,5 @@
<include file="parts/0015_add_business_date.xml" relativeToChangelogFile="true"/>
<include file="parts/0016_changed_unique_constraint_of_ref_no.xml" relativeToChangelogFile="true"/>
<include file="parts/0017_fix_stretchy_reports.xml" relativeToChangelogFile="true"/>
<include file="parts/0018_pentaho_reports_to_table.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
File diff suppressed because one or more lines are too long
@@ -23,6 +23,8 @@ import java.util.Map;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.ResponseBody;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -33,9 +35,14 @@ import org.junit.jupiter.api.Test;
*/
public class ReportsTest extends IntegrationTest {
@BeforeEach
public void setup() {
Utils.initializeRESTAssured();
}
@Test
void listReports() {
assertThat(ok(fineract().reports.retrieveReportList())).hasSize(120);
assertThat(ok(fineract().reports.retrieveReportList())).hasSize(124);
}
@Test
@@ -69,4 +76,30 @@ public class ReportsTest extends IntegrationTest {
"2013-04-30", "R_loanOfficerId", "-1", "R_officeId", "1", "R_startDate", "2013-04-16", "output-type", "PDF"), false));
assertThat(r.contentType()).isEqualTo(MediaType.get("application/pdf"));
}
@Test
void testTrialBalanceTableReportRunsSuccessfully() {
assertThat(fineract().reportsRun.runReportGetData("Trial Balance Table",
Map.of("R_endDate", "2013-04-30", "R_officeId", "1", "R_startDate", "2013-04-16"), false)).hasHttpStatus(200);
}
@Test
void testIncomeStatementTableReportRunsSuccessfully() {
assertThat(fineract().reportsRun.runReportGetData("Income Statement Table",
Map.of("R_endDate", "2013-04-30", "R_officeId", "1", "R_startDate", "2013-04-16"), false)).hasHttpStatus(200);
}
@Test
void testGeneralLedgerReportTableReportRunsSuccessfully() {
assertThat(fineract().reportsRun.runReportGetData("GeneralLedgerReport Table",
Map.of("R_endDate", "2013-04-30", "R_officeId", "1", "R_startDate", "2013-04-16", "R_GLAccountNO", "1"), false))
.hasHttpStatus(200);
}
@Test
void testBalanceSheetTableReportRunsSuccessfully() {
assertThat(
fineract().reportsRun.runReportGetData("Balance Sheet Table", Map.of("R_endDate", "2013-04-30", "R_officeId", "1"), false))
.hasHttpStatus(200);
}
}