File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -537,6 +537,7 @@ describe('VTour Component - Comprehensive Test Suite', () => {
537537 wrapper = mount ( VTour , {
538538 props : {
539539 steps : mockSteps ,
540+ name : '' , // Empty name should produce 'vjt-highlight' class
540541 highlight : true ,
541542 autoStart : false ,
542543 } ,
@@ -553,10 +554,15 @@ describe('VTour Component - Comprehensive Test Suite', () => {
553554 await flushVue ( ) ;
554555
555556 expect ( wrapper . vm . tourVisible ) . toBe ( true ) ;
556- // Default name is 'tour', so class is 'vjt-highlight-tour'
557- // CSS selector [class*="vjt-highlight"] should match this
558- expect ( targetElement . classList . contains ( 'vjt-highlight-tour' ) ) . toBe ( true ) ;
559-
557+ // Empty name produces 'vjt-highlight' class (no hyphen suffix)
558+ expect ( targetElement . classList . contains ( 'vjt-highlight' ) ) . toBe ( true ) ;
559+
560+ // CRITICAL: Verify CSS selector [class*="vjt-highlight"] matches 'vjt-highlight'
561+ // This will FAIL if selector is [class*="vjt-highlight-"] (with trailing dash)
562+ const computedStyle = window . getComputedStyle ( targetElement ) ;
563+ expect ( computedStyle . outline ) . toBeTruthy ( ) ;
564+ expect ( computedStyle . outline ) . not . toBe ( 'none' ) ;
565+
560566 // Verify actual CSS is loaded in document
561567 const styles = Array . from ( document . querySelectorAll ( 'style' ) ) ;
562568 const hasHighlightCSS = styles . some ( s => s . textContent ?. includes ( 'vjt-highlight' ) ) ;
You can’t perform that action at this time.
0 commit comments