-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
Description
This ticket is to create a new Playwright-based component test for Neo.component.Label.
This test plan was generated using the AI-Native workflow defined in the "Cookbook Epic" and will serve as the acceptance criteria for the implementation. The test should be created in a new file test/playwright/component/component/Label.spec.mjs and follow the "Empty Viewport" architecture.
Acceptance Criteria
1. Inherited Behavior Tests (from Neo.component.Base & Neo.component.Abstract)
-
appNameconfig: Test that theappNameconfig is correctly set and accessible. -
bindconfig: Test that data binding works correctly with a state provider (if applicable). -
cls&baseClsconfigs: Test thatbaseCls(neo-label) and customclsvalues are correctly applied to the component's root element. -
dataconfig: Test that thedataconfig correctly reflects merged data from parent state providers. -
disabledconfig: Test that settingdisabled: trueadds the.neo-disabledclass and prevents user interaction. -
height,width,minHeight,maxHeight,minWidth,maxWidthconfigs: Test that dimension configs are correctly applied to the component's style. -
hiddenconfig: Test that settinghidden: trueremoves the component from the DOM (usingremoveDomhideMode) or setsvisibility: hidden(usingvisibilityhideMode). -
htmlconfig: Test that thehtmlconfig correctly sets the innerHTML of the component. -
idconfig: Test that the component's unique ID is correctly set and used in the DOM. -
isLoadingconfig: Test that settingisLoading: truedisplays a loading mask with theneo-load-maskandneo-maskedclasses. -
keysconfig: Test that keyboard navigation is correctly set up (if applicable). -
mountedconfig: Test that themountedconfig is true after the component is mounted to the DOM. -
pluginsconfig: Test that plugins are correctly instantiated and applied (if applicable). -
referenceconfig: Test that the component can be accessed via its reference. - [ ]
roleconfig: Test that theroleattribute is correctly applied to the component's root element. -
scrollableconfig: Test that settingscrollable: trueadds theneo-scrollableclass and appliesoverflow: autostyle. -
stateProviderconfig: Test that a state provider can be attached and its data accessed. -
styleconfig: Test that custom inline styles are correctly applied to the component's root element. -
tagconfig: Test that the component's root HTML tag can be changed. -
textconfig: Test that thetextconfig correctly sets the textContent of the component. -
themeconfig: Test that theme classes are correctly applied and inherited. -
tooltipconfig: Test that a tooltip is correctly created and displayed on hover. -
uiconfig: Test that custom UI classes are correctly applied (e.g.,neo-label-my-ui). -
windowIdconfig: Test that thewindowIdis correctly set and used. -
wrapperCls&wrapperStyleconfigs: Test that wrapper classes and styles are correctly applied.
2. Component-Specific Feature Tests (Neo.component.Label)
-
baseCls: Verify that theneo-labelclass is always present on the component's root element. -
tag: Verify that the component renders as a<label>HTML element by default. -
textconfig: Verify that thetextconfig directly sets thetextContentof the<label>element. -
user-select: none: Verify that theuser-select: noneCSS property is applied to the label, preventing text selection. -
white-space: nowrap: Verify that thewhite-space: nowrapCSS property is applied to the label, preventing text wrapping.