diff --git a/demo-shell/src/app/components/process-service/process-service.component.html b/demo-shell/src/app/components/process-service/process-service.component.html index b20dbcdbd0..1e933b1cc6 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.html +++ b/demo-shell/src/app/components/process-service/process-service.component.html @@ -224,7 +224,8 @@ [name]="defaultProcessName" (formContentClicked)="onContentClick($event)" (start)="onStartProcessInstance($event)" - (cancel)="onCancelProcessInstance()"> + (cancel)="onCancelProcessInstance()" + (error)="onStartProcessError($event)"> diff --git a/demo-shell/src/app/components/process-service/process-service.component.ts b/demo-shell/src/app/components/process-service/process-service.component.ts index 7d79811a40..ec814272fe 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.ts +++ b/demo-shell/src/app/components/process-service/process-service.component.ts @@ -36,7 +36,7 @@ import { import { FORM_FIELD_VALIDATORS, FormRenderingService, FormService, DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues, - AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent + AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent, NotificationService } from '@alfresco/adf-core'; import { AnalyticsReportListComponent } from '@alfresco/adf-insights'; @@ -174,6 +174,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit formRenderingService: FormRenderingService, formService: FormService, private location: Location, + private notificationService: NotificationService, private preferenceService: UserPreferencesService) { this.defaultProcessName = this.appConfig.get('adf-start-process.name'); @@ -403,6 +404,10 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit this.reloadProcessFilters(); } + onStartProcessError(event: any) { + this.notificationService.showError(event.message); + } + isStartProcessMode(): boolean { return this.currentProcessInstanceId === currentProcessIdNew; } diff --git a/docs/process-services/components/start-process.component.md b/docs/process-services/components/start-process.component.md index 3a38edfc43..4dfe3f5098 100644 --- a/docs/process-services/components/start-process.component.md +++ b/docs/process-services/components/start-process.component.md @@ -195,6 +195,25 @@ You can use the `showSelectApplicationDropdown` property to Hide or show applica ![Start process with selected application](../../docassets/images/start-process-with-selected-application.png) +### Error handling + +When an error occurs, the component will emit an error event that can be used to handle errors. Example: + +```html + + +``` + +```ts + onError(error) { + this.notificationService.showError(event.response.body.message); + } +``` + ## See also - [Select Apps Dialog component](select-apps-dialog.component.md) diff --git a/lib/core/templates/empty-content/empty-content.component.html b/lib/core/templates/empty-content/empty-content.component.html index e16282db2e..cc1e3d9b5d 100644 --- a/lib/core/templates/empty-content/empty-content.component.html +++ b/lib/core/templates/empty-content/empty-content.component.html @@ -1,5 +1,5 @@
- {{ icon }} +
{{ title | translate }}
{{ subtitle | translate }}
diff --git a/lib/core/templates/empty-content/empty-content.component.scss b/lib/core/templates/empty-content/empty-content.component.scss index 7a3c0d2f79..b1525307e4 100644 --- a/lib/core/templates/empty-content/empty-content.component.scss +++ b/lib/core/templates/empty-content/empty-content.component.scss @@ -4,6 +4,7 @@ $config: mat-typography-config(); $foreground: map-get($theme, foreground); + $adf-empty-content-icon-opacity: 0.6; .adf-empty-content { color: mat-color($foreground, text, 0.54); @@ -12,9 +13,11 @@ align-items: center; &__icon { - font-size: mat-font-size($config, display-3); - height: mat-font-size($config, display-3) !important; - width: mat-font-size($config, display-3) !important; + .mat-icon { + font-size: mat-font-size($config, display-3); + height: mat-font-size($config, display-3) !important; + width: mat-font-size($config, display-3) !important; + } } &__title { @@ -35,4 +38,8 @@ text-align: center; } } + + .adf-icon { + opacity: $adf-empty-content-icon-opacity; + } } diff --git a/lib/core/templates/template.module.ts b/lib/core/templates/template.module.ts index f6e30e7189..dea01d0c07 100644 --- a/lib/core/templates/template.module.ts +++ b/lib/core/templates/template.module.ts @@ -21,12 +21,14 @@ import { TranslateModule } from '@ngx-translate/core'; import { MaterialModule } from '../material.module'; import { ErrorContentComponent } from './error-content/error-content.component'; import { EmptyContentComponent } from './empty-content/empty-content.component'; +import { IconModule } from '../icon/icon.module'; @NgModule({ imports: [ CommonModule, MaterialModule, - TranslateModule + TranslateModule, + IconModule ], declarations: [ ErrorContentComponent, diff --git a/lib/process-services/src/lib/i18n/en.json b/lib/process-services/src/lib/i18n/en.json index 069d57332f..0d3b38437a 100644 --- a/lib/process-services/src/lib/i18n/en.json +++ b/lib/process-services/src/lib/i18n/en.json @@ -273,6 +273,8 @@ "START_PROCESS": { "BUTTON": "Start Process", "NO_PROCESS_DEFINITIONS": "You can't start a process as there are no process definitions available", + "NO_START_FORM": "No start form", + "NO_PROCESS_DEF_SELECTED": "No process definition selected", "FORM": { "TITLE": "Start Process", "LABEL": { diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.html b/lib/process-services/src/lib/process-list/components/start-process.component.html index fdba0a79c0..f63fb4f9f8 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.html +++ b/lib/process-services/src/lib/process-list/components/start-process.component.html @@ -1,116 +1,145 @@ -
-
{{ title | translate}}
-
-
- {{errorMessageId|translate}} -
-
- - - - {{ application.name }} - - - - - {{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.TYPE' | translate}} - -
- - - {{ processDef.name }} - - - - - - - - -
-
-
- - {{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.NAME' | translate}} - - - {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.MAXIMUM_LENGTH' | translate : { characters : maxProcessNameLength } }} - - - {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.PROCESS_NAME_REQUIRED' | translate }} - - - {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.SPACE_VALIDATOR' | translate }} - - - - - -
-
-
- {{'ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS' | translate | uppercase}} + + + + + + +
+
{{ title | translate}}
+
+
+ + + + {{ application.name }} + + + + + {{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.TYPE' | translate}} + +
+ + + {{ processDef.name }} + + + + + + + + +
+
+
+ + {{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.NAME' | translate}} + + + {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.MAXIMUM_LENGTH' | translate : { characters : maxProcessNameLength } }} + + + {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.PROCESS_NAME_REQUIRED' | translate }} + + + {{ 'ADF_PROCESS_LIST.START_PROCESS.ERROR.SPACE_VALIDATOR' | translate }} + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
-
-
- - -
-
+ + + + + + diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.scss b/lib/process-services/src/lib/process-list/components/start-process.component.scss index fa69c869cc..ee132b087d 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.scss +++ b/lib/process-services/src/lib/process-list/components/start-process.component.scss @@ -65,4 +65,9 @@ margin-right: auto; } } + + .adf-start-process-loading { + margin-left: calc((100% - 100px) / 2); + margin-right: calc((100% - 100px) / 2); + } } diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts index 637a5936fc..c8583dd274 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts @@ -306,20 +306,6 @@ describe('StartFormComponent', () => { }); }); - it('should indicate an error to the user if process defs cannot be loaded', async(() => { - getDefinitionsSpy = getDefinitionsSpy.and.returnValue(throwError({})); - component.appId = 123; - const change = new SimpleChange(null, 123, true); - component.ngOnChanges({ 'appId': change }); - fixture.detectChanges(); - - fixture.whenStable().then(() => { - const errorEl = fixture.nativeElement.querySelector('#error-message'); - expect(errorEl).not.toBeNull('Expected error message to be present'); - expect(errorEl.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.ERROR.LOAD_PROCESS_DEFS'); - }); - })); - it('should show no process available message when no process definition is loaded', async(() => { getDefinitionsSpy = getDefinitionsSpy.and.returnValue(of([])); component.appId = 123; @@ -328,7 +314,7 @@ describe('StartFormComponent', () => { fixture.detectChanges(); fixture.whenStable().then(() => { - const noProcessElement = fixture.nativeElement.querySelector('#no-process-message'); + const noProcessElement = fixture.nativeElement.querySelector('.adf-empty-content__title'); expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS'); }); @@ -501,30 +487,6 @@ describe('StartFormComponent', () => { }); })); - it('should throw error event when process cannot be started', async(() => { - const errorSpy = spyOn(component.error, 'error'); - const error = { message: 'My error' }; - startProcessSpy = startProcessSpy.and.returnValue(throwError(error)); - component.selectedProcessDef = testProcessDef; - component.startProcess(); - fixture.whenStable().then(() => { - expect(errorSpy).toHaveBeenCalledWith(error); - }); - })); - - it('should indicate an error to the user if process cannot be started', async(() => { - fixture.detectChanges(); - startProcessSpy = startProcessSpy.and.returnValue(throwError({})); - component.selectedProcessDef = testProcessDef; - component.startProcess(); - fixture.detectChanges(); - fixture.whenStable().then(() => { - const errorEl = fixture.nativeElement.querySelector('#error-message'); - expect(errorEl).not.toBeNull(); - expect(errorEl.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.ERROR.START'); - }); - })); - it('should emit start event when start select a process and add a name', (done) => { const disposableStart = component.start.subscribe(() => { disposableStart.unsubscribe(); @@ -747,4 +709,121 @@ describe('StartFormComponent', () => { expect(processNameInput.disabled).toEqual(false); }); }); + + describe('Empty Template', () => { + + it('should show no process definition available template when application/process definitions are empty', async() => { + getDeployedApplicationsSpy = spyOn(appsProcessService, 'getDeployedApplications').and.returnValue(of([])); + getDefinitionsSpy.and.returnValue(of([])); + + component.showSelectApplicationDropdown = true; + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + const noProcessElement = fixture.nativeElement.querySelector('.adf-empty-content__title'); + + expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); + expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS'); + }); + + it('should show no process definition available template if processDefinitions are empty', async() => { + getDefinitionsSpy.and.returnValue(of([])); + + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + const noProcessElement = fixture.nativeElement.querySelector('.adf-empty-content__title'); + + expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); + expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS'); + }); + + it('should show no process definition selected template if there is no process definition selected', async() => { + getDefinitionsSpy.and.returnValue(of(testMultipleProcessDefs)); + getDeployedApplicationsSpy = spyOn(appsProcessService, 'getDeployedApplications').and.returnValue(of(deployedApps)); + + component.showSelectApplicationDropdown = true; + component.appId = 1234; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + const noProcessElement = fixture.nativeElement.querySelector('.adf-empty-content__title'); + + expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); + expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEF_SELECTED'); + }); + + it('should show no start form template if selected process definition does not have start form', async() => { + getDefinitionsSpy.and.returnValue(of(testMultipleProcessDefs)); + getDeployedApplicationsSpy = spyOn(appsProcessService, 'getDeployedApplications').and.returnValue(of(deployedApps)); + + component.showSelectApplicationDropdown = true; + component.processDefinitionName = 'My Process 1'; + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + const noProcessElement = fixture.nativeElement.querySelector('.adf-empty-content__title'); + + expect(noProcessElement).not.toBeNull('Expected no available process message to be present'); + expect(noProcessElement.innerText.trim()).toBe('ADF_PROCESS_LIST.START_PROCESS.NO_START_FORM'); + }); + }); + + describe('Error event', () => { + + const processDefError = { message: 'Failed to load Process definitions' }; + const applicationsError = { message: 'Failed to load applications' }; + const startProcessError = { message: 'Failed to start process' }; + + beforeEach(() => { + fixture.detectChanges(); + }); + + it('should emit error event in case loading process definitions failed', async() => { + const errorSpy = spyOn(component.error, 'emit'); + getDefinitionsSpy.and.returnValue(throwError(processDefError)); + + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + + expect(errorSpy).toHaveBeenCalledWith(processDefError); + }); + + it('should emit error event in case loading applications failed', async() => { + const errorSpy = spyOn(component.error, 'emit'); + getDeployedApplicationsSpy = spyOn(appsProcessService, 'getDeployedApplications').and.returnValue(throwError(applicationsError)); + + component.showSelectApplicationDropdown = true; + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + + expect(errorSpy).toHaveBeenCalledWith(applicationsError); + }); + + it('should emit error event in case start process failed', async() => { + const errorSpy = spyOn(component.error, 'emit'); + getDefinitionsSpy.and.returnValue(of(testMultipleProcessDefs)); + getDeployedApplicationsSpy = spyOn(appsProcessService, 'getDeployedApplications').and.returnValue(of(deployedApps)); + startProcessSpy.and.returnValue(throwError(startProcessError)); + + component.showSelectApplicationDropdown = true; + component.processDefinitionName = 'My Process 1'; + component.name = 'mock name'; + component.appId = 3; + component.ngOnInit(); + fixture.detectChanges(); + await fixture.whenStable(); + component.startProcess(); + fixture.detectChanges(); + + expect(errorSpy).toHaveBeenCalledWith(startProcessError); + }); + }); }); diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.ts b/lib/process-services/src/lib/process-list/components/start-process.component.ts index 795e4ab6c9..f862988234 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.ts +++ b/lib/process-services/src/lib/process-list/components/start-process.component.ts @@ -93,11 +93,11 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr /** Emitted when the process is canceled. */ @Output() - cancel: EventEmitter = new EventEmitter(); + cancel: EventEmitter = new EventEmitter(); /** Emitted when an error occurs. */ @Output() - error: EventEmitter = new EventEmitter(); + error: EventEmitter = new EventEmitter(); /** Emitted when process definition selection changes. */ @Output() @@ -115,7 +115,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr processDefinitions: ProcessDefinitionRepresentation[] = []; selectedProcessDef: ProcessDefinitionRepresentation; - errorMessageId: string = ''; processNameInput: FormControl; processDefinitionInput: FormControl; filteredProcessesDefinitions$: Observable; @@ -123,7 +122,10 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr alfrescoRepositoryName: string; applications: AppDefinitionRepresentationModel[] = []; selectedApplication: AppDefinitionRepresentationModel; + isProcessDefinitionsLoading = true; + isAppsLoading = true; + private onDestroy$ = new Subject(); constructor(private activitiProcess: ProcessService, private activitiContentService: ActivitiContentService, @@ -219,7 +221,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr loadProcessDefinitions(appId: any): void { this.isProcessDefinitionsLoading = true; this.resetSelectedProcessDefinition(); - this.resetErrorMessage(); this.activitiProcess.getProcessDefinitions(appId).pipe( map((processDefinitionRepresentations: ProcessDefinitionRepresentation[]) => { @@ -248,9 +249,9 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr this.processDefinitionSelection.emit(this.selectedProcessDef); this.isProcessDefinitionsLoading = false; }, - () => { - this.errorMessageId = 'ADF_PROCESS_LIST.START_PROCESS.ERROR.LOAD_PROCESS_DEFS'; + (error) => { this.isProcessDefinitionsLoading = false; + this.error.emit(error); }); } @@ -269,6 +270,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr } loadApps() { + this.isAppsLoading = true; this.appsProcessService .getDeployedApplications() .pipe(map((response: AppDefinitionRepresentationModel[]) => { @@ -293,20 +295,32 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr this.selectedApplication = filteredApps.currentApplication; this.applicationSelection.emit(this.selectedApplication); this.toggleProcessNameAndDefinitionsDropdown(); - this.loadProcessDefinitions(this.selectedApplication ? this.selectedApplication.id : null); + this.isAppsLoading = false; + this.loadProcessDefinitionsBasedOnSelectedApp(); }, - err => { + (err) => { + this.isAppsLoading = false; this.error.emit(err); } ); } + loadProcessDefinitionsBasedOnSelectedApp() { + if (this.selectedApplication && this.selectedApplication.id) { + this.loadProcessDefinitions(this.selectedApplication ? this.selectedApplication.id : null); + } else { + this.isProcessDefinitionsLoading = false; + this.resetProcessDefinitions(); + } + } + onAppSelectionChange(selectedApplication: any) { + this.resetProcessDefinitions(); this.selectedApplication = selectedApplication.value; this.applicationSelection.emit(this.selectedApplication); this.toggleProcessNameAndDefinitionsDropdown(); - this.loadProcessDefinitions(this.selectedApplication.id); + this.loadProcessDefinitionsBasedOnSelectedApp(); } private isAppSelected(): boolean { @@ -315,13 +329,28 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr private removeDefaultApps(apps: AppDefinitionRepresentationModel []): AppDefinitionRepresentationModel[] { return apps.filter((app) => app.id); + } + hasApplications(): boolean { + return this.applications && this.applications.length > 0; + } + + hasProcessDefinitions(): boolean { + return this.processDefinitions && this.processDefinitions.length > 0; + } + + isProcessDefinitionSelected(): boolean { + return !!(this.selectedProcessDef && this.selectedProcessDef.id); } isProcessDefinitionsEmpty(): boolean { return this.processDefinitions.length === 0; } + disableDropdownButton(): boolean { + return this.showSelectApplicationDropdown && !this.isAppSelected(); + } + getAlfrescoRepositoryName(): string { let alfrescoRepositoryName = this.appConfig.get(AppConfigValues.ALFRESCO_REPOSITORY_NAME); if (!alfrescoRepositoryName) { @@ -345,7 +374,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr startProcess(outcome?: string) { if (this.selectedProcessDef && this.selectedProcessDef.id && this.name) { - this.resetErrorMessage(); const formValues = this.startForm ? this.startForm.form.values : undefined; this.activitiProcess.startProcess(this.selectedProcessDef.id, this.name, outcome, formValues, this.variables).subscribe( (res) => { @@ -353,8 +381,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr this.start.emit(res); }, (err) => { - this.errorMessageId = 'ADF_PROCESS_LIST.START_PROCESS.ERROR.START'; - this.error.error(err); + this.error.emit(err); } ); } @@ -368,11 +395,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr return this.selectedProcessDef && this.selectedProcessDef.hasStartForm; } - isProcessDefinitionEmpty(): boolean { - const hasErrorMessage = this.errorMessageId ? true : false; - return this.processDefinitions ? (this.processDefinitions.length > 0 || hasErrorMessage) : hasErrorMessage; - } - isStartFormMissingOrValid(): boolean { if (this.startForm) { return this.startForm.form && this.startForm.form.isValid; @@ -386,15 +408,15 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr } private resetSelectedProcessDefinition() { - this.selectedProcessDef = new ProcessDefinitionRepresentation(); + this.selectedProcessDef = undefined; + if (this.processDefinitionInput) { + this.processDefinitionInput.setValue(''); + } } - private resetErrorMessage(): void { - this.errorMessageId = ''; - } - - hasErrorMessage(): boolean { - return this.processDefinitions.length === 0 && !this.errorMessageId; + private resetProcessDefinitions() { + this.processDefinitions = []; + this.resetSelectedProcessDefinition(); } public onOutcomeClick(outcome: string) { @@ -407,7 +429,6 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr if (this.startForm) { this.startForm.data = {}; } - this.resetErrorMessage(); } displayFn(process: any): string { @@ -453,4 +474,8 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr this.selectedProcessDef = processDefinition; this.processDefinitionSelection.emit(this.selectedProcessDef); } + + isLoading(): boolean { + return this.showSelectApplicationDropdown ? this.isAppsLoading : false; + } } diff --git a/lib/testing/src/lib/process-services-cloud/pages/task-form-cloud-component.page.ts b/lib/testing/src/lib/process-services-cloud/pages/task-form-cloud-component.page.ts index 8734133739..ba4c6f54de 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/task-form-cloud-component.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/task-form-cloud-component.page.ts @@ -29,7 +29,7 @@ export class TaskFormCloudComponent { claimButton: ElementFinder = element(by.css('button[adf-cloud-claim-task]')); form: ElementFinder = element(by.css('adf-cloud-form')); formTitle: ElementFinder = element(by.css(`span.adf-form-title`)); - emptyContentIcon: ElementFinder = element(by.css(`div.adf-empty-content mat-icon.adf-empty-content__icon`)); + emptyContentIcon: ElementFinder = element(by.css(`div.adf-empty-content adf-icon.adf-empty-content__icon`)); emptyContentTitle: ElementFinder = element(by.css(`div.adf-empty-content div.adf-empty-content__title`)); emptyContentSubtitle: ElementFinder = element(by.css(`div.adf-empty-content div.adf-empty-content__subtitle`)); readOnlyForm = element(by.css('div[class="adf-readonly-form"]')); diff --git a/lib/testing/src/lib/process-services/pages/start-process.page.ts b/lib/testing/src/lib/process-services/pages/start-process.page.ts index 95fee764d3..b238012a14 100644 --- a/lib/testing/src/lib/process-services/pages/start-process.page.ts +++ b/lib/testing/src/lib/process-services/pages/start-process.page.ts @@ -30,7 +30,7 @@ export class StartProcessPage { cancelProcessButton: ElementFinder = element(by.id('cancel_process')); formStartProcessButton: ElementFinder = element(by.css('button[data-automation-id="adf-form-start process"]')); startProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start"]')); - noProcess: ElementFinder = element(by.id('no-process-message')); + noProcess: ElementFinder = element(by.css('.adf-empty-content__title')); processDefinition: ElementFinder = element(by.css('input[id="processDefinitionName"]')); processDefinitionOptionsPanel: ElementFinder = element(by.css('div[class*="mat-autocomplete-panel"]'));