aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-04-27 09:07:29 +0200
committerGitHub <noreply@github.com>2017-04-27 09:07:29 +0200
commit73416c40dcdd5d199df5a1e4741167095650fd8b (patch)
treec5b32204bcde1376ebd3c0fae76a4dea0fadee9f /server/sonar-web/src/main/js/apps/projects
parent3e72937a66a0ca25d8cf2872f614b8edf179c2a8 (diff)
downloadsonarqube-73416c40dcdd5d199df5a1e4741167095650fd8b.tar.gz
sonarqube-73416c40dcdd5d199df5a1e4741167095650fd8b.zip
upgrade jest (#1981)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageSidebar-test.js.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCard-test.js.snap50
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardMeasures-test.js.snap308
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ViewSelect-test.js.snap7
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.js.snap85
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchFilter-test.js.snap46
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap22
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SortingFilter-test.js.snap58
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap96
9 files changed, 452 insertions, 232 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageSidebar-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageSidebar-test.js.snap
index faf96ac7d0a..2c203e41f6f 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageSidebar-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageSidebar-test.js.snap
@@ -1,8 +1,11 @@
-exports[`test should handle \`view\` and \`visualization\` 1`] = `undefined`;
+// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`test should handle \`view\` and \`visualization\` 2`] = `
+exports[`should handle \`view\` and \`visualization\` 1`] = `undefined`;
+
+exports[`should handle \`view\` and \`visualization\` 2`] = `
<div
- className="projects-facets-reset">
+ className="projects-facets-reset"
+>
<Link
className="button button-red"
onlyActiveOnIndex={false}
@@ -15,7 +18,8 @@ exports[`test should handle \`view\` and \`visualization\` 2`] = `
"visualization": "bugs",
},
}
- }>
+ }
+ >
clear_all_filters
</Link>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCard-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCard-test.js.snap
index 017cb79cab6..5221745c187 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCard-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCard-test.js.snap
@@ -1,18 +1,24 @@
-exports[`test should display analysis date 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should display analysis date 1`] = `
<div
- className="project-card-analysis-date note">
+ className="project-card-analysis-date note"
+>
overview.last_analysis_on_x.January 1, 2017 12:00 AM
</div>
`;
-exports[`test should display loading 1`] = `
+exports[`should display loading 1`] = `
<div
className="boxed-group project-card boxed-group-loading"
- data-key="foo">
+ data-key="foo"
+>
<div
- className="boxed-group-header">
+ className="boxed-group-header"
+ >
<h2
- className="project-card-name">
+ className="project-card-name"
+ >
<Link
onlyActiveOnIndex={false}
style={Object {}}
@@ -23,28 +29,34 @@ exports[`test should display loading 1`] = `
"id": "foo",
},
}
- }>
+ }
+ >
Foo
</Link>
</h2>
</div>
<div
- className="boxed-group-inner" />
+ className="boxed-group-inner"
+ />
<div
- className="project-card-analysis-date note">
+ className="project-card-analysis-date note"
+ >
overview.last_analysis_on_x.January 1, 2017 12:00 AM
</div>
</div>
`;
-exports[`test should display tags 1`] = `
+exports[`should display tags 1`] = `
<div
className="boxed-group project-card boxed-group-loading"
- data-key="foo">
+ data-key="foo"
+>
<div
- className="boxed-group-header">
+ className="boxed-group-header"
+ >
<h2
- className="project-card-name">
+ className="project-card-name"
+ >
<Link
onlyActiveOnIndex={false}
style={Object {}}
@@ -55,7 +67,8 @@ exports[`test should display tags 1`] = `
"id": "foo",
},
}
- }>
+ }
+ >
Foo
</Link>
</h2>
@@ -67,12 +80,15 @@ exports[`test should display tags 1`] = `
"foo",
"bar",
]
- } />
+ }
+ />
</div>
<div
- className="boxed-group-inner" />
+ className="boxed-group-inner"
+ />
<div
- className="project-card-analysis-date note">
+ className="project-card-analysis-date note"
+ >
overview.last_analysis_on_x.January 1, 2017 12:00 AM
</div>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardMeasures-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardMeasures-test.js.snap
index 42c81f82b0d..787d967682c 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardMeasures-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardMeasures-test.js.snap
@@ -1,67 +1,88 @@
-exports[`test should not render coverage 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should not render coverage 1`] = `
<div
- className="project-card-measures">
+ className="project-card-measures"
+>
<div
className="project-card-measure"
- data-key="reliability_rating">
+ data-key="reliability_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Reliability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="security_rating">
+ data-key="security_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Security
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="sqale_rating">
+ data-key="sqale_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Maintainability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="coverage">
+ data-key="coverage"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Measure
measure={
Object {
@@ -73,27 +94,34 @@ exports[`test should not render coverage 1`] = `
"key": "coverage",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.coverage.name
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="duplicated_lines_density">
+ data-key="duplicated_lines_density"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<DuplicationsRating
muted={false}
small={false}
- value="9.8" />
+ value="9.8"
+ />
</span>
<Measure
measure={
@@ -106,27 +134,34 @@ exports[`test should not render coverage 1`] = `
"key": "duplicated_lines_density",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.duplicated_lines_density.short_name
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="ncloc">
+ data-key="ncloc"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<SizeRating
muted={false}
small={false}
- value="2053" />
+ value="2053"
+ />
</span>
<Measure
measure={
@@ -139,10 +174,12 @@ exports[`test should not render coverage 1`] = `
"key": "ncloc",
"type": "SHORT_INT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
<Connect(ProjectCardLanguages) />
</div>
</div>
@@ -150,76 +187,97 @@ exports[`test should not render coverage 1`] = `
</div>
`;
-exports[`test should not render duplications 1`] = `
+exports[`should not render duplications 1`] = `
<div
- className="project-card-measures">
+ className="project-card-measures"
+>
<div
className="project-card-measure"
- data-key="reliability_rating">
+ data-key="reliability_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Reliability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="security_rating">
+ data-key="security_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Security
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="sqale_rating">
+ data-key="sqale_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Maintainability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="coverage">
+ data-key="coverage"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<CoverageRating
muted={false}
size="normal"
- value="88.3" />
+ value="88.3"
+ />
</span>
<Measure
measure={
@@ -232,21 +290,26 @@ exports[`test should not render duplications 1`] = `
"key": "coverage",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.coverage.name
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="duplicated_lines_density">
+ data-key="duplicated_lines_density"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Measure
measure={
Object {
@@ -258,27 +321,34 @@ exports[`test should not render duplications 1`] = `
"key": "duplicated_lines_density",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.duplicated_lines_density.short_name
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="ncloc">
+ data-key="ncloc"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<SizeRating
muted={false}
small={false}
- value="2053" />
+ value="2053"
+ />
</span>
<Measure
measure={
@@ -291,10 +361,12 @@ exports[`test should not render duplications 1`] = `
"key": "ncloc",
"type": "SHORT_INT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
<Connect(ProjectCardLanguages) />
</div>
</div>
@@ -302,76 +374,97 @@ exports[`test should not render duplications 1`] = `
</div>
`;
-exports[`test should not render ncloc 1`] = `
+exports[`should not render ncloc 1`] = `
<div
- className="project-card-measures">
+ className="project-card-measures"
+>
<div
className="project-card-measure"
- data-key="reliability_rating">
+ data-key="reliability_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Reliability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="security_rating">
+ data-key="security_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Security
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="sqale_rating">
+ data-key="sqale_rating"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<Rating
muted={false}
small={false}
- value="1.0" />
+ value="1.0"
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric_domain.Maintainability
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="coverage">
+ data-key="coverage"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<CoverageRating
muted={false}
size="normal"
- value="88.3" />
+ value="88.3"
+ />
</span>
<Measure
measure={
@@ -384,27 +477,34 @@ exports[`test should not render ncloc 1`] = `
"key": "coverage",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.coverage.name
</div>
</div>
</div>
<div
className="project-card-measure"
- data-key="duplicated_lines_density">
+ data-key="duplicated_lines_density"
+ >
<div
- className="project-card-measure-inner">
+ className="project-card-measure-inner"
+ >
<div
- className="project-card-measure-number">
+ className="project-card-measure-number"
+ >
<span
- className="spacer-right">
+ className="spacer-right"
+ >
<DuplicationsRating
muted={false}
small={false}
- value="9.8" />
+ value="9.8"
+ />
</span>
<Measure
measure={
@@ -417,10 +517,12 @@ exports[`test should not render ncloc 1`] = `
"key": "duplicated_lines_density",
"type": "PERCENT",
}
- } />
+ }
+ />
</div>
<div
- className="project-card-measure-label">
+ className="project-card-measure-label"
+ >
metric.duplicated_lines_density.short_name
</div>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ViewSelect-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ViewSelect-test.js.snap
index 3e24cf0fcb0..9a7d8d66e31 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ViewSelect-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ViewSelect-test.js.snap
@@ -1,4 +1,6 @@
-exports[`test should render options 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render options 1`] = `
<RadioToggle
disabled={false}
name="view"
@@ -15,5 +17,6 @@ exports[`test should render options 1`] = `
},
]
}
- value="visualizations" />
+ value="visualizations"
+/>
`;
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.js.snap
index 05f9bb21bf6..ce37370ca0f 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.js.snap
@@ -1,4 +1,6 @@
-exports[`test should render maximum 10 languages in the searchbox results 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render maximum 10 languages in the searchbox results 1`] = `
<Filter
facet={
Object {
@@ -68,13 +70,15 @@ exports[`test should render maximum 10 languages in the searchbox results 1`] =
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Languages" />
+ name="Languages"
+ />
}
highlightUnder={1}
isFavorite={true}
@@ -101,10 +105,11 @@ exports[`test should render maximum 10 languages in the searchbox results 1`] =
"java",
"g",
]
- } />
+ }
+/>
`;
-exports[`test should render the languages facet with the selected languages 1`] = `
+exports[`should render the languages facet with the selected languages 1`] = `
<Filter
facet={
Object {
@@ -145,13 +150,15 @@ exports[`test should render the languages facet with the selected languages 1`]
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Languages" />
+ name="Languages"
+ />
}
highlightUnder={1}
isFavorite={true}
@@ -177,17 +184,21 @@ exports[`test should render the languages facet with the selected languages 1`]
"java",
"cs",
]
- } />
+ }
+/>
`;
-exports[`test should render the languages facet with the selected languages 2`] = `
+exports[`should render the languages facet with the selected languages 2`] = `
<div
className="search-navigator-facet-box"
- data-key="languages">
+ data-key="languages"
+>
<FilterHeader
- name="Languages" />
+ name="Languages"
+ />
<div
- className="search-navigator-facet-list">
+ className="search-navigator-facet-list"
+ >
<Link
className="facet search-navigator-facet projects-facet active"
data-key="java"
@@ -200,9 +211,11 @@ exports[`test should render the languages facet with the selected languages 2`]
"languages": "cs",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
option={
Object {
@@ -210,10 +223,12 @@ exports[`test should render the languages facet with the selected languages 2`]
"name": "Java",
}
}
- optionKey="java" />
+ optionKey="java"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
39
</span>
</Link>
@@ -229,9 +244,11 @@ exports[`test should render the languages facet with the selected languages 2`]
"languages": "java",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
option={
Object {
@@ -239,10 +256,12 @@ exports[`test should render the languages facet with the selected languages 2`]
"name": "C#",
}
}
- optionKey="cs" />
+ optionKey="cs"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
4
</span>
</Link>
@@ -258,9 +277,11 @@ exports[`test should render the languages facet with the selected languages 2`]
"languages": "java,cs,js",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
option={
Object {
@@ -268,10 +289,12 @@ exports[`test should render the languages facet with the selected languages 2`]
"name": "JavaScript",
}
}
- optionKey="js" />
+ optionKey="js"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
1
</span>
</Link>
@@ -307,11 +330,12 @@ exports[`test should render the languages facet with the selected languages 2`]
Object {
"push": [Function],
}
- } />
+ }
+ />
</div>
`;
-exports[`test should render the languages without the ones in the facet 1`] = `
+exports[`should render the languages without the ones in the facet 1`] = `
<Filter
facet={
Object {
@@ -348,13 +372,15 @@ exports[`test should render the languages without the ones in the facet 1`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Languages" />
+ name="Languages"
+ />
}
highlightUnder={1}
options={
@@ -370,5 +396,6 @@ exports[`test should render the languages without the ones in the facet 1`] = `
"languages": null,
}
}
- renderOption={[Function]} />
+ renderOption={[Function]}
+/>
`;
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchFilter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchFilter-test.js.snap
index 55bfe8e9fa9..0fd5b0f6cb4 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchFilter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchFilter-test.js.snap
@@ -1,70 +1,84 @@
-exports[`test should display a help message when there is less than 2 characters 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should display a help message when there is less than 2 characters 1`] = `
<div
className="projects-facet-search"
- data-key="search">
+ data-key="search"
+>
<input
autoComplete="off"
className="input-super-large touched"
onChange={[Function]}
placeholder="projects.search"
type="search"
- value="a" />
+ value="a"
+ />
<span
- className="note spacer-left">
+ className="note spacer-left"
+ >
select2.tooShort.2
</span>
</div>
`;
-exports[`test should display a help message when there is less than 2 characters 2`] = `
+exports[`should display a help message when there is less than 2 characters 2`] = `
<div
className="projects-facet-search"
- data-key="search">
+ data-key="search"
+>
<input
autoComplete="off"
className="input-super-large"
onChange={[Function]}
placeholder="projects.search"
type="search"
- value="foo" />
+ value="foo"
+ />
<span
- className="note spacer-left">
+ className="note spacer-left"
+ >
select2.tooShort.2
</span>
</div>
`;
-exports[`test should render correctly without any search query 1`] = `
+exports[`should render correctly without any search query 1`] = `
<div
className="projects-facet-search"
- data-key="search">
+ data-key="search"
+>
<input
autoComplete="off"
className="input-super-large"
onChange={[Function]}
placeholder="projects.search"
type="search"
- value="" />
+ value=""
+ />
<span
- className="note spacer-left">
+ className="note spacer-left"
+ >
select2.tooShort.2
</span>
</div>
`;
-exports[`test should render with a search query 1`] = `
+exports[`should render with a search query 1`] = `
<div
className="projects-facet-search"
- data-key="search">
+ data-key="search"
+>
<input
autoComplete="off"
className="input-super-large"
onChange={[Function]}
placeholder="projects.search"
type="search"
- value="foo" />
+ value="foo"
+ />
<span
- className="note spacer-left">
+ className="note spacer-left"
+ >
select2.tooShort.2
</span>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap
index 4fc96d9d2e6..59dc178ab24 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap
@@ -1,8 +1,11 @@
-exports[`test should render the languages without the ones in the facet 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render the languages without the ones in the facet 1`] = `
<div
- className="search-navigator-facet-footer projects-facet-footer">
+ className="search-navigator-facet-footer projects-facet-footer"
+>
<Select
- addLabelText="Add \"{label}\"?"
+ addLabelText="Add \\"{label}\\"?"
arrowRenderer={[Function]}
autosize={true}
backspaceRemoves={true}
@@ -56,15 +59,17 @@ exports[`test should render the languages without the ones in the facet 1`] = `
simpleValue={false}
tabSelectsValue={true}
valueComponent={[Function]}
- valueKey="value" />
+ valueKey="value"
+ />
</div>
`;
-exports[`test should render the tags without the ones in the facet 1`] = `
+exports[`should render the tags without the ones in the facet 1`] = `
<div
- className="search-navigator-facet-footer projects-facet-footer">
+ className="search-navigator-facet-footer projects-facet-footer"
+>
<Select
- addLabelText="Add \"{label}\"?"
+ addLabelText="Add \\"{label}\\"?"
arrowRenderer={[Function]}
autosize={true}
backspaceRemoves={true}
@@ -118,6 +123,7 @@ exports[`test should render the tags without the ones in the facet 1`] = `
simpleValue={false}
tabSelectsValue={true}
valueComponent={[Function]}
- valueKey="value" />
+ valueKey="value"
+ />
</div>
`;
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SortingFilter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SortingFilter-test.js.snap
index a7a70e63f93..3854d9fdf16 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SortingFilter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SortingFilter-test.js.snap
@@ -1,11 +1,15 @@
-exports[`test should render correctly with matching query 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render correctly with matching query 1`] = `
<div
- className="projects-facet-sort">
+ className="projects-facet-sort"
+>
<span>
projects.sort_list
</span>
<div
- className="spacer-left button-group">
+ className="spacer-left button-group"
+ >
<Link
className="button button-small button-grey"
onClick={[Function]}
@@ -19,7 +23,8 @@ exports[`test should render correctly with matching query 1`] = `
"sort": "foo",
},
}
- }>
+ }
+ >
worst
</Link>
<Link
@@ -34,21 +39,24 @@ exports[`test should render correctly with matching query 1`] = `
"languages": "php,cpp",
},
}
- }>
+ }
+ >
best
</Link>
</div>
</div>
`;
-exports[`test should render correctly with no matching query 1`] = `
+exports[`should render correctly with no matching query 1`] = `
<div
- className="projects-facet-sort">
+ className="projects-facet-sort"
+>
<span>
projects.sort_list
</span>
<div
- className="spacer-left button-group">
+ className="spacer-left button-group"
+ >
<Link
className="button button-small button-grey"
onClick={[Function]}
@@ -61,7 +69,8 @@ exports[`test should render correctly with no matching query 1`] = `
"sort": "-foo",
},
}
- }>
+ }
+ >
worst
</Link>
<Link
@@ -76,21 +85,24 @@ exports[`test should render correctly with no matching query 1`] = `
"sort": "foo",
},
}
- }>
+ }
+ >
best
</Link>
</div>
</div>
`;
-exports[`test should render with custom parameters 1`] = `
+exports[`should render with custom parameters 1`] = `
<div
- className="projects-facet-sort">
+ className="projects-facet-sort"
+>
<span>
projects.sort_list
</span>
<div
- className="spacer-left button-group">
+ className="spacer-left button-group"
+ >
<Link
className="button button-small button-grey"
onClick={[Function]}
@@ -103,7 +115,8 @@ exports[`test should render with custom parameters 1`] = `
"sort": "foo",
},
}
- }>
+ }
+ >
worst
</Link>
<Link
@@ -118,21 +131,24 @@ exports[`test should render with custom parameters 1`] = `
"sort": "-foo",
},
}
- }>
+ }
+ >
best
</Link>
</div>
</div>
`;
-exports[`test should render with default parameters and empty query 1`] = `
+exports[`should render with default parameters and empty query 1`] = `
<div
- className="projects-facet-sort">
+ className="projects-facet-sort"
+>
<span>
projects.sort_list
</span>
<div
- className="spacer-left button-group">
+ className="spacer-left button-group"
+ >
<Link
className="button button-small button-grey"
onClick={[Function]}
@@ -145,7 +161,8 @@ exports[`test should render with default parameters and empty query 1`] = `
"sort": "-foo",
},
}
- }>
+ }
+ >
worst
</Link>
<Link
@@ -160,7 +177,8 @@ exports[`test should render with default parameters and empty query 1`] = `
"sort": "foo",
},
}
- }>
+ }
+ >
best
</Link>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap
index 82668053b64..aeaa01f2554 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap
@@ -1,4 +1,6 @@
-exports[`test should render maximum 10 tags in the searchbox results 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render maximum 10 tags in the searchbox results 1`] = `
<Filter
facet={
Object {
@@ -71,13 +73,15 @@ exports[`test should render maximum 10 tags in the searchbox results 1`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Tags" />
+ name="Tags"
+ />
}
highlightUnder={1}
isFavorite={true}
@@ -104,10 +108,11 @@ exports[`test should render maximum 10 tags in the searchbox results 1`] = `
"java",
"ad",
]
- } />
+ }
+/>
`;
-exports[`test should render the tags facet with the selected tags 1`] = `
+exports[`should render the tags facet with the selected tags 1`] = `
<Filter
facet={
Object {
@@ -136,13 +141,15 @@ exports[`test should render the tags facet with the selected tags 1`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Tags" />
+ name="Tags"
+ />
}
highlightUnder={1}
isFavorite={true}
@@ -168,17 +175,21 @@ exports[`test should render the tags facet with the selected tags 1`] = `
"lang",
"sonar",
]
- } />
+ }
+/>
`;
-exports[`test should render the tags facet with the selected tags 2`] = `
+exports[`should render the tags facet with the selected tags 2`] = `
<div
className="search-navigator-facet-box"
- data-key="tags">
+ data-key="tags"
+>
<FilterHeader
- name="Tags" />
+ name="Tags"
+ />
<div
- className="search-navigator-facet-list">
+ className="search-navigator-facet-list"
+ >
<Link
className="facet search-navigator-facet projects-facet active"
data-key="lang"
@@ -191,14 +202,18 @@ exports[`test should render the tags facet with the selected tags 2`] = `
"tags": "sonar",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
- optionKey="lang" />
+ optionKey="lang"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
4
</span>
</Link>
@@ -214,14 +229,18 @@ exports[`test should render the tags facet with the selected tags 2`] = `
"tags": "lang",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
- optionKey="sonar" />
+ optionKey="sonar"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
3
</span>
</Link>
@@ -237,14 +256,18 @@ exports[`test should render the tags facet with the selected tags 2`] = `
"tags": "lang,sonar,csharp",
},
}
- }>
+ }
+ >
<span
- className="facet-name">
+ className="facet-name"
+ >
<SearchableFilterOption
- optionKey="csharp" />
+ optionKey="csharp"
+ />
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
1
</span>
</Link>
@@ -268,11 +291,12 @@ exports[`test should render the tags facet with the selected tags 2`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
</div>
`;
-exports[`test should render the tags without the ones in the facet 1`] = `
+exports[`should render the tags without the ones in the facet 1`] = `
<Filter
facet={
Object {
@@ -297,13 +321,15 @@ exports[`test should render the tags without the ones in the facet 1`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Tags" />
+ name="Tags"
+ />
}
highlightUnder={1}
options={
@@ -319,10 +345,11 @@ exports[`test should render the tags without the ones in the facet 1`] = `
"tags": null,
}
}
- renderOption={[Function]} />
+ renderOption={[Function]}
+/>
`;
-exports[`test should render the tags without the ones in the facet 2`] = `
+exports[`should render the tags without the ones in the facet 2`] = `
<Filter
facet={
Object {
@@ -362,13 +389,15 @@ exports[`test should render the tags without the ones in the facet 2`] = `
Object {
"push": [Function],
}
- } />
+ }
+ />
}
getFacetValueForOption={[Function]}
halfWidth={false}
header={
<FilterHeader
- name="Tags" />
+ name="Tags"
+ />
}
highlightUnder={1}
options={
@@ -384,5 +413,6 @@ exports[`test should render the tags without the ones in the facet 2`] = `
"tags": null,
}
}
- renderOption={[Function]} />
+ renderOption={[Function]}
+/>
`;