From: Jeremy Benoist Date: Sun, 13 Sep 2015 08:14:42 +0000 (+0200) Subject: Merge pull request #1418 from wallabag/v2-previewpicture-filter X-Git-Tag: 2.0.0-alpha.0~3 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=40f59b219bfd438bdaf4f36227a43f2b674ece00;hp=-c;p=github%2Fwallabag%2Fwallabag.git Merge pull request #1418 from wallabag/v2-previewpicture-filter filter for entries with previewPicture --- 40f59b219bfd438bdaf4f36227a43f2b674ece00 diff --combined src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 1ecaecc5,9a2442a0..89182d98 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@@ -58,6 -58,7 +58,6 @@@ {% endfor %} -
@@@ -70,6 -71,12 +70,12 @@@
+ +
+ {{ form_widget(form.previewPicture) }} + +
+
{{ form_widget(form.isArchived) }} diff --combined src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index a92835b3,5798009c..77b57884 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php @@@ -209,7 -209,7 +209,7 @@@ class EntryControllerTest extends Walla $content = $client->getContainer() ->get('doctrine.orm.entity_manager') ->getRepository('WallabagCoreBundle:Entry') - ->findOneById(1); + ->findOneByIsStarred(false); $client->request('GET', '/delete/'.$content->getId()); @@@ -360,13 -360,26 +360,26 @@@ $form['entry_filter[isStarred]']->untick(); $crawler = $client->submit($form); - $this->assertCount(1, $crawler->filter('div[class=entry]')); + $this->assertCount(2, $crawler->filter('div[class=entry]')); $form = $crawler->filter('button[id=submit-filter]')->form(); $form['entry_filter[isArchived]']->untick(); $form['entry_filter[isStarred]']->tick(); $crawler = $client->submit($form); - $this->assertCount(1, $crawler->filter('div[class=entry]')); + $this->assertCount(2, $crawler->filter('div[class=entry]')); } + + public function testPreviewPictureFilter() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/unread/list'); + $form = $crawler->filter('button[id=submit-filter]')->form(); + $form['entry_filter[previewPicture]']->tick(); + + $crawler = $client->submit($form); + $this->assertCount(1, $crawler->filter('div[class=entry]')); + } }