diff --git a/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.html b/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.html index 5f96773..6462915 100644 --- a/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.html +++ b/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.html @@ -6,6 +6,14 @@
+ + +  WARNING + Not found any eligible job classes for quartz-manager!
+

Please, make sure you have extended AbstractQuartzManagerJob and set the + app prop quartz-manager.jobClassPackages with the correct java package

+
+
diff --git a/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.spec.ts b/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.spec.ts index db40566..49fa0c1 100644 --- a/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.spec.ts +++ b/quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.spec.ts @@ -220,6 +220,28 @@ describe('SimpleTriggerConfig', () => { expect(submitButton.nativeElement.textContent.trim()).toEqual('Submit'); }); + it('should display the warning if there are no eligible jobs', () => { + fixture.detectChanges(); + const getJobsReq = httpTestingController.expectOne(`${CONTEXT_PATH}/jobs`); + getJobsReq.flush([]); + fixture.detectChanges(); + + const componentDe: DebugElement = fixture.debugElement; + const warningCard = componentDe.query(By.css('#noEligibleJobsAlert')); + expect(warningCard).toBeTruthy(); + }); + + it('should not display the warning if there are eligible jobs', () => { + fixture.detectChanges(); + const getJobsReq = httpTestingController.expectOne(`${CONTEXT_PATH}/jobs`); + getJobsReq.flush(['sampleJob']); + fixture.detectChanges(); + + const componentDe: DebugElement = fixture.debugElement; + const warningCard = componentDe.query(By.css('#noEligibleJobsAlert')); + expect(warningCard).toBeFalsy(); + }); + }); diff --git a/quartz-manager-frontend/src/app/views/not-found/not-found.component.spec.ts b/quartz-manager-frontend/src/app/views/not-found/not-found.component.spec.ts index 1acb86e..220c31d 100644 --- a/quartz-manager-frontend/src/app/views/not-found/not-found.component.spec.ts +++ b/quartz-manager-frontend/src/app/views/not-found/not-found.component.spec.ts @@ -23,10 +23,10 @@ describe('NotFoundComponent', () => { expect(component).toBeTruthy(); }); - it('

tag should contains \'Page Not Found\'', () => { + it('should contains the text \'Not Found\'', () => { fixture = TestBed.createComponent(NotFoundComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Page Not Found'); + expect(compiled.querySelector('p').textContent).toContain('Not Found'); }); });