Skip to content

Commit

Permalink
Add test to ensure title from sidebar is taken into account
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-brm committed Nov 18, 2023
1 parent 37f6a71 commit c7e48de
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scaladoc/test-documentations/sidebar/_docs/directory/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Directory index

This is the index file of the directory.
3 changes: 3 additions & 0 deletions scaladoc/test-documentations/sidebar/_docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Docs Home

This is the index page.
5 changes: 5 additions & 0 deletions scaladoc/test-documentations/sidebar/sidebar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
index: index.md
subsection:
- title: A Directory Subsection
index: directory/index.md
directory: directory
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,10 @@ class SiteGeneratationTest extends BaseHtmlTest:
)
}
}

@Test
def sidebarFile() = withGeneratedSite(testDocPath.resolve("sidebar")) {
withHtmlFile("docs/index.html") { content =>
content.assertTextsIn("#leftColumn #docs-nav > div:nth-child(1) > span > a > span", "A Directory Subsection")
}
}

0 comments on commit c7e48de

Please sign in to comment.