Skip to content

Commit

Permalink
Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Apr 23, 2024
1 parent 2a8e27c commit 934740a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ describe('CardViewTextItemComponent', () => {

const expectedErrorMessages = [{ message: 'Something went wrong' } as CardViewItemValidator];

const getTextField = (key: string): HTMLInputElement => {
return fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;
};
const getTextField = (key: string): HTMLInputElement => fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;

const updateTextField = (key: string, value) => {
const editInput = getTextField(key);
Expand Down Expand Up @@ -97,6 +95,7 @@ describe('CardViewTextItemComponent', () => {
param3: string
) => {
component.property = new CardViewTextItemModel(cardViewTextItemObject);
component.editable = cardViewTextItemObject.editable;
component.useChipsForMultiValueProperty = flag;
component.ngOnChanges({ property: new SimpleChange(null, null, true) });

Expand Down Expand Up @@ -305,6 +304,7 @@ describe('CardViewTextItemComponent', () => {
multivalued: true
};

component.editable = true;
component.property = new CardViewTextItemModel(cardViewTextItemObject);
component.displayLabelForChips = true;
component.ngOnChanges({ property: new SimpleChange(null, null, true) });
Expand All @@ -327,6 +327,7 @@ describe('CardViewTextItemComponent', () => {
multivalued: true
};

component.editable =true;
component.property = new CardViewTextItemModel(cardViewTextItemObject);
component.displayLabelForChips = false;
component.ngOnChanges({ property: new SimpleChange(null, null, true) });
Expand Down

0 comments on commit 934740a

Please sign in to comment.