mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user