mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-31 18:31:02 +00:00
Merge branch '2.6'
# Conflicts: # src/Repository/EntryRepository.php # src/Twig/WallabagExtension.php # src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig # src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig # tests/Twig/WallabagExtensionTest.php
This commit is contained in:
commit
2272d3da66
9 changed files with 68 additions and 32 deletions
|
@ -1561,6 +1561,38 @@ class EntryControllerTest extends WallabagTestCase
|
|||
$this->assertCount(2, $crawler->filter($this->entryDataTestAttribute));
|
||||
}
|
||||
|
||||
public function testActionInSearchResults()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$config = $this->getLoggedInUser()->getConfig();
|
||||
$config->setActionMarkAsRead(ConfigEntity::REDIRECT_TO_CURRENT_PAGE);
|
||||
$this->getEntityManager()->persist($config);
|
||||
|
||||
$entry = new Entry($this->getLoggedInUser());
|
||||
$entry->setUrl($this->url);
|
||||
$entry->setTitle('ActionInSearchResults');
|
||||
$this->getEntityManager()->persist($entry);
|
||||
$this->getEntityManager()->flush();
|
||||
|
||||
// Search on unread list
|
||||
$crawler = $client->request('GET', '/unread/list');
|
||||
|
||||
$form = $crawler->filter('form[name=search]')->form();
|
||||
$data = [
|
||||
'search_entry[term]' => 'ActionInSearchResults',
|
||||
];
|
||||
|
||||
$crawler = $client->submit($form, $data);
|
||||
$currentUrl = $client->getRequest()->getUri();
|
||||
$element = $crawler->filter('a[data-action="delete"]')->link();
|
||||
$client->click($element);
|
||||
$client->followRedirect();
|
||||
$nextUrl = $client->getRequest()->getUri();
|
||||
$this->assertSame($currentUrl, $nextUrl);
|
||||
}
|
||||
|
||||
public function dataForLanguage()
|
||||
{
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue