From 4916f7f05045e8ff4397b1da4cbae781e5761c79 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 11 Mar 2024 18:00:46 -0300 Subject: [PATCH] Refactor App component and update test_helper_components.py --- src/frontend/src/App.tsx | 20 +++++++++++--------- tests/test_helper_components.py | 8 ++------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 0af87df78..be45e2eab 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -103,7 +103,7 @@ export default function App() {
-
+
{tempNotificationList.map((alert) => (
{alert.type === "error" && ( @@ -118,7 +118,7 @@ export default function App() {
))}
-
+
{tempNotificationList.map((alert) => (
{alert.type === "notice" ? ( @@ -129,13 +129,15 @@ export default function App() { id={alert.id} removeAlert={removeAlert} /> - ) : alert.type === "success" && ( - + ) : ( + alert.type === "success" && ( + + ) )}
))} diff --git a/tests/test_helper_components.py b/tests/test_helper_components.py index 82515b699..fcbb3b3f3 100644 --- a/tests/test_helper_components.py +++ b/tests/test_helper_components.py @@ -24,9 +24,7 @@ def test_document_to_record_component(): # Act # Replace with your actual test data - document = Document( - page_content="key: value", metadata={"url": "https://example.com"} - ) + document = Document(page_content="key: value", metadata={"url": "https://example.com"}) result = document_to_record_component.build(document) # Assert @@ -44,9 +42,7 @@ def test_uuid_generator_component(): # Act build_config = frontend_node.get("template") field_name = "unique_id" - build_config = uuid_generator_component.update_build_config( - build_config, None, field_name - ) + build_config = uuid_generator_component.update_build_config(build_config, None, field_name) unique_id = build_config["unique_id"]["value"] result = uuid_generator_component.build(unique_id)