]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9777 Open severity facet and close resolutions facet by default
authorStas Vilchik <stas.vilchik@sonarsource.com>
Tue, 10 Oct 2017 12:48:54 +0000 (14:48 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Wed, 11 Oct 2017 10:02:21 +0000 (12:02 +0200)
server/sonar-web/src/main/js/apps/issues/components/App.js
server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.js
server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap
tests/src/test/java/org/sonarqube/tests/ui/UiTest.java

index f7543b877c72e8ca8b73db2ace62a69d18e4c364..f6616f229edfc075884984ea53250fc107b841e1 100644 (file)
@@ -122,7 +122,7 @@ export default class App extends React.PureComponent {
       loading: true,
       locationsNavigator: false,
       myIssues: areMyIssuesSelected(props.location.query),
-      openFacets: { resolutions: true, types: true },
+      openFacets: { severities: true, types: true },
       openIssue: null,
       openPopup: null,
       query: parseQuery(props.location.query),
index 0cf7de366c947b0bcc5cb0b103e9204fbe0bfe3a..d1f77a792021eadb28e77beb71eb9984943f1c5e 100644 (file)
@@ -84,6 +84,14 @@ export default class Sidebar extends React.PureComponent {
           stats={facets.types}
           types={query.types}
         />
+        <SeverityFacet
+          facetMode={query.facetMode}
+          onChange={this.props.onFilterChange}
+          onToggle={this.props.onFacetToggle}
+          open={!!openFacets.severities}
+          severities={query.severities}
+          stats={facets.severities}
+        />
         <ResolutionFacet
           facetMode={query.facetMode}
           onChange={this.props.onFilterChange}
@@ -93,14 +101,6 @@ export default class Sidebar extends React.PureComponent {
           resolutions={query.resolutions}
           stats={facets.resolutions}
         />
-        <SeverityFacet
-          facetMode={query.facetMode}
-          onChange={this.props.onFilterChange}
-          onToggle={this.props.onFacetToggle}
-          open={!!openFacets.severities}
-          severities={query.severities}
-          stats={facets.severities}
-        />
         <StatusFacet
           facetMode={query.facetMode}
           onChange={this.props.onFilterChange}
index 12c174f551ecf06b8d388981e8cff8342d836c02..5cfa13f972faafcfbfee7aff7a55f8c9cf577bca 100644 (file)
@@ -4,8 +4,8 @@ exports[`should render facets for developer 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
@@ -23,8 +23,8 @@ exports[`should render facets for directory 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
@@ -40,8 +40,8 @@ exports[`should render facets for global page 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
@@ -57,8 +57,8 @@ exports[`should render facets for module 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
@@ -76,8 +76,8 @@ exports[`should render facets for project 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
@@ -95,8 +95,8 @@ exports[`should render facets when my issues are selected 1`] = `
 Array [
   "FacetMode",
   "TypeFacet",
-  "ResolutionFacet",
   "SeverityFacet",
+  "ResolutionFacet",
   "StatusFacet",
   "CreationDateFacet",
   "RuleFacet",
index ebb9f9edcc4ec68e07e323c6883fc6aab6e7a710..040498df101addd2f3fa50f814018e0a034501ac 100644 (file)
@@ -122,7 +122,7 @@ public class UiTest {
 
     // on project issues page
     assertThat(url()).contains("/project/issues?id=sample&resolved=false&types=CODE_SMELL");
-    $$(".facet.active").shouldHaveSize(3).find(text("Unresolved")).should(exist);
+    $$(".facet.active").shouldHaveSize(2).find(text("Code Smell")).should(exist);
 
     $("#global-navigation").find("a[href=\"/profiles\"]").click();