From c03677c4fb673681d7cbcfc56dac53e84e777a34 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:22:32 -0300 Subject: [PATCH] tests: add test to stop building feature (#3364) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ (use-icons-status.tsx): Add data-testid attribute to Loading component for testing purposes ✨ (index.tsx): Add data-testid attribute to stop building button for testing purposes ✨ (stop-building.spec.ts): Add end-to-end test to ensure user can stop a building process * ✨ (stop-building.spec.ts): Add additional tests to ensure the user can stop a building process successfully and verify the button functionality. * test(stop-building.spec.ts): Comment out wait timeouts --------- Co-authored-by: anovazzi1 --- .../CustomNodes/hooks/use-icons-status.tsx | 8 +- .../components/menuBar/index.tsx | 1 + .../tests/end-to-end/stop-building.spec.ts | 295 ++++++++++++++++++ 3 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 src/frontend/tests/end-to-end/stop-building.spec.ts diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index 7a969b965..d2b31509f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -18,7 +18,13 @@ const useIconStatus = ( const renderIconStatus = () => { if (buildStatus === BuildStatus.BUILDING) { - return ; + return ( + + ); } else { return ( <> diff --git a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx index a56abc64e..d59ee1937 100644 --- a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx +++ b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx @@ -310,6 +310,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
{printByBuildStatus()}