mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 00:04:23 -04: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:
@@ -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]):
|
||||
|
||||
Reference in New Issue
Block a user