From ee6e9020041b7542f8807f048c5dc0002c06764b Mon Sep 17 00:00:00 2001 From: Robbware Date: Tue, 3 Oct 2023 18:07:06 +0100 Subject: [PATCH] Adding more specific checks (WIP). --- .../Components/MultiComboBoxTestFixture.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/COMET.Web.Common.Tests/Components/MultiComboBoxTestFixture.cs b/COMET.Web.Common.Tests/Components/MultiComboBoxTestFixture.cs index 3ccdf6ec..5a6e7bf4 100644 --- a/COMET.Web.Common.Tests/Components/MultiComboBoxTestFixture.cs +++ b/COMET.Web.Common.Tests/Components/MultiComboBoxTestFixture.cs @@ -33,6 +33,8 @@ namespace COMET.Web.Common.Tests.Components using DevExpress.Blazor; + using Microsoft.AspNetCore.Components; + using TestContext = Bunit.TestContext; using NUnit.Framework; @@ -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>(); Assert.IsNotNull(comboBox); - - var comboBoxItemTemplate = (MultiComboBox) 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); } } } \ No newline at end of file