do not show deleted menuitems #63

Merged
lubiana merged 3 commits from do-not-show-deleted-menuitems-on-order-add-item into main 2024-09-23 17:12:00 +00:00
Showing only changes of commit ee5d515ac1 - Show all commits

View file

@ -87,8 +87,9 @@ final class MenuItemControllerTest extends DbWebTest
$this->manager->persist($this->vendor);
$this->manager->persist($menuItem);
$order = new FoodOrder();
$order = new FoodOrder;
$order->setFoodVendor($this->vendor);
$this->manager->persist($order);
$this->manager->flush();
$this->assertFalse($menuItem->isDeleted());
@ -101,7 +102,9 @@ final class MenuItemControllerTest extends DbWebTest
$this->assertTrue($menuItem->isDeleted());
$crawler = $this->client->request('GET', '/order/item/new/' . $order->getId());
$count = $crawler->filter('body > main:nth-child(2) > div:nth-child(5)')->children()->count();
$count = $crawler->filter('body > main:nth-child(2) > div:nth-child(5)')
->children()
->count();
$this->assertSame(0, $count);
$this->assertResponseIsSuccessful();