diff --git a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts index 524707ec8c..d65abfa62b 100644 --- a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts @@ -74,11 +74,10 @@ describe('RuleActionUiComponent', () => { component.parameterConstraints = dummyConstraints; fixture.detectChanges(); - const cardView = getByDataAutomationId('rule-action-card-view').componentInstance as CardViewComponent; - expect(cardView.properties.length).toBe(0); - changeMatSelectValue('rule-action-select', 'mock-action-1-definition'); + const cardView = getByDataAutomationId('rule-action-card-view').componentInstance as CardViewComponent; + expect(cardView.properties.length).toBe(5); expect(cardView.properties[0]).toBeInstanceOf(CardViewTextItemModel); expect(cardView.properties[1]).toBeInstanceOf(CardViewBoolItemModel); @@ -87,7 +86,7 @@ describe('RuleActionUiComponent', () => { expect(cardView.properties[4]).toBeInstanceOf(CardViewSelectItemModel); changeMatSelectValue('rule-action-select', 'mock-action-2-definition'); - expect(cardView.properties.length).toBe(0); + expect(getByDataAutomationId('rule-action-card-view')).toBeNull(); }); it('should create category-value action parameter as a text box rather than node picker', () => { @@ -95,11 +94,11 @@ describe('RuleActionUiComponent', () => { component.parameterConstraints = dummyConstraints; fixture.detectChanges(); - const cardView = getByDataAutomationId('rule-action-card-view').componentInstance as CardViewComponent; - expect(cardView.properties.length).toBe(0); - changeMatSelectValue('rule-action-select', 'mock-action-3-definition'); + const cardView = getByDataAutomationId('rule-action-card-view').componentInstance as CardViewComponent; + + expect(cardView.properties.length).toBe(1); expect(cardView.properties[0].icon).toBeFalsy(); expect(cardView.properties[0].value).toBeFalsy(); expect(cardView.properties[0]).toBeInstanceOf(CardViewTextItemModel);