diff --git a/static/skin/search_results.css b/static/skin/search_results.css index df3a54c0..8fb0a84b 100644 --- a/static/skin/search_results.css +++ b/static/skin/search_results.css @@ -1,4 +1,5 @@ body{ +background-color: white; color: #000000; font: small/normal Arial,Helvetica,Sans-Serif; margin-top: 0.5em; diff --git a/static/templates/no_search_result.html b/static/templates/no_search_result.html index 5105e200..baa7aa2c 100644 --- a/static/templates/no_search_result.html +++ b/static/templates/no_search_result.html @@ -1,11 +1,11 @@ - + Fulltext search unavailable - +
Not found

There is no article with the title "{{pattern}}" diff --git a/test/server.cpp b/test/server.cpp index a011f1d3..4eb22e06 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -662,6 +662,30 @@ TEST_F(ServerTest, 404WithBodyTesting) Cannot find content entry invalid-article

)" }, + + { /* url */ "/ROOT/search?content=zimfile", + expected_page_title=="Fulltext search unavailable" && + expected_css_url=="/ROOT/skin/search_results.css" && + book_name=="zimfile" && + book_title=="Ray Charles" && + expected_body==R"( +
Not found
+

+ There is no article with the title "" + and the fulltext search engine is not available for this content. +

+)" }, + + { /* url */ "/ROOT/search?content=non-existent-book&pattern=asdfqwerty", + expected_page_title=="Fulltext search unavailable" && + expected_css_url=="/ROOT/skin/search_results.css" && + expected_body==R"( +
Not found
+

+ There is no article with the title "asdfqwerty" + and the fulltext search engine is not available for this content. +

+)" }, }; for ( const auto& t : testData ) {