aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-03-22 14:20:57 +0100
committersonartech <sonartech@sonarsource.com>2019-03-29 09:44:59 +0100
commit9d62bc6df05b958d154e831a52302e46b89e7d77 (patch)
treeee3c5ba6c29040619a8fcfbae99b487ff10685bb /server/sonar-web/src/main/js
parent17bbc381c796efc51326c96e77c0fe7294c6a010 (diff)
downloadsonarqube-9d62bc6df05b958d154e831a52302e46b89e7d77.tar.gz
sonarqube-9d62bc6df05b958d154e831a52302e46b89e7d77.zip
Update jest and enzyme
* Update jest snapshots
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap1
-rw-r--r--server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap2
12 files changed, 15 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx
index ff7aba0434b..3c7c7492e29 100644
--- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx
@@ -28,7 +28,7 @@ jest.mock('../embed-docs-modal/SuggestionsProvider', () => {
return this.props.children;
}
}
-
+
return { default: SuggestionsProvider };
});
diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap
index 484a153d105..5d4c5d631f2 100644
--- a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalContainer-test.tsx.snap
@@ -20,6 +20,7 @@ exports[`should render correctly 1`] = `
location={
Object {
"action": "PUSH",
+ "hash": "",
"key": "key",
"pathname": "/path",
"query": Object {},
diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx
index 49a261ed482..eb8bf725f06 100644
--- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx
@@ -25,7 +25,6 @@ it('should render correctly, and (un)register the link when (un)mounted', () =>
const link = { key: 'main', label: 'Skip to content' };
const addA11ySkipLink = jest.fn();
const removeA11ySkipLink = jest.fn();
-
const wrapper = mount(
<A11ySkipTargetInner
addA11ySkipLink={addA11ySkipLink}
diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap b/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap
index f0130990dac..8fa473020e6 100644
--- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/__snapshots__/A11ySkipTarget-test.tsx.snap
@@ -15,7 +15,7 @@ exports[`should render correctly, and (un)register the link when (un)mounted 1`]
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap
index c4a8c0e54b4..f1923220a93 100644
--- a/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/__snapshots__/AboutApp-test.tsx.snap
@@ -27,7 +27,7 @@ exports[`should render correctly 1`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
@@ -36,6 +36,7 @@ exports[`should render correctly 1`] = `
location={
Object {
"action": "PUSH",
+ "hash": "",
"key": "key",
"pathname": "/path",
"query": Object {},
@@ -48,6 +49,7 @@ exports[`should render correctly 1`] = `
location={
Object {
"action": "PUSH",
+ "hash": "",
"key": "key",
"pathname": "/path",
"query": Object {},
diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap
index 43ce253d98d..9ede472a8d9 100644
--- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/ManualOrganizationCreate-test.tsx.snap
@@ -53,7 +53,7 @@ exports[`should render and create organization 2`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap
index f6dad80158a..3c461b88591 100644
--- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap
@@ -9,6 +9,7 @@ exports[`should render correctly for SonarCloud 1`] = `
location={
Object {
"action": "PUSH",
+ "hash": "",
"key": "key",
"pathname": "/path",
"query": Object {},
@@ -44,6 +45,7 @@ exports[`should render correctly for SonarQube 1`] = `
location={
Object {
"action": "PUSH",
+ "hash": "",
"key": "key",
"pathname": "/path",
"query": Object {},
diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap
index bbf778c3c50..2b82e47237e 100644
--- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap
@@ -623,7 +623,7 @@ exports[`should edit members 3`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap
index f6722a21bf6..b043072b6a9 100644
--- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/__snapshots__/NewProjectForm-test.tsx.snap
@@ -107,7 +107,7 @@ exports[`creates new project 3`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
@@ -261,7 +261,7 @@ exports[`deletes project 3`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx
index a486991cafe..726948dbd10 100644
--- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx
+++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx
@@ -38,7 +38,7 @@ const excludedUsers = ['admin'];
describe('UsersSelectSearch', () => {
it('should render correctly', () => {
- const onSearch = jest.fn(() => Promise.resolve(users));
+ const onSearch = jest.fn().mockResolvedValue({ users });
const wrapper = shallow(
<UsersSelectSearch
excludedUsers={excludedUsers}
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap
index 4394ef55ac3..3013f367162 100644
--- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap
@@ -51,7 +51,7 @@ exports[`should be actionable 2`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap
index dd0111a0502..dfb462c293f 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueCommentAction-test.tsx.snap
@@ -19,7 +19,7 @@ exports[`should open the popup when the button is clicked 1`] = `
],
"results": Array [
Object {
- "isThrow": false,
+ "type": "return",
"value": undefined,
},
],