@@ -68,19 +68,19 @@ func TestMainMonakoTest(t *testing.T) {
6868 })
6969
7070 t .Run ("Check for generated test doc markdown page" , func (t * testing.T ) {
71- assert .FileExists (t , filepath .Join (targetDir , "compose/public/docs/test/test_doc_markdown/index .html" ), "Generated Test doc does not exist" )
71+ assert .FileExists (t , filepath .Join (targetDir , "compose/public/docs/test/test_doc_markdown.html" ), "Generated Test doc does not exist" )
7272
73- contentBytes , err := ioutil .ReadFile (filepath .Join (targetDir , "compose/public/docs/test/test_doc_markdown/index .html" ))
73+ contentBytes , err := ioutil .ReadFile (filepath .Join (targetDir , "compose/public/docs/test/test_doc_markdown.html" ))
7474 content := string (contentBytes )
7575
7676 assert .NoError (t , err , "Can't read file" )
7777 assert .Contains (t , content , "<strong>Test docs</strong>" , "Contains menu" )
7878
79- assert .Contains (t , content , "<img src=\" ../ profile.png\" alt=\" Picture in same folder\" />" , "Contains relative picture" )
79+ assert .Contains (t , content , "<img src=\" profile.png\" alt=\" Picture in same folder\" />" , "Contains picture" )
8080 assert .FileExists (t , filepath .Join (targetDir , "compose/public/docs/test/profile.png" ), "Relative picture right placed" )
8181
8282 assert .FileExists (t , filepath .Join (targetDir , "compose/public/docs/test/subfolder/subfolderprofile.png" ), "Relative subfolder picture right placed" )
83- assert .Contains (t , content , "<img src=\" ../ subfolder/subfolderprofile.png\" alt=\" Picture in sub folder\" />" , "Contains relative picture" )
83+ assert .Contains (t , content , "<img src=\" subfolder/subfolderprofile.png\" alt=\" Picture in sub folder\" />" , "Contains picture" )
8484 })
8585
8686 // Provide the public folder over a webserver
@@ -90,7 +90,7 @@ func TestMainMonakoTest(t *testing.T) {
9090
9191 t .Run ("Check if images and sources are served" , func (t * testing.T ) {
9292
93- content , err := getContentFromURL (ts , "/docs/test/test_doc_markdown/index .html" )
93+ content , err := getContentFromURL (ts , "/docs/test/test_doc_markdown.html" )
9494 assert .NoError (t , err , "HTTP Call failed" )
9595
9696 srcs , err := getURLKeyValuesFromHTML (content , "src" , ts .URL )
@@ -118,7 +118,7 @@ func TestMainMonakoTest(t *testing.T) {
118118
119119 t .Run ("Check contents of served page markdown" , func (t * testing.T ) {
120120
121- content , err := getContentFromURL (ts , "/docs/test/test_doc_markdown/index .html" )
121+ content , err := getContentFromURL (ts , "/docs/test/test_doc_markdown.html" )
122122 assert .NoError (t , err , "HTTP Call failed" )
123123
124124 assert .Contains (t , content , "Ihr naht euch wieder, schwankende Gestalten!" , "Does not contain Goethe" )
@@ -129,7 +129,7 @@ func TestMainMonakoTest(t *testing.T) {
129129
130130 t .Run ("Check contents of served page asciidoc" , func (t * testing.T ) {
131131
132- content , err := getContentFromURL (ts , "/docs/test/test_doc_asciidoc/index .html" )
132+ content , err := getContentFromURL (ts , "/docs/test/test_doc_asciidoc.html" )
133133 assert .NoError (t , err , "HTTP Call failed" )
134134
135135 assert .Contains (t , content , "Ihr naht euch wieder, schwankende Gestalten!" , "Does not contain Goethe" )
@@ -150,6 +150,14 @@ func TestMainMonakoTest(t *testing.T) {
150150
151151 })
152152
153+ t .Run ("Test if asciidoc diagram is served as svg" , func (t * testing.T ) {
154+ content , err := getContentFromURL (ts , "/docs/test/ditaa-diagram.svg" )
155+ assert .NoError (t , err , "HTTP Call failed" )
156+
157+ assert .Contains (t , content , "Lots of work" )
158+
159+ })
160+
153161 t .Run ("Check for RSS feed" , func (t * testing.T ) {
154162 content , err := getContentFromURL (ts , "/docs/index.xml" )
155163 assert .NoError (t , err , "HTTP Call failed" )
0 commit comments