From 27c86c2c96a6da737ced1f4bedb3d80749897ee4 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <p.gawron@atcomp.pl>
Date: Thu, 26 Sep 2024 09:29:35 +0200
Subject: [PATCH] list of plugins has version

---
 CHANGELOG                                                     | 1 +
 .../AvailablePluginsDrawer.component.test.tsx                 | 2 +-
 .../LoadPlugin/LoadPlugin.component.test.tsx                  | 2 +-
 .../LoadPlugin/LoadPlugin.component.tsx                       | 4 +++-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 553788d8..253994eb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
 minerva-front (18.0.0~beta.3) stable; urgency=medium
   * Bugfix: license info styling (#280)
+  * Bugfix: list of plugins did not contain version (#287)
 
  -- Piotr Gawron <piotr.gawron@uni.lu>  Thu, 26 Sep 2024 13:00:00 +0200
 
diff --git a/src/components/Map/Drawer/AvailablePluginsDrawer/AvailablePluginsDrawer.component.test.tsx b/src/components/Map/Drawer/AvailablePluginsDrawer/AvailablePluginsDrawer.component.test.tsx
index 436f89c6..1e33584b 100644
--- a/src/components/Map/Drawer/AvailablePluginsDrawer/AvailablePluginsDrawer.component.test.tsx
+++ b/src/components/Map/Drawer/AvailablePluginsDrawer/AvailablePluginsDrawer.component.test.tsx
@@ -48,7 +48,7 @@ describe('AvailablePluginsDrawer - component', () => {
           },
         });
 
-        const pluginLabel = screen.getByText(currentPlugin.name);
+        const pluginLabel = screen.getByText(`${currentPlugin.name} (${currentPlugin.version})`);
         expect(pluginLabel).toBeInTheDocument();
       },
     );
diff --git a/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.test.tsx b/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.test.tsx
index ca74841a..a672f76a 100644
--- a/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.test.tsx
+++ b/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.test.tsx
@@ -43,7 +43,7 @@ describe('LoadPlugin - component', () => {
     it('renders plugin name', () => {
       renderComponent({ plugin });
 
-      const title = screen.getByText(plugin.name);
+      const title = screen.getByText(`${plugin.name} (${plugin.version})`);
       expect(title).toBeInTheDocument();
     });
 
diff --git a/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.tsx b/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.tsx
index 72ec131e..b074ab0a 100644
--- a/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.tsx
+++ b/src/components/Map/Drawer/AvailablePluginsDrawer/LoadPlugin/LoadPlugin.component.tsx
@@ -22,7 +22,9 @@ export const LoadPlugin = ({ plugin }: Props): JSX.Element => {
 
   return (
     <div className="flex w-full items-center justify-between text-sm">
-      <span className="text-cetacean-blue">{plugin.name}</span>
+      <span className="text-cetacean-blue">
+        {plugin.name} ({plugin.version})
+      </span>
       <Button
         variantStyles="secondary"
         className="h-10 self-end rounded-e rounded-s text-xs font-medium"
-- 
GitLab