@@ -221,30 +221,30 @@ describe('server', () => {
221221 // TODO disable the mini TOC tests when we replace it with sticky TOC header
222222 test ( 'renders mini TOC in articles with more than one heading' , async ( ) => {
223223 const $ = await getDOM ( '/en/github/getting-started-with-github/githubs-products' )
224- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 1 )
225- expect ( $ ( 'h3 #in-this-article + ul li a' ) . length ) . toBeGreaterThan ( 1 )
224+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 1 )
225+ expect ( $ ( 'h2 #in-this-article + ul li a' ) . length ) . toBeGreaterThan ( 1 )
226226 } )
227227
228228 test ( 'renders mini TOC in articles that includes h4s when specified by frontmatter' , async ( ) => {
229229 const $ = await getDOM ( '/en/github/setting-up-and-managing-your-enterprise/enforcing-security-settings-in-your-enterprise-account' )
230- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 1 )
231- expect ( $ ( 'h3 #in-this-article + ul li.ml-0' ) . length ) . toBeGreaterThan ( 0 ) // non-indented items
232- expect ( $ ( 'h3 #in-this-article + ul li.ml-3' ) . length ) . toBeGreaterThan ( 0 ) // indented items
230+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 1 )
231+ expect ( $ ( 'h2 #in-this-article + ul li.ml-0' ) . length ) . toBeGreaterThan ( 0 ) // non-indented items
232+ expect ( $ ( 'h2 #in-this-article + ul li.ml-3' ) . length ) . toBeGreaterThan ( 0 ) // indented items
233233 } )
234234
235235 test ( 'does not render mini TOC in articles with only one heading' , async ( ) => {
236236 const $ = await getDOM ( '/en/github/visualizing-repository-data-with-graphs/about-repository-graphs' )
237- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 0 )
237+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 0 )
238238 } )
239239
240240 test ( 'does not render mini TOC in articles with no headings' , async ( ) => {
241241 const $ = await getDOM ( '/en/github/authenticating-to-github/reviewing-your-deploy-keys' )
242- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 0 )
242+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 0 )
243243 } )
244244
245245 test ( 'does not render mini TOC in non-articles' , async ( ) => {
246246 const $ = await getDOM ( '/github/getting-started-with-github' )
247- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 0 )
247+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 0 )
248248 } )
249249 } )
250250
@@ -459,16 +459,16 @@ describe('server', () => {
459459 expect ( $ ( '.markdown-body ul li a' ) . length ) . toBeGreaterThan ( 5 )
460460 } )
461461
462- test ( 'map topic renders with h4 links to articles' , async ( ) => {
462+ test ( 'map topic renders with h2 links to articles' , async ( ) => {
463463 const $ = await getDOM ( '/en/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings' )
464- expect ( $ ( `a[href="/en/${ nonEnterpriseDefaultVersion } /github/setting-up-and-managing-your-github-user-account/changing-your-github-username"] h4 ` ) . length ) . toBe ( 1 )
464+ expect ( $ ( `a[href="/en/${ nonEnterpriseDefaultVersion } /github/setting-up-and-managing-your-github-user-account/changing-your-github-username"] h2 ` ) . length ) . toBe ( 1 )
465465 } )
466466
467- test ( 'map topic renders with one intro for every h4 ' , async ( ) => {
467+ test ( 'map topic renders with one intro for every h2 ' , async ( ) => {
468468 const $ = await getDOM ( '/en/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings' )
469- const $h4s = $ ( 'article a.link-with-intro' )
470- expect ( $h4s . length ) . toBeGreaterThan ( 3 )
471- $h4s . each ( ( i , el ) => {
469+ const $h2s = $ ( 'article a.link-with-intro' )
470+ expect ( $h2s . length ) . toBeGreaterThan ( 3 )
471+ $h2s . each ( ( i , el ) => {
472472 expect ( $ ( el ) . next ( ) [ 0 ] . name ) . toBe ( 'p' )
473473 } )
474474 } )
@@ -635,10 +635,10 @@ describe('extended Markdown', () => {
635635
636636 test ( 'renders expected mini TOC headings in platform-specific content' , async ( ) => {
637637 const $ = await getDOM ( '/en/github/using-git/associating-text-editors-with-git' )
638- expect ( $ ( 'h3 #in-this-article' ) . length ) . toBe ( 1 )
639- expect ( $ ( 'h3 #in-this-article + ul li.extended-markdown.mac' ) . length ) . toBeGreaterThan ( 1 )
640- expect ( $ ( 'h3 #in-this-article + ul li.extended-markdown.windows' ) . length ) . toBeGreaterThan ( 1 )
641- expect ( $ ( 'h3 #in-this-article + ul li.extended-markdown.linux' ) . length ) . toBeGreaterThan ( 1 )
638+ expect ( $ ( 'h2 #in-this-article' ) . length ) . toBe ( 1 )
639+ expect ( $ ( 'h2 #in-this-article + ul li.extended-markdown.mac' ) . length ) . toBeGreaterThan ( 1 )
640+ expect ( $ ( 'h2 #in-this-article + ul li.extended-markdown.windows' ) . length ) . toBeGreaterThan ( 1 )
641+ expect ( $ ( 'h2 #in-this-article + ul li.extended-markdown.linux' ) . length ) . toBeGreaterThan ( 1 )
642642 } )
643643} )
644644
0 commit comments