From 9c5ba99450a4df58a1baebff17d29ac4109cc7e2 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Thu, 15 Feb 2024 17:02:30 +0100 Subject: [PATCH] SONAR-21594 Do not show plugins notification twice in marketplace page --- .../js/app/components/__tests__/AdminContainer-test.tsx | 4 ++++ .../src/main/js/app/components/nav/settings/SettingsNav.tsx | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx index cb6bbfe0acf..97efd22ca4b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx @@ -88,6 +88,9 @@ it('should render nav and provide context to children', async () => { expect(byText('DOWN').get()).toBeInTheDocument(); + // Renders plugins notification + expect(ui.pluginsNotification.get()).toBeInTheDocument(); + // Trigger a status update jest.mocked(getSystemStatus).mockResolvedValueOnce({ id: '', version: '', status: 'RESTARTING' }); jest.mocked(waitSystemUPStatus).mockResolvedValueOnce({ id: '', version: '', status: 'UP' }); @@ -160,6 +163,7 @@ function TestChildComponent() { const ui = { navHeader: byRole('heading', { name: 'layout.settings' }), pagesList: byLabelText('pages'), + pluginsNotification: byText('marketplace.instance_needs_to_be_restarted_to'), pluginsInstallingList: byLabelText('plugins - installing'), pluginsUpdatingList: byLabelText('plugins - updating'), pluginsRemovingList: byLabelText('plugins - removing'), diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index 45ee8fd6b01..6b63fecf74f 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -267,12 +267,6 @@ export class SettingsNav extends React.PureComponent { {notifComponent} - ); } -- 2.39.5