]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21594 Do not show plugins notification twice in marketplace page
authorstanislavh <stanislav.honcharov@sonarsource.com>
Thu, 15 Feb 2024 16:02:30 +0000 (17:02 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 16 Feb 2024 20:02:30 +0000 (20:02 +0000)
server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx
server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx

index cb6bbfe0acf981eb0664378ad92f4fc5c61bc4d4..97efd22ca4bc40689d76662828b5503245221bf5 100644 (file)
@@ -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'),
index 45ee8fd6b012b3d46981a81488c16e6bae4439b3..6b63fecf74f99a274ac9b8baffb8e62dffac9f7f 100644 (file)
@@ -267,12 +267,6 @@ export class SettingsNav extends React.PureComponent<Props> {
           </NavBarTabs>
         </TopBar>
         {notifComponent}
-        <PendingPluginsActionNotif
-          fetchSystemStatus={this.props.fetchSystemStatus}
-          pending={pendingPlugins}
-          refreshPending={this.props.fetchPendingPlugins}
-          systemStatus={this.props.systemStatus}
-        />
       </>
     );
   }