mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
This commit is contained in:
@@ -342,6 +342,24 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
});
|
||||
|
||||
it('Should create an empty valid form when there are no parameters definitions', () => {
|
||||
component.onSuccess.subscribe((res) => {
|
||||
expect(component.reportForm).toBeDefined();
|
||||
expect(component.reportForm.valid).toEqual(true);
|
||||
expect(component.reportForm.controls).toEqual({});
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId);
|
||||
component.ngOnChanges({ 'reportId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
responseText: analyticParamsMock.reportNoParameterDefinitions
|
||||
});
|
||||
});
|
||||
|
||||
it('Should load the task list when a process definition is selected', () => {
|
||||
component.onSuccessReportParams.subscribe((res) => {
|
||||
expect(res).toBeDefined();
|
||||
|
Reference in New Issue
Block a user