Skip to content

Commit

Permalink
Closes #2359 - Display extended Custom Fields of Workbasket in Admin UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianRoseneck committed Aug 24, 2023
1 parent 5527364 commit 9d430d3
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('WorkbasketInformationComponent', () => {

it('should display custom fields correctly', () => {
const customFields = debugElement.nativeElement.getElementsByClassName('custom-fields__form-field');
expect(customFields.length).toBe(3); //mock data has custom1->4 but engineConfig disables custom3 -> [1,2,4]
expect(customFields.length).toBe(5); //mock data has custom1->8 but engineConfig disables custom3, custom5, custom7 -> [1,2,4,6,8]
});

it('should create clone of workbasket when workbasket value changes', () => {
Expand Down Expand Up @@ -199,7 +199,7 @@ describe('WorkbasketInformationComponent', () => {

it('should not show custom fields with attribute visible = false', () => {
const inputCustoms = debugElement.queryAll(By.css('.custom-fields__input'));
expect(inputCustoms).toHaveLength(3);
expect(inputCustoms).toHaveLength(5);
});

it('should save custom field input at position 4 when custom field at position 3 is not visible', fakeAsync(() => {
Expand Down
4 changes: 4 additions & 0 deletions web/src/app/shared/models/workbasket-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export interface WorkbasketSummary {
custom2?: string;
custom3?: string;
custom4?: string;
custom5?: string;
custom6?: string;
custom7?: string;
custom8?: string;
orgLevel1?: string;
orgLevel2?: string;
orgLevel3?: string;
Expand Down
6 changes: 5 additions & 1 deletion web/src/app/shared/models/workbasket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface Workbasket {
custom2?: string;
custom3?: string;
custom4?: string;
custom5?: string;
custom6?: string;
custom7?: string;
custom8?: string;
orgLevel1?: string;
orgLevel2?: string;
orgLevel3?: string;
Expand All @@ -25,4 +29,4 @@ export interface Workbasket {
selected?: boolean;
}

export const customFieldCount: number = 4;
export const customFieldCount: number = 8;
Loading

0 comments on commit 9d430d3

Please sign in to comment.