use of org.openmrs.module.appframework.domain.Extension in project openmrs-module-mirebalais by PIH.
the class CustomAppLoaderTest method shouldCreateVisitActionsExtension.
@Test
public void shouldCreateVisitActionsExtension() {
Extension extension = CustomAppLoaderUtil.visitAction(CustomAppLoaderConstants.Extensions.ORDER_XRAY_VISIT_ACTION, "label", "icon", "link", "url", "privilege", "require");
assertThat(extension.getId(), is(CustomAppLoaderConstants.Extensions.ORDER_XRAY_VISIT_ACTION));
assertThat(extension.getLabel(), is("label"));
assertThat(extension.getIcon(), is("icon"));
assertThat(extension.getUrl(), is("url"));
assertThat(extension.getScript(), nullValue());
assertThat(extension.getRequiredPrivilege(), is("privilege"));
assertThat(extension.getRequire(), is("require"));
assertThat(extension.getType(), is("link"));
assertThat(extension.getExtensionPointId(), is(CustomAppLoaderConstants.ExtensionPoints.VISIT_ACTIONS));
}
use of org.openmrs.module.appframework.domain.Extension in project openmrs-module-mirebalais by PIH.
the class CustomAppLoaderTest method shouldCreateOverviewReportExtension.
@Test
public void shouldCreateOverviewReportExtension() {
Extension extension = CustomAppLoaderUtil.overviewReport("id", "label", "uuid", "privilege", 1, "linkId");
assertThat(extension.getId(), is("id"));
assertThat(extension.getLabel(), is("label"));
assertThat(extension.getType(), is("link"));
assertThat(extension.getExtensionPointId(), is(CustomAppLoaderConstants.ExtensionPoints.REPORTING_OVERVIEW_REPORTS));
assertThat(extension.getRequiredPrivilege(), is("privilege"));
assertThat(extension.getOrder(), is(1));
assertThat(extension.getUrl(), is("reportingui/runReport.page?reportDefinition=uuid"));
assertThat((String) extension.getExtensionParams().get("linkId"), is("linkId"));
}
use of org.openmrs.module.appframework.domain.Extension in project openmrs-module-mirebalais by PIH.
the class CustomAppLoaderTest method shouldCreateFragmentExtension.
@Test
public void shouldCreateFragmentExtension() {
Extension extension = CustomAppLoaderUtil.fragmentExtension("id", "provider", "fragment", "privilege", "extensionPoint", map("config", "config"));
assertThat(extension.getId(), is("id"));
assertThat((String) extension.getExtensionParams().get("provider"), is("provider"));
assertThat((String) extension.getExtensionParams().get("fragment"), is("fragment"));
assertThat((String) ((Map<String, Object>) extension.getExtensionParams().get("fragmentConfig")).get("config"), is("config"));
assertThat(extension.getRequiredPrivilege(), is("privilege"));
assertThat(extension.getExtensionPointId(), is("extensionPoint"));
}
use of org.openmrs.module.appframework.domain.Extension in project openmrs-module-mirebalais by PIH.
the class CustomAppLoaderTest method shouldCreateDashboardTab.
@Test
public void shouldCreateDashboardTab() {
Extension extension = CustomAppLoaderUtil.dashboardTab("id", "label", "privilege", "provider", "fragment");
assertThat(extension.getId(), is("id"));
assertThat(extension.getExtensionPointId(), is("patientDashboard.tabs"));
assertThat(extension.getType(), is("link"));
assertThat(extension.getLabel(), is("label"));
assertThat(extension.getRequiredPrivilege(), is("privilege"));
assertThat((String) extension.getExtensionParams().get("provider"), is("provider"));
assertThat((String) extension.getExtensionParams().get("fragment"), is("fragment"));
}
use of org.openmrs.module.appframework.domain.Extension in project openmrs-module-mirebalais by PIH.
the class CustomAppLoaderTest method shouldCreateDataExportExtension.
@Test
public void shouldCreateDataExportExtension() {
Extension extension = CustomAppLoaderUtil.dataExport("id", "label", "uuid", "privilege", 1, "linkId");
assertThat(extension.getId(), is("id"));
assertThat(extension.getLabel(), is("label"));
assertThat(extension.getType(), is("link"));
assertThat(extension.getExtensionPointId(), is(CustomAppLoaderConstants.ExtensionPoints.REPORTING_DATA_EXPORT));
assertThat(extension.getRequiredPrivilege(), is("privilege"));
assertThat(extension.getOrder(), is(1));
assertThat(extension.getUrl(), is("reportingui/runReport.page?reportDefinition=uuid"));
assertThat((String) extension.getExtensionParams().get("linkId"), is("linkId"));
}
Aggregations