@@ -1056,3 +1056,102 @@ test.describe('LandingCarousel component', () => {
10561056 await expect ( cards ) . toHaveCount ( 1 )
10571057 } )
10581058} )
1059+
1060+ test . describe ( 'Journey Tracks' , ( ) => {
1061+ test ( 'displays journey tracks on landing pages' , async ( { page } ) => {
1062+ await page . goto ( '/get-started?feature=journey-landing' )
1063+
1064+ const journeyTracks = page . locator ( '[data-testid="journey-tracks"]' )
1065+ await expect ( journeyTracks ) . toBeVisible ( )
1066+
1067+ // Check that at least one track is displayed
1068+ const tracks = page . locator ( '[data-testid="journey-track"]' )
1069+ await expect ( tracks . first ( ) ) . toBeVisible ( )
1070+
1071+ // Verify track has proper structure
1072+ const firstTrack = tracks . first ( )
1073+ await expect ( firstTrack . locator ( 'h3' ) ) . toBeVisible ( ) // Track title
1074+ await expect ( firstTrack . locator ( 'p' ) ) . toBeVisible ( ) // Track description
1075+ } )
1076+
1077+ test ( 'track expansion and collapse functionality' , async ( { page } ) => {
1078+ await page . goto ( '/get-started?feature=journey-landing' )
1079+
1080+ const firstTrack = page . locator ( '[data-testid="journey-track"]' ) . first ( )
1081+ const expandButton = firstTrack . locator ( 'summary' )
1082+
1083+ // Initially collapsed
1084+ const articlesList = firstTrack . locator ( '[data-testid="journey-articles"]' )
1085+ await expect ( articlesList ) . not . toBeVisible ( )
1086+
1087+ await expandButton . click ( )
1088+ await expect ( articlesList ) . toBeVisible ( )
1089+
1090+ const articles = articlesList . locator ( 'li' )
1091+ await expect ( articles . first ( ) ) . toBeVisible ( )
1092+
1093+ await expandButton . click ( )
1094+ await expect ( articlesList ) . not . toBeVisible ( )
1095+ } )
1096+
1097+ test ( 'article navigation within tracks' , async ( { page } ) => {
1098+ await page . goto ( '/get-started?feature=journey-landing' )
1099+
1100+ const firstTrack = page . locator ( '[data-testid="journey-track"]' ) . first ( )
1101+ const expandButton = firstTrack . locator ( 'summary' )
1102+
1103+ await expandButton . click ( )
1104+
1105+ // Click on first article
1106+ const firstArticle = firstTrack . locator ( '[data-testid="journey-articles"] li a' ) . first ( )
1107+ await expect ( firstArticle ) . toBeVisible ( )
1108+
1109+ const articleTitle = await firstArticle . textContent ( )
1110+ expect ( articleTitle ) . toBeTruthy ( )
1111+ expect ( articleTitle ! . length ) . toBeGreaterThan ( 0 )
1112+ } )
1113+
1114+ test ( 'preserves version in journey track links' , async ( { page } ) => {
1115+ await page . goto ( '/enterprise-cloud@latest/get-started?feature=journey-landing' )
1116+
1117+ const firstTrack = page . locator ( '[data-testid="journey-track"]' ) . first ( )
1118+ const expandButton = firstTrack . locator ( 'summary' )
1119+ await expandButton . click ( )
1120+
1121+ // article links should preserve the language and version
1122+ const firstArticle = firstTrack . locator ( '[data-testid="journey-articles"] li a' ) . first ( )
1123+ const href = await firstArticle . getAttribute ( 'href' )
1124+
1125+ expect ( href ) . toContain ( '/en/' )
1126+ expect ( href ) . toContain ( 'enterprise-cloud@latest' )
1127+ } )
1128+
1129+ test ( 'handles liquid template rendering in track content' , async ( { page } ) => {
1130+ await page . goto ( '/get-started?feature=journey-landing' )
1131+
1132+ const tracks = page . locator ( '[data-testid="journey-track"]' )
1133+
1134+ // Check that liquid templates are rendered (no raw template syntax visible)
1135+ const trackContent = await tracks . first ( ) . textContent ( )
1136+ expect ( trackContent ) . not . toContain ( '{{' )
1137+ expect ( trackContent ) . not . toContain ( '}}' )
1138+ expect ( trackContent ) . not . toContain ( '{%' )
1139+ expect ( trackContent ) . not . toContain ( '%}' )
1140+ } )
1141+
1142+ test ( 'journey navigation components show on article pages' , async ( { page } ) => {
1143+ // go to an article that's part of a journey track
1144+ await page . goto ( '/get-started/start-your-journey/hello-world?feature=journey-navigation' )
1145+
1146+ // journey next/prev nav components should rende
1147+ const journeyCard = page . locator ( '[data-testid="journey-track-card"]' )
1148+ if ( await journeyCard . isVisible ( ) ) {
1149+ await expect ( journeyCard ) . toBeVisible ( )
1150+ }
1151+
1152+ const journeyNav = page . locator ( '[data-testid="journey-track-nav"]' )
1153+ if ( await journeyNav . isVisible ( ) ) {
1154+ await expect ( journeyNav ) . toBeVisible ( )
1155+ }
1156+ } )
1157+ } )
0 commit comments