bUnit testing a dropdown button #1381
-
Hi! I have a component, namely a Syncfusion Dropdown Button, that I am trying to write some tests for in bUnit. I took some advice on an earlier discussion on this GitHub, and I'm not testing the core functionality of the component, just the parameters I have passed down. I need to access the Context Menu within the dropdown button in order to do that, but I'm unsure on what I should be using to access it? I'm sure bUnit have the ability to, I'm just not that good with it at the moment.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
I am no expert in SyncFusion - but couldn't you just retrieve every
MenuItem
component and check the id's against them?PS:
RenderComponent
is a method defined on theTestContext(Base)
. You would callRenderComponent
to initially render a component - but as you already did this, everything is "rendered" - including your context menu.If you would print out the markup:
cut.Markup
orcontextMenu.Markup
you would see your entries (and probably id's as well).