Skip to content

Commit

Permalink
Adding more specific checks (WIP).
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbware committed Oct 3, 2023
1 parent 3bc2e9b commit ee6e902
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions COMET.Web.Common.Tests/Components/MultiComboBoxTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace COMET.Web.Common.Tests.Components

using DevExpress.Blazor;

using Microsoft.AspNetCore.Components;

using TestContext = Bunit.TestContext;

using NUnit.Framework;
Expand Down Expand Up @@ -84,19 +86,17 @@ public void VerifyComponent()
Assert.IsNotEmpty(this.component.Instance.Values);
Assert.IsTrue(this.component.Instance.ShowCheckBoxes);
Assert.IsNotNull(this.component.Instance.EditorTextTemplate);
Assert.That(this.component.Instance.MaxNumberOfChips, Is.EqualTo(2));
Assert.IsNotNull(this.component.Instance.RowTemplate);
});

this.component.Render();

var comboBox = this.component.FindComponent<DxComboBox<Category, Category>>();
Assert.IsNotNull(comboBox);

var comboBoxItemTemplate = (MultiComboBox<Category>) comboBox.Instance.ItemTemplate.Target;
Assert.IsNull(comboBox.Instance.Value);

Assert.IsTrue(comboBoxItemTemplate.Enabled);
Assert.IsNotEmpty(comboBoxItemTemplate.Data);
Assert.IsNotEmpty(comboBoxItemTemplate.Values);
Assert.IsNotNull(comboBoxItemTemplate.RowTemplate);
var dropdownItems = this.component.FindAll(".chip");
Assert.IsNotNull(dropdownItems);
Assert.IsNotEmpty(dropdownItems);
}
}
}

0 comments on commit ee6e902

Please sign in to comment.