$search->assertElementContains('.tag-value.highlight', 'MeowieCat');
}
+ public function test_match_highlighting_works_with_multibyte_content()
+ {
+ $this->newPage([
+ 'name' => 'Test Page',
+ 'html' => '<p>На мен ми трябва нещо добро test</p>',
+ ]);
+
+ $search = $this->asEditor()->get('/search?term=' . urlencode('На мен ми трябва нещо добро'));
+ $search->assertSee('<strong>На</strong> <strong>мен</strong> <strong>ми</strong> <strong>трябва</strong> <strong>нещо</strong> <strong>добро</strong> test', false);
+ }
+
public function test_html_entities_in_item_details_remains_escaped_in_search_results()
{
$this->newPage(['name' => 'My <cool> TestPageContent', 'html' => '<p>My supercool <great> TestPageContent page</p>']);
$search->assertSee('My <cool> <strong>TestPageContent</strong>', false);
$search->assertSee('My supercool <great> <strong>TestPageContent</strong> page', false);
}
+
+ public function test_searches_with_user_filters_adds_them_into_advanced_search_form()
+ {
+ $resp = $this->asEditor()->get('/search?term=' . urlencode('test {updated_by:me} {created_by:dan}'));
+ $resp->assertElementExists('form input[type="hidden"][name="filters[updated_by]"][value="me"]');
+ $resp->assertElementExists('form input[type="hidden"][name="filters[created_by]"][value="dan"]');
+ }
}