From 67e4c88be7608062a24d8a4cbaa9e3e39da46002 Mon Sep 17 00:00:00 2001 From: smilerz Date: Wed, 22 Dec 2021 15:23:16 -0600 Subject: [PATCH] implement related recipes on home page --- cookbook/tests/api/test_api_related_recipe.py | 1 - .../tests/api/test_api_shopping_recipe.py | 1 - .../RecipeSearchView/RecipeSearchView.vue | 4 +- vue/src/components/Buttons/RecipeSwitcher.vue | 79 +++++++++++-------- 4 files changed, 50 insertions(+), 35 deletions(-) diff --git a/cookbook/tests/api/test_api_related_recipe.py b/cookbook/tests/api/test_api_related_recipe.py index ce6221880..1a381ed5c 100644 --- a/cookbook/tests/api/test_api_related_recipe.py +++ b/cookbook/tests/api/test_api_related_recipe.py @@ -65,7 +65,6 @@ def test_related_mixed_space(request, recipe, u1_s2): reverse(RELATED_URL, args={recipe.id})).content)) == 0 -# TODO add tests for mealplan related when thats added # TODO if/when related recipes includes multiple levels (related recipes of related recipes) add the following tests # -- step recipes included in step recipes # -- step recipes included in food recipes diff --git a/cookbook/tests/api/test_api_shopping_recipe.py b/cookbook/tests/api/test_api_shopping_recipe.py index 6b0630c8b..37ac53ba6 100644 --- a/cookbook/tests/api/test_api_shopping_recipe.py +++ b/cookbook/tests/api/test_api_shopping_recipe.py @@ -229,7 +229,6 @@ def test_shopping_recipe_mixed_authors(u1_s1, u2_s1): assert len(json.loads(u2_s1.get(reverse(SHOPPING_LIST_URL)).content)) == 0 -# TODO test adding recipe with ingredients that are not food @pytest.mark.parametrize("recipe", [{'steps__ingredients__header': 1}], indirect=['recipe']) def test_shopping_with_header_ingredient(u1_s1, recipe): # with scope(space=recipe.space): diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index 8efde72ab..9b7571fc8 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -1,5 +1,6 @@