Fabricate(:post,raw:"<div data-theme-toc='true'></div>\n\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",topic:topic_1)
}
fab!(:post_2){
Fabricate(:post,raw:"\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",topic:topic_2)
}
fab!(:post_3){
Fabricate(:post,raw:"intentionally \n long \n content \n so \n there's \n plenty \n to be \n scrolled \n past \n which \n will \n force \n the \n timeline \n to \n hide \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll ",topic:topic_1)
}
it"table of contents button appears in mobile view"do
visit("/t/#{topic_1.id}/?mobile_view=1")
expect(page).tohave_css(".d-toc-mini")
end
it"clicking the toggle button toggles the timeline"do
visit("/t/#{topic_1.id}/?mobile_view=1")
find(".d-toc-mini").click
expect(page).tohave_css(".d-toc-wrapper.overlay")
end
it"timeline toggle does not appear when the progress bar timeline is expanded"do