Hi
Juan Francisco,
As
per your requirement, we have created a unit test case to validate the
ItemModel inside the custom toolbar. In this test case, we have simulated the
click action on the relevant icon and verified whether the expected action is
executed successfully.
Concern
Code Snippet:
public void Test1()
{
using var context = new
Bunit.TestContext();
// Add Syncfusion Blazor service and Ignore script isolation.
context.Services.AddSyncfusionBlazor();
context.Services.AddOptions();
// Arrange
var cut =
context.RenderComponent<UnitTesting.Components.Pages.Home>();
// Act
var button =
cut.Find("div#big"); // Selects the button with ID "big"
button.Click();
var rowHeight =
cut.Find(".e-row").GetAttribute("style");
// Assert
Xunit.Assert.True(rowHeight
== "height: 60px");
}
|
We
have attached the concern sample please review the implementation, and let us
know if you need any further modifications or assistance.
Regards,
Sanjay
Kumar Suresh
Attachment:
UnitTesting_39e2cb0c.7z