aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-05-15 13:27:26 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-15 20:20:50 +0200
commit05a73f23b2e922de87d37dc101728c94dfee7648 (patch)
treedf30cf01bd96ea03a9253d04f8fab17f116a4b2a /server/sonar-web/src
parentc449191069573ef348bdd5a0c43f2593bd84f198 (diff)
downloadsonarqube-05a73f23b2e922de87d37dc101728c94dfee7648.tar.gz
sonarqube-05a73f23b2e922de87d37dc101728c94dfee7648.zip
update sonar-web dependencies (#239)
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Projects-test.tsx.snap3
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/Form-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js1
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfilePermissionsFormSelect-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OrganizationStep-test.js.snap14
-rw-r--r--server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx4
-rw-r--r--server/sonar-web/src/main/js/components/controls/Modal.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/controls/SearchSelect.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.js1
19 files changed, 25 insertions, 27 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
index 77f7876bb7d..87534d86b24 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
+++ b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
@@ -136,7 +136,6 @@ export default class Projects extends React.PureComponent<Props, State> {
cache={false}
className="input-super-large"
loadOptions={this.loadOptions}
- minimumInput={2}
name="new_project"
onChange={this.handleAddProject}
optionRenderer={this.renderOption}
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Projects-test.tsx.snap b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Projects-test.tsx.snap
index 74aceb01f8f..72fd77b67c3 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Projects-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Projects-test.tsx.snap
@@ -103,7 +103,6 @@ exports[`should render projects 1`] = `
cache={false}
className="input-super-large"
loadOptions={[Function]}
- minimumInput={2}
name="new_project"
onChange={[Function]}
optionRenderer={[Function]}
@@ -230,7 +229,6 @@ exports[`should render projects 2`] = `
cache={false}
className="input-super-large"
loadOptions={[Function]}
- minimumInput={2}
name="new_project"
onChange={[Function]}
optionRenderer={[Function]}
@@ -357,7 +355,6 @@ exports[`should render projects 3`] = `
cache={false}
className="input-super-large"
loadOptions={[Function]}
- minimumInput={2}
name="new_project"
onChange={[Function]}
optionRenderer={[Function]}
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx
index d8a429a5388..12bd9297176 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx
@@ -19,7 +19,7 @@
*/
/* eslint-disable import/order */
import * as React from 'react';
-import { mount, shallow } from 'enzyme';
+import { shallow } from 'enzyme';
import ScannerContext from '../ScannerContext';
import { click } from '../../../../helpers/testUtils';
@@ -57,7 +57,7 @@ it('closes', () => {
});
it('fetches scanner context on mount', async () => {
- const wrapper = mount(<ScannerContext onClose={jest.fn()} task={task} />);
+ const wrapper = shallow(<ScannerContext onClose={jest.fn()} task={task} />);
expect(wrapper.state()).toEqual({});
expect(getTask).toBeCalledWith('123', ['scannerContext']);
await new Promise(setImmediate);
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx
index 3c43f3cc49d..8b8a8af5e1d 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx
@@ -19,7 +19,7 @@
*/
/* eslint-disable import/order */
import * as React from 'react';
-import { mount, shallow } from 'enzyme';
+import { shallow } from 'enzyme';
import Stacktrace from '../Stacktrace';
import { click } from '../../../../helpers/testUtils';
@@ -57,7 +57,7 @@ it('closes', () => {
});
it('fetches scanner context on mount', async () => {
- const wrapper = mount(<Stacktrace onClose={jest.fn()} task={task} />);
+ const wrapper = shallow(<Stacktrace onClose={jest.fn()} task={task} />);
expect(wrapper.state()).toEqual({ loading: true });
expect(getTask).toBeCalledWith('123', ['stacktrace']);
await new Promise(setImmediate);
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.js b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.js
index 5dac90f6fc7..62d23b385b4 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.js
@@ -19,6 +19,7 @@
*/
// @flow
import React from 'react';
+// $FlowFixMe
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import { scaleLinear, scaleOrdinal } from 'd3-scale';
import EmptyResult from './EmptyResult';
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx
index 3f584725f8a..2ceb90694d8 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx
+++ b/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx
@@ -123,7 +123,7 @@ export default class Form extends React.PureComponent<Props, State> {
<i className="spinner" />
) : (
<Select
- autofocus={true}
+ autoFocus={true}
clearable={false}
onChange={this.handleMetricSelect}
options={options}
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/Form-test.tsx.snap b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/Form-test.tsx.snap
index 858183d2219..c77f5433a09 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/Form-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/Form-test.tsx.snap
@@ -133,7 +133,7 @@ exports[`should render form 2`] = `
</em>
</label>
<Select
- autofocus={true}
+ autoFocus={true}
clearable={false}
onChange={[Function]}
options={
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js
index 34a34f983de..1cf79296c10 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js
@@ -19,6 +19,7 @@
*/
// @flow
import React from 'react';
+// $FlowFixMe
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import ZoomTimeLine from '../../../components/charts/ZoomTimeLine';
import { hasHistoryData } from '../utils';
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
index b83cc033e28..f4405754b16 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
@@ -35,6 +35,7 @@ exports[`should correctly render a graph 1`] = `
disableHeight={false}
disableWidth={false}
onResize={[Function]}
+ style={Object {}}
/>
</div>
</div>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx
index e12692f12e3..11a644c4692 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx
@@ -177,7 +177,7 @@ export default class Condition extends React.PureComponent<Props, State> {
return (
<Select
- autofocus={true}
+ autoFocus={true}
className="input-medium"
clearable={false}
name="operator"
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx
index b853c1e8de3..08e39200ed6 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx
@@ -92,7 +92,7 @@ export default class ProfilePermissionsFormSelect extends React.PureComponent<Pr
return (
<Select
- autofocus={true}
+ autoFocus={true}
className="Select-big"
clearable={false}
isLoading={this.state.loading}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfilePermissionsFormSelect-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfilePermissionsFormSelect-test.tsx.snap
index f5bac4cb5b3..ceafde10c92 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfilePermissionsFormSelect-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfilePermissionsFormSelect-test.tsx.snap
@@ -2,7 +2,7 @@
exports[`renders 1`] = `
<Select
- autofocus={true}
+ autoFocus={true}
className="Select-big"
clearable={false}
filterOptions={[Function]}
diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OrganizationStep-test.js.snap b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OrganizationStep-test.js.snap
index 0f7aa889dd0..3f1d39e377e 100644
--- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OrganizationStep-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OrganizationStep-test.js.snap
@@ -81,7 +81,6 @@ exports[`works with existing organization 1`] = `
}
>
<Select
- addLabelText="Add \\"{label}\\"?"
arrowRenderer={[Function]}
autosize={true}
backspaceRemoves={true}
@@ -129,16 +128,19 @@ exports[`works with existing organization 1`] = `
}
pageSize={5}
placeholder="Select..."
+ removeSelected={true}
required={false}
+ rtl={false}
scrollMenuIntoView={true}
searchable={true}
simpleValue={false}
tabSelectsValue={true}
+ trimFilter={true}
valueComponent={[Function]}
valueKey="value"
>
<div
- className="Select input-super-large Select--single is-searchable"
+ className="Select input-super-large is-searchable Select--single"
>
<div
className="Select-control"
@@ -163,6 +165,7 @@ exports[`works with existing organization 1`] = `
aria-haspopup="false"
aria-owns=""
className="Select-input"
+ injectStyles={true}
minWidth="5"
onBlur={[Function]}
onChange={[Function]}
@@ -179,13 +182,6 @@ exports[`works with existing organization 1`] = `
}
}
>
- <style
- dangerouslySetInnerHTML={
- Object {
- "__html": "input#undefined::-ms-clear {display: none;}",
- }
- }
- />
<input
aria-activedescendant="react-select-2--value"
aria-expanded="false"
diff --git a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx
index fa62338bcbc..7fb84c7f497 100644
--- a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx
+++ b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx
@@ -101,7 +101,7 @@ export default class UsersSelectSearch extends React.PureComponent<Props, State>
: translate('no_results');
return (
<Select
- autofocus={this.props.autoFocus}
+ autoFocus={this.props.autoFocus}
className="Select-big"
options={this.state.searchResult}
isLoading={this.state.isLoading}
diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx
index 6a76095990f..4b0c3e26e37 100644
--- a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx
+++ b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx
@@ -101,7 +101,7 @@ export default class CreateWebhookForm extends React.PureComponent<Props> {
name="name"
onBlur={handleBlur}
onChange={handleChange}
- touched={touched.name}
+ touched={touched.name !== ''}
type="text"
value={values.name}
/>
@@ -120,7 +120,7 @@ export default class CreateWebhookForm extends React.PureComponent<Props> {
name="url"
onBlur={handleBlur}
onChange={handleChange}
- touched={touched.url}
+ touched={touched.url !== ''}
type="text"
value={values.url}
/>
diff --git a/server/sonar-web/src/main/js/components/controls/Modal.tsx b/server/sonar-web/src/main/js/components/controls/Modal.tsx
index 877afe03840..d57ba7d4ea1 100644
--- a/server/sonar-web/src/main/js/components/controls/Modal.tsx
+++ b/server/sonar-web/src/main/js/components/controls/Modal.tsx
@@ -21,6 +21,8 @@ import * as React from 'react';
import * as ReactModal from 'react-modal';
import * as classNames from 'classnames';
+ReactModal.setAppElement('#content');
+
interface OwnProps {
medium?: boolean;
large?: boolean;
diff --git a/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx b/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx
index 7efa74aa7bd..9483a3d5167 100644
--- a/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx
+++ b/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx
@@ -125,7 +125,7 @@ export default class SearchSelect<T extends { value: string }> extends React.Pur
const Component = this.props.canCreate ? Creatable : Select;
return (
<Component
- autofocus={this.autofocus}
+ autoFocus={this.autofocus}
className="input-super-large"
clearable={this.props.clearable}
escapeClearsValue={false}
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap
index de7d83d6b2a..9f99087e010 100644
--- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap
@@ -2,7 +2,7 @@
exports[`should render Select 1`] = `
<Select
- autofocus={true}
+ autoFocus={true}
className="input-super-large"
escapeClearsValue={false}
filterOption={[Function]}
diff --git a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.js b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.js
index 6c1c233c93f..9f790afa5cf 100644
--- a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.js
+++ b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.js
@@ -21,6 +21,7 @@
import React from 'react';
import { minBy } from 'lodash';
import * as PropTypes from 'prop-types';
+// $FlowFixMe
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import PreviewGraphTooltips from './PreviewGraphTooltips';
import AdvancedTimeline from '../charts/AdvancedTimeline';