mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3331] Automated tests for Viewer Component (#3615)
* Automation tests for Viewer Component - Content Services * Deleting alfresco-ng2-components.iml * Updating Viewer Page for failing tests * Adding tests for Viewer Component and some minor changes on Viewer Component - Content Services * Removing some lines used to test * Automation tests for Viewer component and Viewer component - Integration with Router + minor changes on tests for Viewer Component - Content Services * Correcting an import + some improvement to the code * Correcting tests for opening different file extensions * Removing a console.log I forgot * Refactoring the test in Viewer Component * Refacotring using lint * Adding browser refresh after each file type * Moving tests to proper folder * Minor changes * remove faulty BE files from e2e * fix test viewer * fix process service tests * fix test * fix process test * fix lint timeout decrease * increase some timeouts to fix CS e2e * lint fix
This commit is contained in:
committed by
Eugenio Romano
parent
bb6bb4fe0f
commit
5a6d8d8a2a
@@ -51,10 +51,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit {
|
||||
@Input()
|
||||
processDefinitionName: string;
|
||||
|
||||
/** (optional) Definition name of the process to start. */
|
||||
@Input()
|
||||
defaultProcessSelected: boolean;
|
||||
|
||||
/** Variables in input to the process
|
||||
* [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md).
|
||||
*/
|
||||
@@ -166,17 +162,17 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit {
|
||||
this.processDefinitions = processDefinitionRepresentations;
|
||||
|
||||
if (this.hasSingleProcessDefinition()) {
|
||||
if (this.processDefinitionName && this.defaultProcessSelected) {
|
||||
this.selectedProcessDef = this.getSelectedProcess(this.processDefinitionName);
|
||||
this.selectedProcessDef = this.processDefinitions[0];
|
||||
} else {
|
||||
this.selectedProcessDef = this.processDefinitions.find((currentProcessDefinition) => {
|
||||
return currentProcessDefinition.name === this.processDefinitionName;
|
||||
});
|
||||
}
|
||||
|
||||
if (!this.selectedProcessDef.id) {
|
||||
this.selectedProcessDef = this.processDefinitions[0];
|
||||
}
|
||||
} else {
|
||||
this.selectedProcessDef = this.processDefinitions[0];
|
||||
if (this.selectedProcessDef) {
|
||||
if (this.processDefinitionInput) {
|
||||
this.processDefinitionInput.setValue(this.selectedProcessDef.name);
|
||||
}
|
||||
|
||||
this.processDefinitionInput.setValue(this.selectedProcessDef.name);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
|
Reference in New Issue
Block a user