RadzenButton does not generate submit event in bUnit tests #1764

Closed
opened 2026-01-29 17:58:14 +00:00 by claunia · 2 comments
Owner

Originally created by @manutiedra on GitHub (May 17, 2025).

Is your feature request related to a problem? Please describe.
When testing with bUnit, the RadzenButton does not generate the submit event. You can see the details here:
https://github.com/bUnit-dev/bUnit/issues/51#issuecomment-2869060500

Describe the solution you'd like
That if a RadzenButton or SplitButton is inside an EditForm or a RadzenTemplateForm, it plays nicely with the generated button element so bUnit can get the associated form

Additional context
In the bUnit github pages they told me that they can't do anything:

The problem is that the RadzenButton doesn't apply the cascading EditForm parameter to the button itself (Blazor does that for regular HTML buttons). We can't really do much - well you could create an issue on Radzens GitHub tracker and link this very issue.

For more details check here

Originally created by @manutiedra on GitHub (May 17, 2025). **Is your feature request related to a problem? Please describe.** When testing with bUnit, the RadzenButton does not generate the submit event. You can see the details here: https://github.com/bUnit-dev/bUnit/issues/51#issuecomment-2869060500 **Describe the solution you'd like** That if a RadzenButton or SplitButton is inside an EditForm or a RadzenTemplateForm, it plays nicely with the generated button element so bUnit can get the associated form **Additional context** In the bUnit github pages they told me that they can't do anything: > The problem is that the RadzenButton doesn't apply the cascading EditForm parameter to the button itself (Blazor does that for regular HTML buttons). We can't really do much - well you could create an issue on Radzens GitHub tracker and link this very issue. For more details check [here](https://github.com/bUnit-dev/bUnit/issues/51#issuecomment-2869060500)
Author
Owner

@enchev commented on GitHub (May 20, 2025):

You should set ButtonType="ButtonType.Submit".

@enchev commented on GitHub (May 20, 2025): You should set ButtonType="ButtonType.Submit".
Author
Owner

@manutiedra commented on GitHub (May 20, 2025):

The button was already set as ButtonType.Submit:

Image

@manutiedra commented on GitHub (May 20, 2025): The button was already set as ButtonType.Submit: ![Image](https://github.com/user-attachments/assets/88e0d27e-1913-4d87-817a-9b682e150b89)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1764