]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20023 Disable CCT facets during issue reindexing
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 18 Aug 2023 14:30:48 +0000 (16:30 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 21 Aug 2023 20:02:47 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx

index 965d39f8913881def678514b6fa81b32a76dba87..1cc286451d5f27a362b7708afa9c67dabd610324 100644 (file)
@@ -347,10 +347,10 @@ describe('issues app when reindexing', () => {
     // Enabled facets
     expect(ui.inNewCodeFilter.get()).toBeInTheDocument();
     expect(ui.typeFacet.get()).toBeInTheDocument();
-    expect(ui.cleanCodeAttributeCategoryFacet.get()).toBeInTheDocument();
-    expect(ui.softwareQualityFacet.get()).toBeInTheDocument();
 
     // Disabled facets
+    expect(ui.cleanCodeAttributeCategoryFacet.query()).not.toBeInTheDocument();
+    expect(ui.softwareQualityFacet.query()).not.toBeInTheDocument();
     expect(ui.assigneeFacet.query()).not.toBeInTheDocument();
     expect(ui.authorFacet.query()).not.toBeInTheDocument();
     expect(ui.codeVariantsFacet.query()).not.toBeInTheDocument();
index 82f02d48729e32bcce60649a213c64845df73cfe..ad2a4340e02e698418925464966f690bc4b91297 100644 (file)
@@ -182,31 +182,32 @@ export class SidebarClass extends React.PureComponent<Props> {
           />
         )}
 
-        <AttributeCategoryFacet
-          fetching={this.props.loadingFacets.cleanCodeAttributeCategories === true}
-          needIssueSync={needIssueSync}
-          onChange={this.props.onFilterChange}
-          onToggle={this.props.onFacetToggle}
-          open={!!openFacets.cleanCodeAttributeCategories}
-          stats={facets.cleanCodeAttributeCategories}
-          categories={query.cleanCodeAttributeCategories}
-        />
-        <BasicSeparator className="sw-my-4" />
+        {!needIssueSync && (
+          <>
+            <AttributeCategoryFacet
+              fetching={this.props.loadingFacets.cleanCodeAttributeCategories === true}
+              needIssueSync={needIssueSync}
+              onChange={this.props.onFilterChange}
+              onToggle={this.props.onFacetToggle}
+              open={!!openFacets.cleanCodeAttributeCategories}
+              stats={facets.cleanCodeAttributeCategories}
+              categories={query.cleanCodeAttributeCategories}
+            />
 
-        <SoftwareQualityFacet
-          fetching={this.props.loadingFacets.impactSoftwareQualities === true}
-          needIssueSync={needIssueSync}
-          onChange={this.props.onFilterChange}
-          onToggle={this.props.onFacetToggle}
-          open={!!openFacets.impactSoftwareQualities}
-          stats={facets.impactSoftwareQualities}
-          qualities={query.impactSoftwareQualities}
-        />
+            <BasicSeparator className="sw-my-4" />
 
-        <BasicSeparator className="sw-my-4" />
+            <SoftwareQualityFacet
+              fetching={this.props.loadingFacets.impactSoftwareQualities === true}
+              needIssueSync={needIssueSync}
+              onChange={this.props.onFilterChange}
+              onToggle={this.props.onFacetToggle}
+              open={!!openFacets.impactSoftwareQualities}
+              stats={facets.impactSoftwareQualities}
+              qualities={query.impactSoftwareQualities}
+            />
+
+            <BasicSeparator className="sw-my-4" />
 
-        {!needIssueSync && (
-          <>
             <SeverityFacet
               fetching={this.props.loadingFacets.impactSeverities === true}
               onChange={this.props.onFilterChange}