mirror of https://github.com/kiwix/libkiwix.git
Testing of "Fulltext search unavailable" page
This commit is contained in:
parent
aaf232bee4
commit
511261cc81
|
@ -1,4 +1,5 @@
|
||||||
body{
|
body{
|
||||||
|
background-color: white;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
font: small/normal Arial,Helvetica,Sans-Serif;
|
font: small/normal Arial,Helvetica,Sans-Serif;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
<meta content="text/html;charset=UTF-8" http-equiv="content-type" />
|
||||||
<title>Fulltext search unavailable</title>
|
<title>Fulltext search unavailable</title>
|
||||||
<link type="text/css" href="{{root}}/skin/search_results.css" rel="Stylesheet" />
|
<link type="text/css" href="{{root}}/skin/search_results.css" rel="Stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body>
|
||||||
<div class="header">Not found</div>
|
<div class="header">Not found</div>
|
||||||
<p>
|
<p>
|
||||||
There is no article with the title <b> "{{pattern}}"</b>
|
There is no article with the title <b> "{{pattern}}"</b>
|
||||||
|
|
|
@ -662,6 +662,30 @@ TEST_F(ServerTest, 404WithBodyTesting)
|
||||||
Cannot find content entry invalid-article
|
Cannot find content entry invalid-article
|
||||||
</p>
|
</p>
|
||||||
)" },
|
)" },
|
||||||
|
|
||||||
|
{ /* 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"(
|
||||||
|
<div class="header">Not found</div>
|
||||||
|
<p>
|
||||||
|
There is no article with the title <b> ""</b>
|
||||||
|
and the fulltext search engine is not available for this content.
|
||||||
|
</p>
|
||||||
|
)" },
|
||||||
|
|
||||||
|
{ /* 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"(
|
||||||
|
<div class="header">Not found</div>
|
||||||
|
<p>
|
||||||
|
There is no article with the title <b> "asdfqwerty"</b>
|
||||||
|
and the fulltext search engine is not available for this content.
|
||||||
|
</p>
|
||||||
|
)" },
|
||||||
};
|
};
|
||||||
|
|
||||||
for ( const auto& t : testData ) {
|
for ( const auto& t : testData ) {
|
||||||
|
|
Loading…
Reference in New Issue