From 5291f7fb97b227e8351b7e9558f5159717f382d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 16 Jun 2022 15:11:32 +0200 Subject: [PATCH] Fixed test --- .../Resources/views/themes/material/Tag/tags.html.twig | 2 +- tests/Wallabag/CoreBundle/Controller/TagControllerTest.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig index 713597750..d99875d70 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig @@ -26,7 +26,7 @@ mode_edit {% endif %} - + delete {% if app.user.config.feedToken %} diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php index c9e706bba..843d638c9 100644 --- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php @@ -6,6 +6,9 @@ use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; +/** + * @group Tag + */ class TagControllerTest extends WallabagCoreTestCase { public $tagName = 'opensource'; @@ -161,7 +164,9 @@ class TagControllerTest extends WallabagCoreTestCase $this->getEntityManager()->flush(); $this->getEntityManager()->clear(); - $client->request('GET', '/tag/delete/' . $tag->getSlug()); + $crawler = $client->request('GET', '/tag/list'); + $link = $crawler->filter('a[id="delete-' . $tag->getSlug() . '"]')->link(); + $client->click($link); $tag = $client->getContainer() ->get('doctrine.orm.entity_manager')