Compare commits

..

3 commits

Author SHA1 Message Date
Continuous Integration
ee5d515ac1 Continuous Integration Fixes
All checks were successful
/ ls (push) Successful in 2m17s
/ ls (release) Successful in 54s
2024-09-23 17:11:33 +00:00
80758abd60
fix ci
All checks were successful
/ ls (pull_request) Successful in 2m23s
2024-09-23 19:09:18 +02:00
9e35499269
do not show deleted menuitems
Some checks failed
/ ls (pull_request) Failing after 2m23s
2024-09-23 19:02:17 +02:00
5 changed files with 20 additions and 3 deletions

View file

@ -9,7 +9,7 @@ jobs:
env:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GIT_SERVER: 'hannover.ccc.de/gitlab'
GIT_SERVER: 'git.hannover.ccc.de'
run: |
git clone --branch $GITHUB_HEAD_REF https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch

View file

@ -13,7 +13,7 @@ jobs:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
BRANCH: '${{ env.GITHUB_REF_NAME }}'
GIT_SERVER: 'hannover.ccc.de/gitlab'
GIT_SERVER: 'git.hannover.ccc.de'
run: |
git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch

View file

@ -13,7 +13,8 @@
"mutators": {
"@default": true,
"global-ignore": [
"App\\Service\\Favicon::__toString"
"App\\Service\\Favicon::__toString",
"ORM\\Column.*"
]
}
}

View file

@ -56,6 +56,7 @@ final class OrderItemController extends AbstractController
}
$menuItems = $menuItemRepository->findBy([
'foodVendor' => $foodOrder->getFoodVendor(),
'deletedAt' => null,
]);
return $this->render('order_item/new.html.twig', [

View file

@ -2,6 +2,7 @@
namespace App\Tests\Controller;
use App\Entity\FoodOrder;
use App\Entity\FoodVendor;
use App\Entity\MenuItem;
use App\Tests\DbWebTest;
@ -85,6 +86,11 @@ final class MenuItemControllerTest extends DbWebTest
$this->vendor->addMenuItem($menuItem);
$this->manager->persist($this->vendor);
$this->manager->persist($menuItem);
$order = new FoodOrder;
$order->setFoodVendor($this->vendor);
$this->manager->persist($order);
$this->manager->flush();
$this->assertFalse($menuItem->isDeleted());
@ -94,5 +100,14 @@ final class MenuItemControllerTest extends DbWebTest
$menuItem = $this->repository->find($menuItem->getId());
$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();
$this->assertSame(0, $count);
$this->assertResponseIsSuccessful();
}
}