test: adapt rebased master tests to 11 changes

Mask_Renders_IdFromNameParameter: set JSInterop loose mode like its
sibling Mask_Renders_NameParameter. The async OnAfterRenderAsync on 11
surfaces unawaited JSInterop calls that master's sync version hid.

DataGrid_SimpleWithMenuMode_FilterMenuIdsRemainBoundToColumn_AfterHidingColumn:
assert aria-controls instead of inline onclick. The CSP cleanup on 11
removed the inline togglePopup onclick from filter buttons; aria-controls
still carries the same button-to-menu binding.
This commit is contained in:
Vladimir Enchev
2026-06-01 16:35:54 +03:00
parent 123e81ec52
commit cf9341bd99
2 changed files with 3 additions and 2 deletions

View File

@@ -2056,8 +2056,8 @@ namespace Radzen.Blazor.Tests
var firstNameMenuId = $"{component.Instance.PopupID}FirstName{firstNameColumn.UniqueID}fm";
var lastNameMenuId = $"{component.Instance.PopupID}LastName{lastNameColumn.UniqueID}fm";
Assert.Contains(menuButtons, b => b.GetAttribute("onclick")?.Contains(firstNameMenuId) == true);
Assert.Contains(menuButtons, b => b.GetAttribute("onclick")?.Contains(lastNameMenuId) == true);
Assert.Contains(menuButtons, b => b.GetAttribute("aria-controls") == firstNameMenuId);
Assert.Contains(menuButtons, b => b.GetAttribute("aria-controls") == lastNameMenuId);
var popupIds = component.FindAll("div.rz-overlaypanel[role='menu']").Select(d => d.Id).ToList();
Assert.Contains(firstNameMenuId, popupIds);

View File

@@ -65,6 +65,7 @@ namespace Radzen.Blazor.Tests
public void Mask_Renders_IdFromNameParameter()
{
using var ctx = new TestContext();
ctx.JSInterop.Mode = JSRuntimeMode.Loose;
var component = ctx.RenderComponent<RadzenMask>();