@@ -328,16 +328,16 @@ describe('server', () => {
328328 test ( 'renders mini TOC in articles with more than one heading' , async ( ) => {
329329 const $ = await getDOM ( '/en/github/getting-started-with-github/githubs-products' )
330330 expect ( $ ( 'h2#in-this-article' ) . length ) . toBe ( 1 )
331- expect ( $ ( 'h2#in-this-article + ul li a ' ) . length ) . toBeGreaterThan ( 1 )
331+ expect ( $ ( 'h2#in-this-article + div div ul ' ) . length ) . toBeGreaterThan ( 1 )
332332 } )
333333
334334 test ( 'renders mini TOC in articles that includes h3s when specified by frontmatter' , async ( ) => {
335335 const $ = await getDOM (
336336 '/en/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise'
337337 )
338338 expect ( $ ( 'h2#in-this-article' ) . length ) . toBe ( 1 )
339- expect ( $ ( 'h2#in-this-article + ul li ' ) . length ) . toBeGreaterThan ( 0 ) // non-indented items
340- expect ( $ ( 'h2#in-this-article + ul li ul.ml-3' ) . length ) . toBeGreaterThan ( 0 ) // indented items
339+ expect ( $ ( 'h2#in-this-article + div div ul ' ) . length ) . toBeGreaterThan ( 0 ) // non-indented items
340+ expect ( $ ( 'h2#in-this-article + div div ul a div div div ul.ml-3' ) . length ) . toBeGreaterThan ( 0 ) // indented items
341341 } )
342342
343343 test ( 'does not render mini TOC in articles with only one heading' , async ( ) => {
@@ -361,14 +361,14 @@ describe('server', () => {
361361 const $ = await getDOM (
362362 '/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates'
363363 )
364- expect ( $ ( 'h2#in-this-article + ul li a[href="#package-ecosystem"]' ) . length ) . toBe ( 1 )
364+ expect ( $ ( 'h2#in-this-article + div div ul a[href="#package-ecosystem"]' ) . length ) . toBe ( 1 )
365365 } )
366366
367367 test ( 'renders mini TOC with correct links when headings contain markup in localized content' , async ( ) => {
368368 const $ = await getDOM (
369369 '/ja/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates'
370370 )
371- expect ( $ ( 'h2#in-this-article + ul li a[href="#package-ecosystem"]' ) . length ) . toBe ( 1 )
371+ expect ( $ ( 'h2#in-this-article + div div ul a[href="#package-ecosystem"]' ) . length ) . toBe ( 1 )
372372 } )
373373 } )
374374
@@ -878,9 +878,15 @@ describe('extended Markdown', () => {
878878 test ( 'renders expected mini TOC headings in platform-specific content' , async ( ) => {
879879 const $ = await getDOM ( '/en/github/using-git/associating-text-editors-with-git' )
880880 expect ( $ ( 'h2#in-this-article' ) . length ) . toBe ( 1 )
881- expect ( $ ( 'h2#in-this-article + ul li.extended-markdown.mac' ) . length ) . toBeGreaterThan ( 1 )
882- expect ( $ ( 'h2#in-this-article + ul li.extended-markdown.windows' ) . length ) . toBeGreaterThan ( 1 )
883- expect ( $ ( 'h2#in-this-article + ul li.extended-markdown.linux' ) . length ) . toBeGreaterThan ( 1 )
881+ expect (
882+ $ ( 'h2#in-this-article + div div ul a div div div.extended-markdown.mac' ) . length
883+ ) . toBeGreaterThan ( 1 )
884+ expect (
885+ $ ( 'h2#in-this-article + div div ul a div div div.extended-markdown.windows' ) . length
886+ ) . toBeGreaterThan ( 1 )
887+ expect (
888+ $ ( 'h2#in-this-article + div div ul a div div div.extended-markdown.linux' ) . length
889+ ) . toBeGreaterThan ( 1 )
884890 } )
885891} )
886892
0 commit comments