From 5b5b8389be643026b43cc5b36852b0113fcf05db Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Fri, 12 Jul 2024 09:37:45 +0000 Subject: [PATCH 1/2] added spacing for node status --- .../table/memberHeaderColumns.tsx | 24 ++++++++++++++----- src/locales/en/common.json | 2 +- src/locales/fr/common.json | 2 +- src/locales/pl/common.json | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/components/networkByIdPage/table/memberHeaderColumns.tsx b/src/components/networkByIdPage/table/memberHeaderColumns.tsx index d47027fe..64ee341d 100644 --- a/src/components/networkByIdPage/table/memberHeaderColumns.tsx +++ b/src/components/networkByIdPage/table/memberHeaderColumns.tsx @@ -359,9 +359,15 @@ export const MemberHeaderColumns = ({ nwid, central = false, organizationId }: I } // The user is considered offline return ( - - {c("header.conStatus.offline")} - + + {c("header.conStatus.offline")} + + + ); } @@ -411,9 +417,15 @@ export const MemberHeaderColumns = ({ nwid, central = false, organizationId }: I } return ( - - {c("header.conStatus.offline")} - + + {c("header.conStatus.offline")} + + + ); }, diff --git a/src/locales/en/common.json b/src/locales/en/common.json index 3547df60..e53aa256 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -61,7 +61,7 @@ "directLan": "Direct LAN connection established", "directWan": "Direct WAN connection established", "direct": "DIRECT{version}", - "offline": "offline " + "offline": "offline" }, "status": "Status" }, diff --git a/src/locales/fr/common.json b/src/locales/fr/common.json index 531f3d8f..353b211e 100644 --- a/src/locales/fr/common.json +++ b/src/locales/fr/common.json @@ -61,7 +61,7 @@ "directLan": "Connexion LAN directe établie", "directWan": "Connexion WAN directe établie", "direct": "DIRECTE{version}", - "offline": "hors ligne " + "offline": "hors ligne" }, "status": "Statut" }, diff --git a/src/locales/pl/common.json b/src/locales/pl/common.json index 79b2da3a..23aa8c25 100644 --- a/src/locales/pl/common.json +++ b/src/locales/pl/common.json @@ -61,7 +61,7 @@ "directLan": "Nawiązano bezpośrednie połączenie LAN", "directWan": "Nawiązano bezpośrednie połączenie WAN", "direct": "BEZPOŚREDNIO{version}", - "offline": "OFFLINE " + "offline": "OFFLINE" }, "status": "Status" }, From 5f2e4e5edbeb9ba98d30ceb343910d13e9d8501d Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Fri, 12 Jul 2024 09:49:07 +0000 Subject: [PATCH 2/2] tests --- src/__tests__/pages/network/[id].test.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/__tests__/pages/network/[id].test.tsx b/src/__tests__/pages/network/[id].test.tsx index 09f31007..03d86aec 100644 --- a/src/__tests__/pages/network/[id].test.tsx +++ b/src/__tests__/pages/network/[id].test.tsx @@ -361,7 +361,14 @@ describe("NetworkById component", () => { ); await waitFor( () => { - expect(screen.getByText("offline")).toHaveClass("text-error"); + expect(screen.getByText("offline")); + }, + { timeout: 2000 }, + ); + await waitFor( + () => { + const parentSpan = screen.getByTitle("User is offline"); + expect(parentSpan).toHaveClass("text-error flex gap-1"); }, { timeout: 2000 }, );