@@ -11,6 +11,8 @@ async function waitForSettled() {
1111  await  settled ( ) ; 
1212} 
1313
14+ const  versionIndexLinkSelector  =  '[data-test-version-index-link]' ; 
15+ 
1416module ( 'Acceptance | version navigation' ,  function  ( hooks )  { 
1517  setupApplicationTest ( hooks ) ; 
1618
@@ -312,8 +314,7 @@ module('Acceptance | version navigation', function (hooks) {
312314    ) ; 
313315  } ) ; 
314316
315-   test ( 'switching to a version that is missing a module or class offers a link to the API index for that version' ,  async  function  ( assert )  { 
316-     const  versionIndexLinkSelector  =  '[data-test-version-index-link]' ; 
317+   test ( 'switching to a version that is missing a module offers a link to the API index for that version' ,  async  function  ( assert )  { 
317318    await  visit ( '/ember/6.4/modules/@glimmer%2Ftracking%2Fprimitives%2Fcache' ) ; 
318319    assert . strictEqual ( 
319320      currentURL ( ) , 
@@ -332,7 +333,9 @@ module('Acceptance | version navigation', function (hooks) {
332333      . dom ( versionIndexLinkSelector ) 
333334      . includesText ( 'v3.10' ) 
334335      . hasAttribute ( 'href' ,  '/ember/3.10' ) ; 
336+   } ) ; 
335337
338+   test ( 'switching to a version that is missing a class offers a link to the API index for that version' ,  async  function  ( assert )  { 
336339    await  visit ( '/ember/3.0/classes/Ember.Debug' ) ; 
337340    assert . strictEqual ( currentURL ( ) ,  '/ember/3.0/classes/Ember.Debug' ) ; 
338341
@@ -347,4 +350,25 @@ module('Acceptance | version navigation', function (hooks) {
347350      . includesText ( 'v4.0' ) 
348351      . hasAttribute ( 'href' ,  '/ember/4.0' ) ; 
349352  } ) ; 
353+ 
354+   test ( 'switching to a version that is missing a function offers a link to the API index for that version' ,  async  function  ( assert )  { 
355+     await  visit ( '/ember/3.28/functions/@glimmer%2Ftracking/tracked' ) ; 
356+     assert . strictEqual ( 
357+       currentURL ( ) , 
358+       '/ember/3.28/functions/@glimmer%2Ftracking/tracked' , 
359+     ) ; 
360+ 
361+     await  selectChoose ( '.ember-power-select-trigger' ,  '3.12' ) ; 
362+ 
363+     assert 
364+       . dom ( ) 
365+       . includesText ( 
366+         'We could not find function @glimmer/tracking/tracked in v3.12 of ember.' , 
367+       ) ; 
368+ 
369+     assert 
370+       . dom ( versionIndexLinkSelector ) 
371+       . includesText ( 'v3.12' ) 
372+       . hasAttribute ( 'href' ,  '/ember/3.12' ) ; 
373+   } ) ; 
350374} ) ; 
0 commit comments