aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/issues/sidebar
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/issues/sidebar
parent3e72937a66a0ca25d8cf2872f614b8edf179c2a8 (diff)
downloadsonarqube-73416c40dcdd5d199df5a1e4741167095650fd8b.tar.gz
sonarqube-73416c40dcdd5d199df5a1e4741167095650fd8b.zip
upgrade jest (#1981)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/sidebar')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/AssigneeFacet-test.js.snap84
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap14
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetBox-test.js.snap7
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetFooter-test.js.snap10
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetHeader-test.js.snap71
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap68
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItemsList-test.js.snap7
7 files changed, 170 insertions, 91 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/AssigneeFacet-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/AssigneeFacet-test.js.snap
index d0de2e5b3cf..4f476fe87e1 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/AssigneeFacet-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/AssigneeFacet-test.js.snap
@@ -1,12 +1,16 @@
-exports[`test should render 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render 1`] = `
<FacetBox
- property="assignees">
+ property="assignees"
+>
<FacetHeader
name="issues.facet.assignees"
onClear={[Function]}
onClick={[Function]}
open={true}
- values={0} />
+ values={0}
+ />
<FacetItemsList>
<FacetItem
active={false}
@@ -16,7 +20,8 @@ exports[`test should render 1`] = `
name="unassigned"
onClick={[Function]}
stat={5}
- value="" />
+ value=""
+ />
<FacetItem
active={false}
disabled={false}
@@ -27,13 +32,15 @@ exports[`test should render 1`] = `
<Connect(Avatar)
className="little-spacer-right"
hash="avatart-foo"
- size={16} />
+ size={16}
+ />
name-foo
</span>
}
onClick={[Function]}
stat={13}
- value="foo" />
+ value="foo"
+ />
<FacetItem
active={false}
disabled={false}
@@ -42,46 +49,53 @@ exports[`test should render 1`] = `
name="bar"
onClick={[Function]}
stat={7}
- value="bar" />
+ value="bar"
+ />
</FacetItemsList>
<FacetFooter
onSearch={[Function]}
onSelect={[Function]}
- renderOption={[Function]} />
+ renderOption={[Function]}
+ />
</FacetBox>
`;
-exports[`test should render footer select option 1`] = `
+exports[`should render footer select option 1`] = `
<span>
<Connect(Avatar)
className="little-spacer-right"
hash="avatar-foo"
- size={16} />
+ size={16}
+ />
name-foo
</span>
`;
-exports[`test should render without stats 1`] = `
+exports[`should render without stats 1`] = `
<FacetBox
- property="assignees">
+ property="assignees"
+>
<FacetHeader
name="issues.facet.assignees"
onClear={[Function]}
onClick={[Function]}
open={true}
- values={0} />
+ values={0}
+ />
</FacetBox>
`;
-exports[`test should select unassigned 1`] = `
+exports[`should select unassigned 1`] = `
<FacetBox
- property="assignees">
+ property="assignees"
+>
<FacetHeader
name="issues.facet.assignees"
onClear={[Function]}
onClick={[Function]}
open={true}
- values={1} />
+ values={1}
+ />
<FacetItemsList>
<FacetItem
active={true}
@@ -91,7 +105,8 @@ exports[`test should select unassigned 1`] = `
name="unassigned"
onClick={[Function]}
stat={5}
- value="" />
+ value=""
+ />
<FacetItem
active={false}
disabled={false}
@@ -102,13 +117,15 @@ exports[`test should select unassigned 1`] = `
<Connect(Avatar)
className="little-spacer-right"
hash="avatart-foo"
- size={16} />
+ size={16}
+ />
name-foo
</span>
}
onClick={[Function]}
stat={13}
- value="foo" />
+ value="foo"
+ />
<FacetItem
active={false}
disabled={false}
@@ -117,24 +134,28 @@ exports[`test should select unassigned 1`] = `
name="bar"
onClick={[Function]}
stat={7}
- value="bar" />
+ value="bar"
+ />
</FacetItemsList>
<FacetFooter
onSearch={[Function]}
onSelect={[Function]}
- renderOption={[Function]} />
+ renderOption={[Function]}
+ />
</FacetBox>
`;
-exports[`test should select user 1`] = `
+exports[`should select user 1`] = `
<FacetBox
- property="assignees">
+ property="assignees"
+>
<FacetHeader
name="issues.facet.assignees"
onClear={[Function]}
onClick={[Function]}
open={true}
- values={1} />
+ values={1}
+ />
<FacetItemsList>
<FacetItem
active={false}
@@ -144,7 +165,8 @@ exports[`test should select user 1`] = `
name="unassigned"
onClick={[Function]}
stat={5}
- value="" />
+ value=""
+ />
<FacetItem
active={true}
disabled={false}
@@ -155,13 +177,15 @@ exports[`test should select user 1`] = `
<Connect(Avatar)
className="little-spacer-right"
hash="avatart-foo"
- size={16} />
+ size={16}
+ />
name-foo
</span>
}
onClick={[Function]}
stat={13}
- value="foo" />
+ value="foo"
+ />
<FacetItem
active={false}
disabled={false}
@@ -170,11 +194,13 @@ exports[`test should select user 1`] = `
name="bar"
onClick={[Function]}
stat={7}
- value="bar" />
+ value="bar"
+ />
</FacetItemsList>
<FacetFooter
onSearch={[Function]}
onSelect={[Function]}
- renderOption={[Function]} />
+ renderOption={[Function]}
+ />
</FacetBox>
`;
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap
index 03bc82ca440..12c174f551e 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/__snapshots__/Sidebar-test.js.snap
@@ -1,4 +1,6 @@
-exports[`test should render facets for developer 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render facets for developer 1`] = `
Array [
"FacetMode",
"TypeFacet",
@@ -17,7 +19,7 @@ Array [
]
`;
-exports[`test should render facets for directory 1`] = `
+exports[`should render facets for directory 1`] = `
Array [
"FacetMode",
"TypeFacet",
@@ -34,7 +36,7 @@ Array [
]
`;
-exports[`test should render facets for global page 1`] = `
+exports[`should render facets for global page 1`] = `
Array [
"FacetMode",
"TypeFacet",
@@ -51,7 +53,7 @@ Array [
]
`;
-exports[`test should render facets for module 1`] = `
+exports[`should render facets for module 1`] = `
Array [
"FacetMode",
"TypeFacet",
@@ -70,7 +72,7 @@ Array [
]
`;
-exports[`test should render facets for project 1`] = `
+exports[`should render facets for project 1`] = `
Array [
"FacetMode",
"TypeFacet",
@@ -89,7 +91,7 @@ Array [
]
`;
-exports[`test should render facets when my issues are selected 1`] = `
+exports[`should render facets when my issues are selected 1`] = `
Array [
"FacetMode",
"TypeFacet",
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetBox-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetBox-test.js.snap
index 2722912ca7d..317329065b1 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetBox-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetBox-test.js.snap
@@ -1,7 +1,10 @@
-exports[`test should render 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render 1`] = `
<div
className="search-navigator-facet-box"
- data-property="foo">
+ data-property="foo"
+>
<div />
</div>
`;
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetFooter-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetFooter-test.js.snap
index 395767344a5..e2475bdc5dd 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetFooter-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetFooter-test.js.snap
@@ -1,11 +1,15 @@
-exports[`test should render 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render 1`] = `
<div
- className="search-navigator-facet-footer">
+ className="search-navigator-facet-footer"
+>
<SearchSelect
autofocus={false}
minimumQueryLength={2}
onSearch={[Function]}
onSelect={[Function]}
- resetOnBlur={true} />
+ resetOnBlur={true}
+ />
</div>
`;
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetHeader-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetHeader-test.js.snap
index e50a3519a42..8c92ac2d4ba 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetHeader-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetHeader-test.js.snap
@@ -1,14 +1,18 @@
-exports[`test should clear 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should clear 1`] = `
<div>
<button
className="search-navigator-facet-header-button button-small button-red"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
clear
</button>
<a
className="search-navigator-facet-header"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
<svg
height="10"
style={
@@ -17,32 +21,36 @@ exports[`test should clear 1`] = `
}
}
viewBox="0 0 1792 1792"
- width="10">
+ width="10"
+ >
<path
d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"
style={
Object {
"fill": "currentColor ",
}
- } />
+ }
+ />
</svg>
foo
<span
- className="spacer-left badge is-rounded">
+ className="spacer-left badge is-rounded"
+ >
3
</span>
</a>
</div>
`;
-exports[`test should render closed facet with value 1`] = `
+exports[`should render closed facet with value 1`] = `
<div>
<a
className="search-navigator-facet-header"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
<svg
height="10"
style={
@@ -51,32 +59,36 @@ exports[`test should render closed facet with value 1`] = `
}
}
viewBox="0 0 1792 1792"
- width="10">
+ width="10"
+ >
<path
d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"
style={
Object {
"fill": "currentColor ",
}
- } />
+ }
+ />
</svg>
foo
<span
- className="spacer-left badge is-rounded">
+ className="spacer-left badge is-rounded"
+ >
1
</span>
</a>
</div>
`;
-exports[`test should render closed facet without value 1`] = `
+exports[`should render closed facet without value 1`] = `
<div>
<a
className="search-navigator-facet-header"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
<svg
height="10"
style={
@@ -85,14 +97,16 @@ exports[`test should render closed facet without value 1`] = `
}
}
viewBox="0 0 1792 1792"
- width="10">
+ width="10"
+ >
<path
d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"
style={
Object {
"fill": "currentColor ",
}
- } />
+ }
+ />
</svg>
foo
@@ -101,12 +115,13 @@ exports[`test should render closed facet without value 1`] = `
</div>
`;
-exports[`test should render open facet with value 1`] = `
+exports[`should render open facet with value 1`] = `
<div>
<a
className="search-navigator-facet-header"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
<svg
height="10"
style={
@@ -115,14 +130,16 @@ exports[`test should render open facet with value 1`] = `
}
}
viewBox="0 0 1792 1792"
- width="10">
+ width="10"
+ >
<path
d="M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"
style={
Object {
"fill": "currentColor ",
}
- } />
+ }
+ />
</svg>
foo
@@ -131,12 +148,13 @@ exports[`test should render open facet with value 1`] = `
</div>
`;
-exports[`test should render open facet without value 1`] = `
+exports[`should render open facet without value 1`] = `
<div>
<a
className="search-navigator-facet-header"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+ >
<svg
height="10"
style={
@@ -145,14 +163,16 @@ exports[`test should render open facet without value 1`] = `
}
}
viewBox="0 0 1792 1792"
- width="10">
+ width="10"
+ >
<path
d="M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"
style={
Object {
"fill": "currentColor ",
}
- } />
+ }
+ />
</svg>
foo
@@ -161,10 +181,11 @@ exports[`test should render open facet without value 1`] = `
</div>
`;
-exports[`test should render without link 1`] = `
+exports[`should render without link 1`] = `
<div>
<span
- className="search-navigator-facet-header">
+ className="search-navigator-facet-header"
+ >
foo
</span>
</div>
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap
index 0a22b710499..1d5c7a04b95 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap
@@ -1,89 +1,109 @@
-exports[`test should render active 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render active 1`] = `
<a
className="facet search-navigator-facet active"
data-value="bar"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat" />
+ className="facet-stat"
+ />
</a>
`;
-exports[`test should render disabled 1`] = `
+exports[`should render disabled 1`] = `
<span
- className="facet search-navigator-facet">
+ className="facet search-navigator-facet"
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat" />
+ className="facet-stat"
+ />
</span>
`;
-exports[`test should render effort stat 1`] = `
+exports[`should render effort stat 1`] = `
<a
className="facet search-navigator-facet"
data-value="bar"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
work_duration.x_days.3
</span>
</a>
`;
-exports[`test should render half width 1`] = `
+exports[`should render half width 1`] = `
<a
className="facet search-navigator-facet search-navigator-facet-half"
data-value="bar"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat" />
+ className="facet-stat"
+ />
</a>
`;
-exports[`test should render inactive 1`] = `
+exports[`should render inactive 1`] = `
<a
className="facet search-navigator-facet"
data-value="bar"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat" />
+ className="facet-stat"
+ />
</a>
`;
-exports[`test should render stat 1`] = `
+exports[`should render stat 1`] = `
<a
className="facet search-navigator-facet"
data-value="bar"
href="#"
- onClick={[Function]}>
+ onClick={[Function]}
+>
<span
- className="facet-name">
+ className="facet-name"
+ >
foo
</span>
<span
- className="facet-stat">
+ className="facet-stat"
+ >
13
</span>
</a>
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItemsList-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItemsList-test.js.snap
index 15686ac81d6..9962cfc364e 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItemsList-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItemsList-test.js.snap
@@ -1,6 +1,9 @@
-exports[`test should render 1`] = `
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render 1`] = `
<div
- className="search-navigator-facet-list">
+ className="search-navigator-facet-list"
+>
<div />
</div>
`;