1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 07:09:41 +02:00

feat: additional cookbook features (tags, tools, and public) (#1116)

* migration: add public, tags, and tools

* generate frontend types

* add help icon

* start replacement for tool-tag-category selector

* add help icon utility

* use generator types

* add support for cookbook features

* add UI elements for cookbook features

* fix tests

* fix type error
This commit is contained in:
Hayden 2022-04-01 09:50:31 -08:00 committed by GitHub
parent 1092e0ce7c
commit cfaac2e060
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 374 additions and 97 deletions

View file

@ -9,7 +9,6 @@ from pydantic import UUID4
from mealie.repos.repository_factory import AllRepositories
from mealie.schema.cookbook.cookbook import ReadCookBook, SaveCookBook
from tests import utils
from tests.utils.assertion_helpers import assert_ignore_keys
from tests.utils.factories import random_string
from tests.utils.fixture_schemas import TestUser
@ -69,7 +68,13 @@ def test_read_cookbook(api_client: TestClient, unique_user: TestUser, cookbooks:
sample = random.choice(cookbooks)
response = api_client.get(Routes.item(sample.id), headers=unique_user.token)
assert response.status_code == 200
assert_ignore_keys(response.json(), sample.data)
page_data = response.json()
assert page_data["id"] == str(sample.id)
assert page_data["slug"] == sample.slug
assert page_data["name"] == sample.name
assert page_data["groupId"] == str(unique_user.group_id)
def test_update_cookbook(api_client: TestClient, unique_user: TestUser, cookbooks: list[TestCookbook]):