mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2026-01-07 01:53:19 +09:00
#74 added an alert in case of no eligible jobs
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
<mat-card-content *ngIf="shouldShowTheTriggerCardContent()" style="position: relative; height: 100%">
|
||||
<div fxLayout="column" style="overflow-y: auto; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
|
||||
overflow: auto;height: calc(100% - 3em); padding-top: 1em;">
|
||||
<mat-card id="noEligibleJobsAlert" *ngIf="jobs?.length === 0" style="background-color: #ff6385">
|
||||
<mat-card-content>
|
||||
<i class="fas fa-exclamation-circle" style="color: #fff"></i> <strong>WARNING</strong>
|
||||
Not found any eligible job classes for quartz-manager! <br/>
|
||||
<p style="font-size: 0.8em">Please, make sure you have extended <i>AbstractQuartzManagerJob</i> and set the
|
||||
app prop <i>quartz-manager.jobClassPackages</i> with the correct java package </p>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<form name="triggerConfigForm" fxFlex="1 1 100%"
|
||||
[formGroup]="simpleTriggerReactiveForm" (ngSubmit)="onSubmitTriggerConfig()">
|
||||
<div>
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -23,10 +23,10 @@ describe('NotFoundComponent', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('<h1> 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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user