aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectBaseline
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2022-12-20 16:25:47 +0100
committersonartech <sonartech@sonarsource.com>2022-12-21 20:03:47 +0000
commitb5db17b1341d9798ccc8e491b093228b53564719 (patch)
treeba090d72597e6ea8f14b0a2f53903fd103bb8603 /server/sonar-web/src/main/js/apps/projectBaseline
parent13bebcd11575c43ad5075e9e8e066343f5ef4158 (diff)
downloadsonarqube-b5db17b1341d9798ccc8e491b093228b53564719.tar.gz
sonarqube-b5db17b1341d9798ccc8e491b093228b53564719.zip
[NO JIRA] Upgrade jest
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectBaseline')
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/App-test.tsx.snap34
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap6
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BaselineSettingReferenceBranch-test.tsx.snap36
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchAnalysisListRenderer-test.tsx.snap56
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchBaselineSettingModal-test.tsx.snap10
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchList-test.tsx.snap20
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap20
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineSelector-test.tsx.snap4
8 files changed, 93 insertions, 93 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/App-test.tsx.snap
index e642a0c6573..847b62f98de 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -20,7 +20,7 @@ exports[`should render correctly 1`] = `
<ProjectBaselineSelector
analysis=""
branch={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
@@ -28,8 +28,8 @@ exports[`should render correctly 1`] = `
}
}
branchList={
- Array [
- Object {
+ [
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": true,
@@ -42,7 +42,7 @@ exports[`should render correctly 1`] = `
currentSetting="PREVIOUS_VERSION"
days="30"
generalSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
}
}
@@ -79,8 +79,8 @@ exports[`should render correctly 1`] = `
</h2>
<BranchList
branchList={
- Array [
- Object {
+ [
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": true,
@@ -89,29 +89,29 @@ exports[`should render correctly 1`] = `
]
}
component={
- Object {
- "breadcrumbs": Array [],
+ {
+ "breadcrumbs": [],
"key": "my-project",
"name": "MyProject",
"qualifier": "TRK",
- "qualityGate": Object {
+ "qualityGate": {
"isDefault": true,
"key": "30",
"name": "Sonar way",
},
- "qualityProfiles": Array [
- Object {
+ "qualityProfiles": [
+ {
"deleted": false,
"key": "my-qp",
"language": "ts",
"name": "Sonar way",
},
],
- "tags": Array [],
+ "tags": [],
}
}
inheritedSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
"value": undefined,
}
@@ -140,7 +140,7 @@ exports[`should render correctly: without branch support 1`] = `
<ProjectBaselineSelector
analysis=""
branch={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
@@ -148,8 +148,8 @@ exports[`should render correctly: without branch support 1`] = `
}
}
branchList={
- Array [
- Object {
+ [
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": true,
@@ -162,7 +162,7 @@ exports[`should render correctly: without branch support 1`] = `
currentSetting="PREVIOUS_VERSION"
days="30"
generalSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
}
}
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap
index 5eab1023c52..ef814d672ba 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap
@@ -16,7 +16,7 @@ exports[`should render correctly: can admin 1`] = `
defaultMessage="project_baseline.page.description"
id="project_baseline.page.description"
values={
- Object {
+ {
"link": <withAppStateContext(DocLink)
to="/project-administration/defining-new-code/"
>
@@ -30,7 +30,7 @@ exports[`should render correctly: can admin 1`] = `
defaultMessage="project_baseline.page.description2"
id="project_baseline.page.description2"
values={
- Object {
+ {
"link": <ForwardRef(Link)
to="/admin/settings?category=new_code_period"
>
@@ -59,7 +59,7 @@ exports[`should render correctly: cannot admin 1`] = `
defaultMessage="project_baseline.page.description"
id="project_baseline.page.description"
values={
- Object {
+ {
"link": <withAppStateContext(DocLink)
to="/project-administration/defining-new-code/"
>
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BaselineSettingReferenceBranch-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BaselineSettingReferenceBranch-test.tsx.snap
index a481b29936d..3f0251dba3a 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BaselineSettingReferenceBranch-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BaselineSettingReferenceBranch-test.tsx.snap
@@ -3,7 +3,7 @@
exports[`renderOption should render correctly: branch 1`] = `
<Option
data={
- Object {
+ {
"isMain": false,
"label": "branch-7.4",
"value": "branch-7.4",
@@ -21,7 +21,7 @@ exports[`renderOption should render correctly: branch 1`] = `
exports[`renderOption should render correctly: branch doesn't exist 1`] = `
<Option
data={
- Object {
+ {
"isInvalid": true,
"isMain": false,
"value": "branch-nope",
@@ -43,7 +43,7 @@ exports[`renderOption should render correctly: branch doesn't exist 1`] = `
exports[`renderOption should render correctly: disabled 1`] = `
<Option
data={
- Object {
+ {
"isDisabled": true,
"isMain": false,
"label": "disabled",
@@ -64,7 +64,7 @@ exports[`renderOption should render correctly: disabled 1`] = `
exports[`renderOption should render correctly: main 1`] = `
<Option
data={
- Object {
+ {
"isMain": true,
"label": "master",
"value": "master",
@@ -111,14 +111,14 @@ exports[`should render correctly: Branch level - no other branches 1`] = `
<Select
className="little-spacer-top spacer-bottom"
components={
- Object {
+ {
"Option": [Function],
}
}
onChange={[Function]}
options={
- Array [
- Object {
+ [
+ {
"isMain": true,
"label": "master",
"value": "master",
@@ -126,7 +126,7 @@ exports[`should render correctly: Branch level - no other branches 1`] = `
]
}
value={
- Object {
+ {
"isMain": true,
"label": "master",
"value": "master",
@@ -164,19 +164,19 @@ exports[`should render correctly: Branch level 1`] = `
<Select
className="little-spacer-top spacer-bottom"
components={
- Object {
+ {
"Option": [Function],
}
}
onChange={[Function]}
options={
- Array [
- Object {
+ [
+ {
"isMain": true,
"label": "master",
"value": "master",
},
- Object {
+ {
"isMain": false,
"label": "branch-7.9",
"value": "branch-7.9",
@@ -184,7 +184,7 @@ exports[`should render correctly: Branch level 1`] = `
]
}
value={
- Object {
+ {
"isMain": true,
"label": "master",
"value": "master",
@@ -227,19 +227,19 @@ exports[`should render correctly: Project level 1`] = `
<Select
className="little-spacer-top spacer-bottom"
components={
- Object {
+ {
"Option": [Function],
}
}
onChange={[Function]}
options={
- Array [
- Object {
+ [
+ {
"isMain": true,
"label": "master",
"value": "master",
},
- Object {
+ {
"isMain": false,
"label": "branch-7.9",
"value": "branch-7.9",
@@ -247,7 +247,7 @@ exports[`should render correctly: Project level 1`] = `
]
}
value={
- Object {
+ {
"isMain": true,
"label": "master",
"value": "master",
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchAnalysisListRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchAnalysisListRenderer-test.tsx.snap
index 3085961afa5..2f5049e2eff 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchAnalysisListRenderer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchAnalysisListRenderer-test.tsx.snap
@@ -18,20 +18,20 @@ exports[`should render correctly: Analyses 1`] = `
isSearchable={false}
onChange={[MockFunction]}
options={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
- Object {
+ {
"label": "baseline.branch_analyses.ranges.allTime",
"value": 0,
},
]
}
value={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
@@ -114,20 +114,20 @@ exports[`should render correctly: Analyses 1`] = `
<Memo(Events)
analysisKey="3"
events={
- Array [
- Object {
+ [
+ {
"category": "QUALITY_GATE",
"description": "Lorem ipsum dolor sit amet",
"key": "E11",
"name": "Lorem ipsum",
- "qualityGate": Object {
- "failing": Array [
- Object {
+ "qualityGate": {
+ "failing": [
+ {
"branch": "master",
"key": "foo",
"name": "Foo",
},
- Object {
+ {
"branch": "feature/bar",
"key": "bar",
"name": "Bar",
@@ -210,20 +210,20 @@ exports[`should render correctly: Analyses 1`] = `
<Memo(Events)
analysisKey="2"
events={
- Array [
- Object {
+ [
+ {
"category": "QUALITY_GATE",
"description": "Lorem ipsum dolor sit amet",
"key": "E11",
"name": "Lorem ipsum",
- "qualityGate": Object {
- "failing": Array [
- Object {
+ "qualityGate": {
+ "failing": [
+ {
"branch": "master",
"key": "foo",
"name": "Foo",
},
- Object {
+ {
"branch": "feature/bar",
"key": "bar",
"name": "Bar",
@@ -233,7 +233,7 @@ exports[`should render correctly: Analyses 1`] = `
"stillFailing": true,
},
},
- Object {
+ {
"category": "VERSION",
"description": "Lorem ipsum dolor sit amet",
"key": "E11",
@@ -326,20 +326,20 @@ exports[`should render correctly: empty 1`] = `
isSearchable={false}
onChange={[MockFunction]}
options={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
- Object {
+ {
"label": "baseline.branch_analyses.ranges.allTime",
"value": 0,
},
]
}
value={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
@@ -382,20 +382,20 @@ exports[`should render correctly: loading 1`] = `
isSearchable={false}
onChange={[MockFunction]}
options={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
- Object {
+ {
"label": "baseline.branch_analyses.ranges.allTime",
"value": 0,
},
]
}
value={
- Array [
- Object {
+ [
+ {
"label": "baseline.branch_analyses.ranges.30days",
"value": 30,
},
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchBaselineSettingModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchBaselineSettingModal-test.tsx.snap
index 03eb20e011e..bb59bfd7ad5 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchBaselineSettingModal-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchBaselineSettingModal-test.tsx.snap
@@ -42,14 +42,14 @@ exports[`should render correctly: multiple branches 1`] = `
/>
<BaselineSettingReferenceBranch
branchList={
- Array [
- Object {
+ [
+ {
"isDisabled": true,
"isMain": true,
"label": "master",
"value": "master",
},
- Object {
+ {
"isDisabled": false,
"isMain": false,
"label": "branch-6.7",
@@ -129,8 +129,8 @@ exports[`should render correctly: only one branch 1`] = `
/>
<BaselineSettingReferenceBranch
branchList={
- Array [
- Object {
+ [
+ {
"isDisabled": true,
"isMain": true,
"label": "master",
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchList-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchList-test.tsx.snap
index 863633dce9e..89c13ce499f 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchList-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchList-test.tsx.snap
@@ -25,12 +25,12 @@ exports[`should render correctly 1`] = `
<tbody>
<BranchListRow
branch={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": true,
"name": "master",
- "newCodePeriod": Object {
+ "newCodePeriod": {
"effectiveValue": undefined,
"type": "NUMBER_OF_DAYS",
"value": "27",
@@ -38,14 +38,14 @@ exports[`should render correctly 1`] = `
}
}
existingBranches={
- Array [
+ [
"master",
"branch-6.7",
"branch-7.0",
]
}
inheritedSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
}
}
@@ -55,7 +55,7 @@ exports[`should render correctly 1`] = `
/>
<BranchListRow
branch={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
@@ -63,14 +63,14 @@ exports[`should render correctly 1`] = `
}
}
existingBranches={
- Array [
+ [
"master",
"branch-6.7",
"branch-7.0",
]
}
inheritedSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
}
}
@@ -80,7 +80,7 @@ exports[`should render correctly 1`] = `
/>
<BranchListRow
branch={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
@@ -88,14 +88,14 @@ exports[`should render correctly 1`] = `
}
}
existingBranches={
- Array [
+ [
"master",
"branch-6.7",
"branch-7.0",
]
}
inheritedSetting={
- Object {
+ {
"type": "PREVIOUS_VERSION",
}
}
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap
index abb087dc5f7..5df9d7b064a 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap
@@ -9,12 +9,12 @@ exports[`should render correctly: branch with number of days 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
"name": "branch-6.7",
- "newCodePeriod": Object {
+ "newCodePeriod": {
"type": "NUMBER_OF_DAYS",
"value": "21",
},
@@ -61,12 +61,12 @@ exports[`should render correctly: branch with previous version 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
"name": "branch-6.7",
- "newCodePeriod": Object {
+ "newCodePeriod": {
"type": "PREVIOUS_VERSION",
},
}
@@ -112,12 +112,12 @@ exports[`should render correctly: branch with reference branch 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
"name": "branch-6.7",
- "newCodePeriod": Object {
+ "newCodePeriod": {
"type": "REFERENCE_BRANCH",
"value": "master",
},
@@ -164,12 +164,12 @@ exports[`should render correctly: branch with specific analysis 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
"name": "branch-6.7",
- "newCodePeriod": Object {
+ "newCodePeriod": {
"effectiveValue": "2018-12-02T13:01:12",
"type": "SPECIFIC_ANALYSIS",
"value": "A85835",
@@ -220,7 +220,7 @@ exports[`should render correctly: faulty branch 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": false,
@@ -268,7 +268,7 @@ exports[`should render correctly: main branch with default 1`] = `
>
<BranchLikeIcon
branchLike={
- Object {
+ {
"analysisDate": "2018-01-01",
"excludedFromPurge": true,
"isMain": true,
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineSelector-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineSelector-test.tsx.snap
index bb2a408d107..c858bd7c0a0 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineSelector-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineSelector-test.tsx.snap
@@ -62,8 +62,8 @@ exports[`should render correctly 1`] = `
/>
<BaselineSettingReferenceBranch
branchList={
- Array [
- Object {
+ [
+ {
"isMain": true,
"label": "master",
"value": "master",