} | } | ||||
}); | }); | ||||
const theme = require('../../sonar-web/src/main/js/app/theme'); | |||||
const customProperties = {}; | |||||
Object.keys(theme).forEach(key => { | |||||
if (typeof theme[key] === 'string') { | |||||
customProperties[`--${key}`] = theme[key]; | |||||
} | |||||
}); | |||||
const postcssLoader = () => ({ | const postcssLoader = () => ({ | ||||
loader: 'postcss-loader', | loader: 'postcss-loader', | ||||
options: { | options: { | ||||
plugins: () => [ | plugins: () => [ | ||||
require('autoprefixer'), | require('autoprefixer'), | ||||
require('postcss-custom-properties')({ | require('postcss-custom-properties')({ | ||||
variables: require('../../sonar-web/src/main/js/app/theme') | |||||
importFrom: { customProperties }, | |||||
preserve: false | |||||
}), | }), | ||||
require('postcss-calc') | require('postcss-calc') | ||||
] | ] |
"private": true, | "private": true, | ||||
"dependencies": { | "dependencies": { | ||||
"@babel/polyfill": "7.0.0", | "@babel/polyfill": "7.0.0", | ||||
"classnames": "2.2.5", | |||||
"lodash": "4.17.4", | |||||
"react": "16.4.2", | |||||
"react-dom": "16.4.2", | |||||
"classnames": "2.2.6", | |||||
"lodash": "4.17.11", | |||||
"react": "16.6.0", | |||||
"react-dom": "16.6.0", | |||||
"whatwg-fetch": "2.0.3" | "whatwg-fetch": "2.0.3" | ||||
}, | }, | ||||
"devDependencies": { | "devDependencies": { | ||||
"@babel/core": "7.1.0", | |||||
"@babel/core": "7.1.2", | |||||
"@babel/plugin-proposal-class-properties": "7.1.0", | "@babel/plugin-proposal-class-properties": "7.1.0", | ||||
"@babel/plugin-proposal-object-rest-spread": "7.0.0", | "@babel/plugin-proposal-object-rest-spread": "7.0.0", | ||||
"@babel/plugin-syntax-dynamic-import": "7.0.0", | "@babel/plugin-syntax-dynamic-import": "7.0.0", | ||||
"@babel/plugin-transform-react-jsx-source": "7.0.0", | "@babel/plugin-transform-react-jsx-source": "7.0.0", | ||||
"@babel/preset-env": "7.1.0", | "@babel/preset-env": "7.1.0", | ||||
"@babel/preset-react": "7.0.0", | "@babel/preset-react": "7.0.0", | ||||
"@types/classnames": "2.2.3", | |||||
"@types/enzyme": "3.1.10", | |||||
"@types/jest": "23.3.1", | |||||
"@types/lodash": "4.14.102", | |||||
"@types/react": "16.4.8", | |||||
"@types/react-dom": "16.0.7", | |||||
"autoprefixer": "7.1.6", | |||||
"@types/classnames": "2.2.6", | |||||
"@types/enzyme": "3.1.14", | |||||
"@types/jest": "23.3.7", | |||||
"@types/lodash": "4.14.117", | |||||
"@types/react": "16.4.18", | |||||
"@types/react-dom": "16.0.9", | |||||
"autoprefixer": "9.3.1", | |||||
"babel-core": "7.0.0-bridge.0", | "babel-core": "7.0.0-bridge.0", | ||||
"babel-jest": "23.6.0", | "babel-jest": "23.6.0", | ||||
"babel-loader": "8.0.2", | |||||
"babel-plugin-dynamic-import-node": "2.1.0", | |||||
"babel-loader": "8.0.4", | |||||
"babel-plugin-dynamic-import-node": "2.2.0", | |||||
"babel-plugin-lodash": "3.3.4", | "babel-plugin-lodash": "3.3.4", | ||||
"chalk": "2.3.2", | |||||
"chalk": "2.4.1", | |||||
"clean-webpack-plugin": "0.1.19", | "clean-webpack-plugin": "0.1.19", | ||||
"copy-webpack-plugin": "4.5.1", | |||||
"css-loader": "0.28.11", | |||||
"enzyme": "3.3.0", | |||||
"enzyme-adapter-react-16": "1.1.1", | |||||
"copy-webpack-plugin": "4.5.4", | |||||
"css-loader": "1.0.0", | |||||
"enzyme": "3.7.0", | |||||
"enzyme-adapter-react-16": "1.6.0", | |||||
"enzyme-to-json": "3.3.4", | "enzyme-to-json": "3.3.4", | ||||
"escape-string-regexp": "1.0.5", | "escape-string-regexp": "1.0.5", | ||||
"eslint": "5.7.0", | "eslint": "5.7.0", | ||||
"eslint-plugin-promise": "4.0.1", | "eslint-plugin-promise": "4.0.1", | ||||
"eslint-plugin-react": "7.11.1", | "eslint-plugin-react": "7.11.1", | ||||
"eslint-plugin-sonarjs": "0.2.0", | "eslint-plugin-sonarjs": "0.2.0", | ||||
"html-webpack-plugin": "3.0.6", | |||||
"html-webpack-plugin": "3.2.0", | |||||
"jest": "23.6.0", | "jest": "23.6.0", | ||||
"postcss-calc": "6.0.1", | |||||
"postcss-custom-properties": "6.2.0", | |||||
"postcss-loader": "2.1.1", | |||||
"prettier": "1.14.0", | |||||
"postcss-calc": "7.0.0", | |||||
"postcss-custom-properties": "8.0.8", | |||||
"postcss-loader": "3.0.0", | |||||
"prettier": "1.14.3", | |||||
"react-dev-utils": "5.0.0", | "react-dev-utils": "5.0.0", | ||||
"react-error-overlay": "1.0.7", | "react-error-overlay": "1.0.7", | ||||
"react-test-renderer": "16.4.2", | |||||
"style-loader": "0.20.3", | |||||
"react-test-renderer": "16.6.0", | |||||
"style-loader": "0.23.1", | |||||
"ts-jest": "23.10.4", | "ts-jest": "23.10.4", | ||||
"ts-loader": "5.2.1", | |||||
"typescript": "3.1.2", | |||||
"ts-loader": "5.2.2", | |||||
"typescript": "3.1.3", | |||||
"typescript-eslint-parser": "20.0.0", | "typescript-eslint-parser": "20.0.0", | ||||
"webpack": "4.1.1", | |||||
"webpack-bundle-analyzer": "2.11.1", | |||||
"webpack-dev-server": "3.1.1" | |||||
"webpack": "4.22.0", | |||||
"webpack-bundle-analyzer": "3.0.3", | |||||
"webpack-dev-server": "3.1.10" | |||||
}, | }, | ||||
"scripts": { | "scripts": { | ||||
"start": "node scripts/start.js", | "start": "node scripts/start.js", | ||||
"globals": { | "globals": { | ||||
"ts-jest": { | "ts-jest": { | ||||
"diagnostics": { | "diagnostics": { | ||||
"ignoreCodes": [151001] | |||||
"ignoreCodes": [ | |||||
151001 | |||||
] | |||||
} | } | ||||
} | } | ||||
}, | }, |
} | } | ||||
}); | }); | ||||
const theme = require('../src/main/js/app/theme'); | |||||
const customProperties = {}; | |||||
Object.keys(theme).forEach(key => { | |||||
if (typeof theme[key] === 'string') { | |||||
customProperties[`--${key}`] = theme[key]; | |||||
} | |||||
}); | |||||
const postcssLoader = () => ({ | const postcssLoader = () => ({ | ||||
loader: 'postcss-loader', | loader: 'postcss-loader', | ||||
options: { | options: { | ||||
plugins: () => [ | plugins: () => [ | ||||
require('autoprefixer'), | require('autoprefixer'), | ||||
require('postcss-custom-properties')({ | require('postcss-custom-properties')({ | ||||
variables: require('../src/main/js/app/theme') | |||||
importFrom: { customProperties }, | |||||
preserve: false | |||||
}), | }), | ||||
require('postcss-calc') | require('postcss-calc') | ||||
] | ] |
"license": "LGPL-3.0", | "license": "LGPL-3.0", | ||||
"dependencies": { | "dependencies": { | ||||
"@babel/polyfill": "7.0.0", | "@babel/polyfill": "7.0.0", | ||||
"classnames": "2.2.5", | |||||
"classnames": "2.2.6", | |||||
"clipboard": "2.0.1", | "clipboard": "2.0.1", | ||||
"create-react-class": "15.6.3", | "create-react-class": "15.6.3", | ||||
"d3-array": "1.2.4", | "d3-array": "1.2.4", | ||||
"history": "3.3.0", | "history": "3.3.0", | ||||
"intl-relativeformat": "2.1.0", | "intl-relativeformat": "2.1.0", | ||||
"keymaster": "1.6.2", | "keymaster": "1.6.2", | ||||
"lodash": "4.17.10", | |||||
"lunr": "2.3.0", | |||||
"mdast-util-toc": "2.0.1", | |||||
"prop-types": "15.6.1", | |||||
"react": "16.4.2", | |||||
"react-day-picker": "7.1.8", | |||||
"react-dom": "16.4.2", | |||||
"lodash": "4.17.11", | |||||
"lunr": "2.3.4", | |||||
"mdast-util-toc": "2.1.0", | |||||
"prop-types": "15.6.2", | |||||
"react": "16.6.0", | |||||
"react-day-picker": "7.2.4", | |||||
"react-dom": "16.6.0", | |||||
"react-draggable": "3.0.5", | "react-draggable": "3.0.5", | ||||
"react-ga": "2.5.3", | "react-ga": "2.5.3", | ||||
"react-helmet": "5.2.0", | "react-helmet": "5.2.0", | ||||
"react-intl": "2.4.0", | |||||
"react-modal": "3.4.4", | |||||
"react-intl": "2.7.2", | |||||
"react-modal": "3.6.1", | |||||
"react-redux": "5.0.7", | "react-redux": "5.0.7", | ||||
"react-router": "3.2.0", | "react-router": "3.2.0", | ||||
"react-select": "1.2.1", | "react-select": "1.2.1", | ||||
"react-virtualized": "9.18.5", | |||||
"redux": "3.7.2", | |||||
"react-virtualized": "9.21.0", | |||||
"redux": "4.0.1", | |||||
"redux-logger": "3.0.6", | "redux-logger": "3.0.6", | ||||
"redux-thunk": "2.2.0", | |||||
"remark-custom-blocks": "2.2.0", | |||||
"remark-slug": "5.0.0", | |||||
"redux-thunk": "2.3.0", | |||||
"remark-custom-blocks": "2.3.0", | |||||
"remark-slug": "5.1.0", | |||||
"remark-toc": "5.0.0", | "remark-toc": "5.0.0", | ||||
"unist-util-visit": "1.3.1", | |||||
"unist-util-visit": "1.4.0", | |||||
"valid-url": "1.0.9", | "valid-url": "1.0.9", | ||||
"whatwg-fetch": "2.0.4" | "whatwg-fetch": "2.0.4" | ||||
}, | }, | ||||
"devDependencies": { | "devDependencies": { | ||||
"@babel/core": "7.1.0", | |||||
"@babel/core": "7.1.2", | |||||
"@babel/plugin-proposal-class-properties": "7.1.0", | "@babel/plugin-proposal-class-properties": "7.1.0", | ||||
"@babel/plugin-proposal-object-rest-spread": "7.0.0", | "@babel/plugin-proposal-object-rest-spread": "7.0.0", | ||||
"@babel/plugin-syntax-dynamic-import": "7.0.0", | "@babel/plugin-syntax-dynamic-import": "7.0.0", | ||||
"@babel/plugin-transform-react-jsx-source": "7.0.0", | "@babel/plugin-transform-react-jsx-source": "7.0.0", | ||||
"@babel/preset-env": "7.1.0", | "@babel/preset-env": "7.1.0", | ||||
"@babel/preset-react": "7.0.0", | "@babel/preset-react": "7.0.0", | ||||
"@types/classnames": "2.2.3", | |||||
"@types/clipboard": "2.0.0", | |||||
"@types/d3-array": "1.2.2", | |||||
"@types/classnames": "2.2.6", | |||||
"@types/clipboard": "2.0.1", | |||||
"@types/d3-array": "1.2.4", | |||||
"@types/d3-hierarchy": "1.1.4", | "@types/d3-hierarchy": "1.1.4", | ||||
"@types/d3-scale": "2.0.2", | "@types/d3-scale": "2.0.2", | ||||
"@types/d3-selection": "1.3.2", | "@types/d3-selection": "1.3.2", | ||||
"@types/d3-shape": "1.2.4", | "@types/d3-shape": "1.2.4", | ||||
"@types/d3-zoom": "1.7.2", | "@types/d3-zoom": "1.7.2", | ||||
"@types/enzyme": "3.1.10", | |||||
"@types/jest": "23.3.1", | |||||
"@types/enzyme": "3.1.14", | |||||
"@types/jest": "23.3.7", | |||||
"@types/keymaster": "1.6.28", | "@types/keymaster": "1.6.28", | ||||
"@types/lodash": "4.14.108", | |||||
"@types/prop-types": "15.5.4", | |||||
"@types/react": "16.4.8", | |||||
"@types/react-dom": "16.0.7", | |||||
"@types/react-helmet": "5.0.6", | |||||
"@types/react-intl": "2.3.8", | |||||
"@types/react-modal": "3.1.2", | |||||
"@types/lodash": "4.14.117", | |||||
"@types/prop-types": "15.5.6", | |||||
"@types/react": "16.4.18", | |||||
"@types/react-dom": "16.0.9", | |||||
"@types/react-helmet": "5.0.7", | |||||
"@types/react-intl": "2.3.11", | |||||
"@types/react-modal": "3.2.1", | |||||
"@types/react-redux": "6.0.6", | "@types/react-redux": "6.0.6", | ||||
"@types/react-router": "3.0.13", | "@types/react-router": "3.0.13", | ||||
"@types/react-select": "1.2.6", | "@types/react-select": "1.2.6", | ||||
"@types/react-virtualized": "9.18.3", | |||||
"@types/react-virtualized": "9.18.7", | |||||
"@types/valid-url": "1.0.2", | "@types/valid-url": "1.0.2", | ||||
"autoprefixer": "8.4.1", | |||||
"autoprefixer": "9.3.1", | |||||
"babel-core": "7.0.0-bridge.0", | "babel-core": "7.0.0-bridge.0", | ||||
"babel-jest": "23.6.0", | "babel-jest": "23.6.0", | ||||
"babel-loader": "8.0.2", | |||||
"babel-plugin-dynamic-import-node": "2.1.0", | |||||
"babel-loader": "8.0.4", | |||||
"babel-plugin-dynamic-import-node": "2.2.0", | |||||
"babel-plugin-lodash": "3.3.4", | "babel-plugin-lodash": "3.3.4", | ||||
"chalk": "2.4.1", | "chalk": "2.4.1", | ||||
"clean-webpack-plugin": "0.1.19", | "clean-webpack-plugin": "0.1.19", | ||||
"copy-webpack-plugin": "4.5.1", | |||||
"css-loader": "0.28.11", | |||||
"enzyme": "3.3.0", | |||||
"enzyme-adapter-react-16": "1.1.1", | |||||
"copy-webpack-plugin": "4.5.4", | |||||
"css-loader": "1.0.0", | |||||
"enzyme": "3.7.0", | |||||
"enzyme-adapter-react-16": "1.6.0", | |||||
"enzyme-to-json": "3.3.4", | "enzyme-to-json": "3.3.4", | ||||
"escape-string-regexp": "1.0.5", | "escape-string-regexp": "1.0.5", | ||||
"eslint": "5.7.0", | "eslint": "5.7.0", | ||||
"eslint-plugin-sonarjs": "0.2.0", | "eslint-plugin-sonarjs": "0.2.0", | ||||
"expose-loader": "0.7.5", | "expose-loader": "0.7.5", | ||||
"flow-bin": "^0.52.0", | "flow-bin": "^0.52.0", | ||||
"glob": "7.1.2", | |||||
"glob": "7.1.3", | |||||
"glob-promise": "3.4.0", | "glob-promise": "3.4.0", | ||||
"html-webpack-plugin": "3.2.0", | "html-webpack-plugin": "3.2.0", | ||||
"jest": "23.6.0", | "jest": "23.6.0", | ||||
"lint-staged": "4.3.0", | |||||
"lint-staged": "7.3.0", | |||||
"lodash-webpack-plugin": "0.11.5", | "lodash-webpack-plugin": "0.11.5", | ||||
"mini-css-extract-plugin": "0.4.0", | |||||
"postcss-calc": "6.0.1", | |||||
"postcss-custom-properties": "6.2.0", | |||||
"postcss-loader": "2.1.5", | |||||
"prettier": "1.14.0", | |||||
"mini-css-extract-plugin": "0.4.4", | |||||
"postcss-calc": "7.0.0", | |||||
"postcss-custom-properties": "8.0.8", | |||||
"postcss-loader": "3.0.0", | |||||
"prettier": "1.14.3", | |||||
"raw-loader": "0.5.1", | "raw-loader": "0.5.1", | ||||
"react-dev-utils": "5.0.1", | "react-dev-utils": "5.0.1", | ||||
"react-error-overlay": "1.0.7", | "react-error-overlay": "1.0.7", | ||||
"react-test-renderer": "16.4.2", | |||||
"react-test-renderer": "16.6.0", | |||||
"remark": "9.0.0", | "remark": "9.0.0", | ||||
"remark-react": "4.0.3", | "remark-react": "4.0.3", | ||||
"style-loader": "0.21.0", | |||||
"style-loader": "0.23.1", | |||||
"ts-jest": "23.10.4", | "ts-jest": "23.10.4", | ||||
"ts-loader": "5.2.1", | |||||
"typescript": "3.1.2", | |||||
"ts-loader": "5.2.2", | |||||
"typescript": "3.1.3", | |||||
"typescript-eslint-parser": "20.0.0", | "typescript-eslint-parser": "20.0.0", | ||||
"webpack": "4.15.1", | |||||
"webpack-bundle-analyzer": "2.11.2", | |||||
"webpack-dev-server": "3.1.4" | |||||
"webpack": "4.22.0", | |||||
"webpack-bundle-analyzer": "3.0.3", | |||||
"webpack-dev-server": "3.1.10" | |||||
}, | }, | ||||
"scripts": { | "scripts": { | ||||
"start": "node scripts/start.js", | "start": "node scripts/start.js", | ||||
"build": "node scripts/build.js", | "build": "node scripts/build.js", | ||||
"test": "jest", | "test": "jest", | ||||
"format": "prettier --write --list-different 'src/main/js/**/*.{js,ts,tsx,css}'", | "format": "prettier --write --list-different 'src/main/js/**/*.{js,ts,tsx,css}'", | ||||
"format-check": "yarn prettier --list-different 'src/main/js/**/*.{js,ts,tsx,css}'", | |||||
"format-check": "prettier --list-different 'src/main/js/**/*.{js,ts,tsx,css}'", | |||||
"lint": "eslint --ext js,ts,tsx --quiet src/main/js", | "lint": "eslint --ext js,ts,tsx --quiet src/main/js", | ||||
"lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src/main/js", | "lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src/main/js", | ||||
"flow-check": "flow check src/main/js", | "flow-check": "flow check src/main/js", | ||||
"globals": { | "globals": { | ||||
"ts-jest": { | "ts-jest": { | ||||
"diagnostics": { | "diagnostics": { | ||||
"ignoreCodes": [151001] | |||||
"ignoreCodes": [ | |||||
151001 | |||||
] | |||||
} | } | ||||
} | } | ||||
}, | }, |
PullRequest, | PullRequest, | ||||
BranchType, | BranchType, | ||||
Visibility, | Visibility, | ||||
Task | |||||
Task, | |||||
Component | |||||
} from '../../types'; | } from '../../types'; | ||||
import { STATUSES } from '../../../apps/background-tasks/constants'; | import { STATUSES } from '../../../apps/background-tasks/constants'; | ||||
import { waitAndUpdate } from '../../../helpers/testUtils'; | import { waitAndUpdate } from '../../../helpers/testUtils'; | ||||
}); | }); | ||||
it('changes component', () => { | it('changes component', () => { | ||||
const wrapper = shallow( | |||||
const wrapper = shallow<ComponentContainer>( | |||||
<ComponentContainer fetchOrganizations={jest.fn()} location={{ query: { id: 'foo' } }}> | <ComponentContainer fetchOrganizations={jest.fn()} location={{ query: { id: 'foo' } }}> | ||||
<Inner /> | <Inner /> | ||||
</ComponentContainer> | </ComponentContainer> | ||||
); | ); | ||||
(wrapper.instance() as ComponentContainer).mounted = true; | |||||
wrapper.instance().mounted = true; | |||||
wrapper.setState({ | wrapper.setState({ | ||||
branches: [{ isMain: true }], | |||||
component: { qualifier: 'TRK', visibility: Visibility.Public }, | |||||
branchLikes: [{ isMain: true, name: 'master' }], | |||||
component: { qualifier: 'TRK', visibility: Visibility.Public } as Component, | |||||
loading: false | loading: false | ||||
}); | }); | ||||
<ul | <ul | ||||
className="menu abs-width-240" | className="menu abs-width-240" | ||||
> | > | ||||
<React.Fragment> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.suggestion | |||||
</li> | |||||
<li | |||||
key="0" | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.suggestion | |||||
</li> | |||||
<li | |||||
key="0" | |||||
> | |||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | > | ||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | |||||
foo | |||||
</Link> | |||||
</li> | |||||
<li | |||||
key="1" | |||||
foo | |||||
</Link> | |||||
</li> | |||||
<li | |||||
key="1" | |||||
> | |||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | > | ||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | |||||
bar | |||||
</Link> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
</React.Fragment> | |||||
bar | |||||
</Link> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
onClick={[MockFunction]} | onClick={[MockFunction]} | ||||
api_documentation.page | api_documentation.page | ||||
</Link> | </Link> | ||||
</li> | </li> | ||||
<React.Fragment> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | |||||
<a | |||||
href="https://community.sonarsource.com/c/help/sc" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
embed_docs.get_help | |||||
</a> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | |||||
<a | |||||
href="https://community.sonarsource.com/c/help/sc" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
embed_docs.get_help | |||||
</a> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.stay_connected | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://twitter.com/sonarcloud" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | > | ||||
embed_docs.stay_connected | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://twitter.com/sonarcloud" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="Twitter" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/twitter-icon.svg" | |||||
width="18" | |||||
/> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://blog.sonarsource.com/product/SonarCloud" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="embed_docs.news" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/sonarcloud-square-logo.svg" | |||||
width="18" | |||||
/> | |||||
embed_docs.news | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<Connect(ProductNewsMenuItem) | |||||
tag="SonarCloud" | |||||
<img | |||||
alt="Twitter" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/twitter-icon.svg" | |||||
width="18" | |||||
/> | /> | ||||
</li> | |||||
</React.Fragment> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://blog.sonarsource.com/product/SonarCloud" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="embed_docs.news" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/sonarcloud-square-logo.svg" | |||||
width="18" | |||||
/> | |||||
embed_docs.news | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<Connect(ProductNewsMenuItem) | |||||
tag="SonarCloud" | |||||
/> | |||||
</li> | |||||
</ul> | </ul> | ||||
</DropdownOverlay> | </DropdownOverlay> | ||||
`; | `; | ||||
<ul | <ul | ||||
className="menu abs-width-240" | className="menu abs-width-240" | ||||
> | > | ||||
<React.Fragment> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.suggestion | |||||
</li> | |||||
<li | |||||
key="0" | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.suggestion | |||||
</li> | |||||
<li | |||||
key="0" | |||||
> | |||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | > | ||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | |||||
foo | |||||
</Link> | |||||
</li> | |||||
<li | |||||
key="1" | |||||
foo | |||||
</Link> | |||||
</li> | |||||
<li | |||||
key="1" | |||||
> | |||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | > | ||||
<Link | |||||
onClick={[MockFunction]} | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
target="_blank" | |||||
to="#" | |||||
> | |||||
bar | |||||
</Link> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
</React.Fragment> | |||||
bar | |||||
</Link> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
onClick={[MockFunction]} | onClick={[MockFunction]} | ||||
api_documentation.page | api_documentation.page | ||||
</Link> | </Link> | ||||
</li> | </li> | ||||
<React.Fragment> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | |||||
<a | |||||
href="https://community.sonarsource.com/" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
embed_docs.get_help | |||||
</a> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li> | |||||
<a | |||||
href="https://community.sonarsource.com/" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | > | ||||
embed_docs.stay_connected | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://www.sonarsource.com/resources/product-news/" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="embed_docs.news" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/sq-icon.svg" | |||||
width="18" | |||||
/> | |||||
embed_docs.news | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://twitter.com/SonarQube" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="Twitter" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/twitter-icon.svg" | |||||
width="18" | |||||
/> | |||||
</a> | |||||
</li> | |||||
</React.Fragment> | |||||
embed_docs.get_help | |||||
</a> | |||||
</li> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
embed_docs.stay_connected | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://www.sonarsource.com/resources/product-news/" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="embed_docs.news" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/sq-icon.svg" | |||||
width="18" | |||||
/> | |||||
embed_docs.news | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
href="https://twitter.com/SonarQube" | |||||
rel="noopener noreferrer" | |||||
target="_blank" | |||||
> | |||||
<img | |||||
alt="Twitter" | |||||
className="spacer-right" | |||||
height="18" | |||||
src="/images/embed-doc/twitter-icon.svg" | |||||
width="18" | |||||
/> | |||||
</a> | |||||
</li> | |||||
</ul> | </ul> | ||||
</DropdownOverlay> | </DropdownOverlay> | ||||
`; | `; |
</h4> | </h4> | ||||
<DateFormatter | <DateFormatter | ||||
date="2018-04-06T12:07:19+0000" | date="2018-04-06T12:07:19+0000" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFormatter> | |||||
</div> | </div> | ||||
<p | <p | ||||
className="little-spacer-bottom" | className="little-spacer-bottom" |
} | } | ||||
} | } | ||||
export default injectIntl<OwnProps>(withRouter<OwnProps & InjectedIntlProps>(Extension)); | |||||
export default injectIntl(withRouter(Extension)); |
}); | }); | ||||
it('selects next & previous', () => { | it('selects next & previous', () => { | ||||
const wrapper = shallow( | |||||
const wrapper = shallow<ComponentNavBranchesMenu>( | |||||
<ComponentNavBranchesMenu | <ComponentNavBranchesMenu | ||||
branchLikes={[mainBranch(), shortBranch('foo'), shortBranch('foobar'), longBranch('bar')]} | branchLikes={[mainBranch(), shortBranch('foo'), shortBranch('foobar'), longBranch('bar')]} | ||||
component={component} | component={component} |
<ul | <ul | ||||
className="menu menu-vertically-limited" | className="menu menu-vertically-limited" | ||||
> | > | ||||
<React.Fragment | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "master", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-master" | key="branch-master" | ||||
onSelect={[Function]} | |||||
selected={true} | |||||
/> | |||||
<li | |||||
className="menu-header navbar-context-meta-branch-menu-title" | |||||
> | > | ||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "master", | |||||
} | |||||
branches.pull_requests | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"base": "master", | |||||
"branch": "feature", | |||||
"key": "1234", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"title": "qux", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-master" | |||||
onSelect={[Function]} | |||||
selected={true} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
} | |||||
innerRef={[Function]} | |||||
key="pull-request-1234" | key="pull-request-1234" | ||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | > | ||||
<li | |||||
className="menu-header navbar-context-meta-branch-menu-title" | |||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | > | ||||
branches.pull_requests | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"base": "master", | |||||
"branch": "feature", | |||||
"key": "1234", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"title": "qux", | |||||
} | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "master", | |||||
"name": "baz", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="pull-request-1234" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-baz" | key="branch-baz" | ||||
> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "master", | |||||
"name": "baz", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": undefined, | |||||
"mergeBranch": "master", | |||||
"name": "foo", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-baz" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-foo" | key="branch-foo" | ||||
> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": undefined, | |||||
"mergeBranch": "master", | |||||
"name": "foo", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "bar", | |||||
"type": "LONG", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-foo" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-bar" | key="branch-bar" | ||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | > | ||||
<li | |||||
className="divider" | |||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | /> | ||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "bar", | |||||
"type": "LONG", | |||||
} | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "master", | |||||
"name": "baz", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-bar" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-baz" | key="branch-baz" | ||||
> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<li | |||||
className="menu-header" | |||||
> | |||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "master", | |||||
"name": "baz", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-baz" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</ul> | </ul> | ||||
</DropdownOverlay> | </DropdownOverlay> | ||||
`; | `; | ||||
<ul | <ul | ||||
className="menu menu-vertically-limited" | className="menu menu-vertically-limited" | ||||
> | > | ||||
<React.Fragment | |||||
key="branch-foobar" | |||||
<li | |||||
className="menu-header navbar-context-meta-branch-menu-title" | |||||
> | > | ||||
<li | |||||
className="menu-header navbar-context-meta-branch-menu-title" | |||||
> | |||||
branches.short_lived_branches | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": undefined, | |||||
"mergeBranch": "master", | |||||
"name": "foobar", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | |||||
branches.short_lived_branches | |||||
</li> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": undefined, | |||||
"mergeBranch": "master", | |||||
"name": "foobar", | |||||
"status": Object { | |||||
"bugs": 0, | |||||
"codeSmells": 0, | |||||
"qualityGateStatus": "OK", | |||||
"vulnerabilities": 0, | |||||
}, | |||||
"type": "SHORT", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-foobar" | |||||
onSelect={[Function]} | |||||
selected={true} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="branch-BARBAZ" | |||||
> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "BARBAZ", | |||||
"type": "LONG", | |||||
} | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-foobar" | |||||
onSelect={[Function]} | |||||
selected={true} | |||||
/> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "BARBAZ", | |||||
"type": "LONG", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-BARBAZ" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="branch-bar" | |||||
> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "bar", | |||||
"type": "LONG", | |||||
} | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-BARBAZ" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
<li | |||||
className="divider" | |||||
/> | |||||
<ComponentNavBranchesMenuItem | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "bar", | |||||
"type": "LONG", | |||||
} | } | ||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | |||||
} | |||||
component={ | |||||
Object { | |||||
"key": "component", | |||||
} | } | ||||
innerRef={[Function]} | |||||
key="branch-bar" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
innerRef={[Function]} | |||||
key="branch-bar" | |||||
onSelect={[Function]} | |||||
selected={false} | |||||
/> | |||||
</ul> | </ul> | ||||
</DropdownOverlay> | </DropdownOverlay> | ||||
`; | `; |
<OrganizationHelmet | <OrganizationHelmet | ||||
title="My Project" | title="My Project" | ||||
/> | /> | ||||
<React.Fragment | |||||
key="my-project" | |||||
> | |||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | |||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | } | ||||
> | |||||
My Project | |||||
</Link> | |||||
</React.Fragment> | |||||
} | |||||
> | |||||
My Project | |||||
</Link> | |||||
</header> | </header> | ||||
`; | `; | ||||
} | } | ||||
title="My Project" | title="My Project" | ||||
/> | /> | ||||
<React.Fragment> | |||||
<OrganizationAvatar | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | |||||
<OrganizationAvatar | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | } | ||||
/> | |||||
<OrganizationLink | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline spacer-left" | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | |||||
} | |||||
/> | |||||
<OrganizationLink | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline spacer-left" | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | } | ||||
> | |||||
The Foo Organization | |||||
</OrganizationLink> | |||||
<span | |||||
className="slash-separator" | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="my-project" | |||||
} | |||||
> | > | ||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | |||||
The Foo Organization | |||||
</OrganizationLink> | |||||
<span | |||||
className="slash-separator" | |||||
/> | |||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | } | ||||
> | |||||
My Project | |||||
</Link> | |||||
</React.Fragment> | |||||
} | |||||
> | |||||
My Project | |||||
</Link> | |||||
<a | <a | ||||
className="link-no-underline" | className="link-no-underline" | ||||
href="https://bitbucket.org/foo" | href="https://bitbucket.org/foo" | ||||
} | } | ||||
title="My Project" | title="My Project" | ||||
/> | /> | ||||
<React.Fragment> | |||||
<OrganizationAvatar | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | |||||
<OrganizationAvatar | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | } | ||||
/> | |||||
<OrganizationLink | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline spacer-left" | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | |||||
} | |||||
/> | |||||
<OrganizationLink | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline spacer-left" | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "The Foo Organization", | |||||
"projectVisibility": "public", | |||||
} | } | ||||
> | |||||
The Foo Organization | |||||
</OrganizationLink> | |||||
<span | |||||
className="slash-separator" | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="my-project" | |||||
} | |||||
> | > | ||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | |||||
The Foo Organization | |||||
</OrganizationLink> | |||||
<span | |||||
className="slash-separator" | |||||
/> | |||||
<QualifierIcon | |||||
className="spacer-right" | |||||
qualifier="TRK" | |||||
/> | |||||
<Link | |||||
className="navbar-context-header-breadcrumb-link link-base-color link-no-underline" | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
title="My Project" | |||||
to={ | |||||
Object { | |||||
"pathname": "/dashboard", | |||||
"query": Object { | |||||
"branch": undefined, | |||||
"id": "my-project", | |||||
}, | |||||
} | } | ||||
> | |||||
My Project | |||||
</Link> | |||||
</React.Fragment> | |||||
} | |||||
> | |||||
My Project | |||||
</Link> | |||||
</header> | </header> | ||||
`; | `; |
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
</NavBarTabs> | </NavBarTabs> | ||||
`; | `; | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
</NavBarTabs> | </NavBarTabs> | ||||
`; | `; | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
</NavBarTabs> | </NavBarTabs> | ||||
`; | `; | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
</NavBarTabs> | </NavBarTabs> | ||||
`; | `; | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<Link | <Link | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
`; | `; | ||||
exports[`should work with extensions 2`] = ` | exports[`should work with extensions 2`] = ` | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
`; | `; | ||||
exports[`should work with multiple extensions 1`] = ` | exports[`should work with multiple extensions 1`] = ` | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
`; | `; | ||||
exports[`should work with multiple extensions 2`] = ` | exports[`should work with multiple extensions 2`] = ` | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
`; | `; |
} | } | ||||
} | } | ||||
/> | /> | ||||
<React.Fragment> | |||||
<span | |||||
className="vertical-separator" | |||||
/> | |||||
<BranchMeasures | |||||
measures={ | |||||
Array [ | |||||
Object { | |||||
"metric": "new_coverage", | |||||
"periods": Array [ | |||||
Object { | |||||
"index": 1, | |||||
"value": "95.9943", | |||||
}, | |||||
], | |||||
"value": "0", | |||||
}, | |||||
Object { | |||||
"metric": "coverage", | |||||
"value": "99.3", | |||||
}, | |||||
] | |||||
} | |||||
/> | |||||
</React.Fragment> | |||||
<span | |||||
className="vertical-separator" | |||||
/> | |||||
<BranchMeasures | |||||
measures={ | |||||
Array [ | |||||
Object { | |||||
"metric": "new_coverage", | |||||
"periods": Array [ | |||||
Object { | |||||
"index": 1, | |||||
"value": "95.9943", | |||||
}, | |||||
], | |||||
"value": "0", | |||||
}, | |||||
Object { | |||||
"metric": "coverage", | |||||
"value": "99.3", | |||||
}, | |||||
] | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render 1`] = ` | exports[`should render 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="badge badge-focus badge-medium display-inline-flex-center js-component-analysis-warnings" | className="badge badge-focus badge-medium display-inline-flex-center js-component-analysis-warnings" | ||||
> | > | ||||
] | ] | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
`; | `; |
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<Dropdown | <Dropdown | ||||
overlay={ | overlay={ | ||||
<ul | <ul | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<Dropdown | <Dropdown | ||||
overlay={ | overlay={ | ||||
<ul | <ul | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</Dropdown> | |||||
<li> | <li> | ||||
<IndexLink | <IndexLink | ||||
activeClassName="active" | activeClassName="active" | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/>, | |||||
> | |||||
<Component /> | |||||
</Dropdown>, | |||||
<Dropdown | <Dropdown | ||||
overlay={ | overlay={ | ||||
<ul | <ul | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/>, | |||||
> | |||||
<Component /> | |||||
</Dropdown>, | |||||
<Dropdown | <Dropdown | ||||
overlay={ | overlay={ | ||||
<ul | <ul | ||||
</ul> | </ul> | ||||
} | } | ||||
tagName="li" | tagName="li" | ||||
/>, | |||||
> | |||||
<Component /> | |||||
</Dropdown>, | |||||
] | ] | ||||
`; | `; |
}); | }); | ||||
function shallowRender(props: Partial<Search['props']> = {}) { | function shallowRender(props: Partial<Search['props']> = {}) { | ||||
return shallow( | |||||
return shallow<Search>( | |||||
// @ts-ignore | // @ts-ignore | ||||
<Search | <Search | ||||
appState={{ organizationsEnabled: false }} | appState={{ organizationsEnabled: false }} |
import { Store } from 'redux'; | import { Store } from 'redux'; | ||||
import { AppState, CurrentUser } from '../types'; | import { AppState, CurrentUser } from '../types'; | ||||
import { setAppState } from '../../store/appState'; | import { setAppState } from '../../store/appState'; | ||||
import rootReducer from '../../store/rootReducer'; | |||||
import rootReducer, { Store as State } from '../../store/rootReducer'; | |||||
import { receiveCurrentUser } from '../../store/users'; | import { receiveCurrentUser } from '../../store/users'; | ||||
import configureStore from '../../store/utils/configureStore'; | import configureStore from '../../store/utils/configureStore'; | ||||
let store: Store<any>; | |||||
let store: Store<State, any>; | |||||
const createStore = (currentUser?: CurrentUser, appState?: AppState) => { | const createStore = (currentUser?: CurrentUser, appState?: AppState) => { | ||||
store = configureStore(rootReducer); | store = configureStore(rootReducer); |
import { Dispatch } from 'redux'; | import { Dispatch } from 'redux'; | ||||
import { getValues } from '../../api/settings'; | import { getValues } from '../../api/settings'; | ||||
import { receiveValues } from '../settings/store/values/actions'; | import { receiveValues } from '../settings/store/values/actions'; | ||||
import { Store } from '../../store/rootReducer'; | |||||
export const fetchAboutPageSettings = () => (dispatch: Dispatch<Store>) => { | |||||
const keys = ['sonar.lf.aboutText']; | |||||
export function fetchAboutPageSettings() { | |||||
return (dispatch: Dispatch) => { | |||||
const keys = ['sonar.lf.aboutText']; | |||||
return getValues({ keys: keys.join() }).then(values => { | |||||
dispatch(receiveValues(values)); | |||||
}); | |||||
}; | |||||
return getValues({ keys: keys.join() }).then(values => { | |||||
dispatch(receiveValues(values)); | |||||
}); | |||||
}; | |||||
} |
loading={false} | loading={false} | ||||
timeout={100} | timeout={100} | ||||
> | > | ||||
<React.Fragment> | |||||
<GlobalNotifications | |||||
addNotification={[Function]} | |||||
channels={ | |||||
Array [ | |||||
"channel1", | |||||
"channel2", | |||||
] | |||||
} | |||||
notifications={ | |||||
Array [ | |||||
Object { | |||||
"channel": "channel1", | |||||
"type": "type-global", | |||||
}, | |||||
Object { | |||||
"channel": "channel1", | |||||
"type": "type-common", | |||||
}, | |||||
] | |||||
} | |||||
removeNotification={[Function]} | |||||
types={ | |||||
Array [ | |||||
"type-global", | |||||
"type-common", | |||||
] | |||||
} | |||||
/> | |||||
<Projects | |||||
addNotification={[Function]} | |||||
channels={ | |||||
Array [ | |||||
"channel1", | |||||
"channel2", | |||||
] | |||||
} | |||||
notificationsByProject={ | |||||
<GlobalNotifications | |||||
addNotification={[Function]} | |||||
channels={ | |||||
Array [ | |||||
"channel1", | |||||
"channel2", | |||||
] | |||||
} | |||||
notifications={ | |||||
Array [ | |||||
Object { | Object { | ||||
"foo": Array [ | |||||
Object { | |||||
"channel": "channel2", | |||||
"organization": "org", | |||||
"project": "foo", | |||||
"projectName": "Foo", | |||||
"type": "type-common", | |||||
}, | |||||
], | |||||
} | |||||
} | |||||
projects={ | |||||
Array [ | |||||
"channel": "channel1", | |||||
"type": "type-global", | |||||
}, | |||||
Object { | |||||
"channel": "channel1", | |||||
"type": "type-common", | |||||
}, | |||||
] | |||||
} | |||||
removeNotification={[Function]} | |||||
types={ | |||||
Array [ | |||||
"type-global", | |||||
"type-common", | |||||
] | |||||
} | |||||
/> | |||||
<Projects | |||||
addNotification={[Function]} | |||||
channels={ | |||||
Array [ | |||||
"channel1", | |||||
"channel2", | |||||
] | |||||
} | |||||
notificationsByProject={ | |||||
Object { | |||||
"foo": Array [ | |||||
Object { | Object { | ||||
"key": "foo", | |||||
"name": "Foo", | |||||
"channel": "channel2", | |||||
"organization": "org", | "organization": "org", | ||||
"project": "foo", | |||||
"projectName": "Foo", | |||||
"type": "type-common", | |||||
}, | }, | ||||
] | |||||
} | |||||
removeNotification={[Function]} | |||||
types={ | |||||
Array [ | |||||
"type-common", | |||||
] | |||||
], | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
projects={ | |||||
Array [ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
"organization": "org", | |||||
}, | |||||
] | |||||
} | |||||
removeNotification={[Function]} | |||||
types={ | |||||
Array [ | |||||
"type-common", | |||||
] | |||||
} | |||||
/> | |||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
`; | `; |
import { receiveMyOrganizations } from '../../../store/organizations'; | import { receiveMyOrganizations } from '../../../store/organizations'; | ||||
import { getValues } from '../../../api/settings'; | import { getValues } from '../../../api/settings'; | ||||
import { receiveValues } from '../../settings/store/values/actions'; | import { receiveValues } from '../../settings/store/values/actions'; | ||||
import { Store } from '../../../store/rootReducer'; | |||||
export const fetchMyOrganizations = () => (dispatch: Dispatch<Store>) => { | |||||
export const fetchMyOrganizations = () => (dispatch: Dispatch) => { | |||||
return getOrganizations({ member: true }).then(({ organizations }) => { | return getOrganizations({ member: true }).then(({ organizations }) => { | ||||
return dispatch(receiveMyOrganizations(organizations)); | return dispatch(receiveMyOrganizations(organizations)); | ||||
}); | }); | ||||
}; | }; | ||||
export const fetchIfAnyoneCanCreateOrganizations = () => (dispatch: Dispatch<Store>) => { | |||||
export const fetchIfAnyoneCanCreateOrganizations = () => (dispatch: Dispatch) => { | |||||
return getValues({ keys: 'sonar.organizations.anyoneCanCreate' }).then(values => { | return getValues({ keys: 'sonar.organizations.anyoneCanCreate' }).then(values => { | ||||
dispatch(receiveValues(values, undefined)); | dispatch(receiveValues(values, undefined)); | ||||
}); | }); |
/> | /> | ||||
</li> | </li> | ||||
</Tooltip> | </Tooltip> | ||||
<React.Fragment> | |||||
<Tooltip | |||||
overlay="coding_rules.scope.title" | |||||
<Tooltip | |||||
overlay="coding_rules.scope.title" | |||||
> | |||||
<li | |||||
className="coding-rules-detail-property" | |||||
> | > | ||||
<li | |||||
className="coding-rules-detail-property" | |||||
> | |||||
<RuleScopeIcon | |||||
className="little-spacer-right" | |||||
/> | |||||
coding_rules.scope.MAIN | |||||
</li> | |||||
</Tooltip> | |||||
</React.Fragment> | |||||
<RuleScopeIcon | |||||
className="little-spacer-right" | |||||
/> | |||||
coding_rules.scope.MAIN | |||||
</li> | |||||
</Tooltip> | |||||
<li | <li | ||||
className="coding-rules-detail-property" | className="coding-rules-detail-property" | ||||
data-meta="tags" | data-meta="tags" | ||||
date="2013-07-26T09:40:51+0200" | date="2013-07-26T09:40:51+0200" | ||||
/> | /> | ||||
</li> | </li> | ||||
<React.Fragment /> | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
`; | `; |
} | } | ||||
const fetchMeasures = (component: string, metricsKey: string[], branchLike?: BranchLike) => ( | const fetchMeasures = (component: string, metricsKey: string[], branchLike?: BranchLike) => ( | ||||
_dispatch: Dispatch<any>, | |||||
_dispatch: Dispatch, | |||||
getState: () => any | getState: () => any | ||||
) => { | ) => { | ||||
if (metricsKey.length <= 0) { | if (metricsKey.length <= 0) { |
> | > | ||||
<ScreenPositionHelper | <ScreenPositionHelper | ||||
className="layout-page-side-outer" | className="layout-page-side-outer" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ScreenPositionHelper> | |||||
<MeasureContentContainer | <MeasureContentContainer | ||||
className="layout-page-main" | className="layout-page-main" | ||||
currentUser={ | currentUser={ |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should renders correctly 1`] = ` | exports[`should renders correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<table | <table | ||||
className="data zebra zebra-hover" | className="data zebra zebra-hover" | ||||
> | > | ||||
/> | /> | ||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should renders empty 1`] = `<EmptyResult />`; | exports[`should renders empty 1`] = `<EmptyResult />`; | ||||
exports[`should renders with multiple measures 1`] = ` | exports[`should renders with multiple measures 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<table | <table | ||||
className="data zebra zebra-hover" | className="data zebra zebra-hover" | ||||
> | > | ||||
/> | /> | ||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
}); | }); | ||||
it('should correctly toggle facets', () => { | it('should correctly toggle facets', () => { | ||||
const wrapper = shallow(<Sidebar {...PROPS} />); | |||||
const wrapper = shallow<Sidebar>(<Sidebar {...PROPS} />); | |||||
expect(wrapper.state('openFacets').bugs).toBeUndefined(); | expect(wrapper.state('openFacets').bugs).toBeUndefined(); | ||||
(wrapper.instance() as Sidebar).toggleFacet('bugs'); | (wrapper.instance() as Sidebar).toggleFacet('bugs'); | ||||
expect(wrapper.state('openFacets').bugs).toBeTruthy(); | expect(wrapper.state('openFacets').bugs).toBeTruthy(); |
import { getOrganizationUrl } from '../../../helpers/urls'; | import { getOrganizationUrl } from '../../../helpers/urls'; | ||||
import * as api from '../../../api/organizations'; | import * as api from '../../../api/organizations'; | ||||
import * as actions from '../../../store/organizations'; | import * as actions from '../../../store/organizations'; | ||||
import { Store } from '../../../store/rootReducer'; | |||||
import '../../../app/styles/sonarcloud.css'; | import '../../../app/styles/sonarcloud.css'; | ||||
import '../../tutorials/styles.css'; // TODO remove me | import '../../tutorials/styles.css'; // TODO remove me | ||||
} | } | ||||
function createOrganization(organization: OrganizationBase) { | function createOrganization(organization: OrganizationBase) { | ||||
return (dispatch: Dispatch<Store>) => { | |||||
return (dispatch: Dispatch) => { | |||||
return api.createOrganization(organization).then((organization: Organization) => { | return api.createOrganization(organization).then((organization: Organization) => { | ||||
dispatch(actions.createOrganization(organization)); | dispatch(actions.createOrganization(organization)); | ||||
return organization; | return organization; | ||||
} | } | ||||
function deleteOrganization(key: string) { | function deleteOrganization(key: string) { | ||||
return (dispatch: Dispatch<Store>) => { | |||||
return (dispatch: Dispatch) => { | |||||
return api.deleteOrganization(key).then(() => { | return api.deleteOrganization(key).then(() => { | ||||
dispatch(actions.deleteOrganization(key)); | dispatch(actions.deleteOrganization(key)); | ||||
}); | }); |
onCommit={[MockFunction]} | onCommit={[MockFunction]} | ||||
organizationKey="org" | organizationKey="org" | ||||
subscriptionPlans={Array []} | subscriptionPlans={Array []} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</BillingForm> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render and create organization 1`] = ` | exports[`should render and create organization 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
/> | /> | ||||
</p> | </p> | ||||
</header> | </header> | ||||
<React.Fragment> | |||||
<OrganizationDetailsStep | |||||
finished={false} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={true} | |||||
/> | |||||
<PlanStep | |||||
createOrganization={[Function]} | |||||
deleteOrganization={[Function]} | |||||
onFreePlanChoose={[Function]} | |||||
onPaidPlanChoose={[Function]} | |||||
open={false} | |||||
startingPrice="billing.price_format.10" | |||||
subscriptionPlans={ | |||||
Array [ | |||||
Object { | |||||
"maxNcloc": 100000, | |||||
"price": 10, | |||||
}, | |||||
Object { | |||||
"maxNcloc": 250000, | |||||
"price": 75, | |||||
}, | |||||
] | |||||
} | |||||
/> | |||||
</React.Fragment> | |||||
<OrganizationDetailsStep | |||||
finished={false} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={true} | |||||
/> | |||||
<PlanStep | |||||
createOrganization={[Function]} | |||||
deleteOrganization={[Function]} | |||||
onFreePlanChoose={[Function]} | |||||
onPaidPlanChoose={[Function]} | |||||
open={false} | |||||
startingPrice="billing.price_format.10" | |||||
subscriptionPlans={ | |||||
Array [ | |||||
Object { | |||||
"maxNcloc": 100000, | |||||
"price": 10, | |||||
}, | |||||
Object { | |||||
"maxNcloc": 250000, | |||||
"price": 75, | |||||
}, | |||||
] | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render and create organization 2`] = ` | exports[`should render and create organization 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
/> | /> | ||||
</p> | </p> | ||||
</header> | </header> | ||||
<React.Fragment> | |||||
<OrganizationDetailsStep | |||||
finished={true} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={false} | |||||
organization={ | |||||
Object { | |||||
"avatar": "http://example.com/avatar", | |||||
"description": "description-foo", | |||||
"key": "key-foo", | |||||
"name": "name-foo", | |||||
"url": "http://example.com/foo", | |||||
} | |||||
} | |||||
/> | |||||
<PlanStep | |||||
createOrganization={[Function]} | |||||
deleteOrganization={[Function]} | |||||
onFreePlanChoose={[Function]} | |||||
onPaidPlanChoose={[Function]} | |||||
open={true} | |||||
startingPrice="billing.price_format.10" | |||||
subscriptionPlans={ | |||||
Array [ | |||||
Object { | |||||
"maxNcloc": 100000, | |||||
"price": 10, | |||||
}, | |||||
Object { | |||||
"maxNcloc": 250000, | |||||
"price": 75, | |||||
}, | |||||
] | |||||
<OrganizationDetailsStep | |||||
finished={true} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={false} | |||||
organization={ | |||||
Object { | |||||
"avatar": "http://example.com/avatar", | |||||
"description": "description-foo", | |||||
"key": "key-foo", | |||||
"name": "name-foo", | |||||
"url": "http://example.com/foo", | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
<PlanStep | |||||
createOrganization={[Function]} | |||||
deleteOrganization={[Function]} | |||||
onFreePlanChoose={[Function]} | |||||
onPaidPlanChoose={[Function]} | |||||
open={true} | |||||
startingPrice="billing.price_format.10" | |||||
subscriptionPlans={ | |||||
Array [ | |||||
Object { | |||||
"maxNcloc": 100000, | |||||
"price": 10, | |||||
}, | |||||
Object { | |||||
"maxNcloc": 250000, | |||||
"price": 75, | |||||
}, | |||||
] | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
className="little-spacer-top spacer-bottom" | className="little-spacer-top spacer-bottom" | ||||
> | > | ||||
<div /> | <div /> | ||||
<React.Fragment> | |||||
<AlertErrorIcon | |||||
className="spacer-left text-middle" | |||||
/> | |||||
<span | |||||
className="little-spacer-left text-danger text-middle" | |||||
> | |||||
This field is bad! | |||||
</span> | |||||
</React.Fragment> | |||||
<AlertErrorIcon | |||||
className="spacer-left text-middle" | |||||
/> | |||||
<span | |||||
className="little-spacer-left text-danger text-middle" | |||||
> | |||||
This field is bad! | |||||
</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
`; | `; |
isInitialValid={false} | isInitialValid={false} | ||||
onSubmit={[MockFunction]} | onSubmit={[MockFunction]} | ||||
validate={[Function]} | validate={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ValidationForm> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<form | <form | ||||
onSubmit={[Function]} | onSubmit={[Function]} | ||||
> | > | ||||
<React.Fragment> | |||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.organization_name.description" | |||||
dirty={false} | |||||
id="organization-key" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.organization_name" | |||||
name="key" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
required={true} | |||||
value="" | |||||
/> | |||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.organization_name.description" | |||||
dirty={false} | |||||
id="organization-key" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.organization_name" | |||||
name="key" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
required={true} | |||||
value="" | |||||
> | |||||
<Component /> | |||||
</OrganizationDetailsInput> | |||||
<div | |||||
className="big-spacer-top" | |||||
> | |||||
<ResetButtonLink | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_organization.add_additional_info | |||||
<DropdownIcon | |||||
className="little-spacer-left" | |||||
turned={false} | |||||
/> | |||||
</ResetButtonLink> | |||||
</div> | |||||
<div | |||||
className="js-additional-info" | |||||
hidden={true} | |||||
> | |||||
<div | <div | ||||
className="big-spacer-top" | className="big-spacer-top" | ||||
> | > | ||||
<ResetButtonLink | |||||
onClick={[Function]} | |||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.display_name.description" | |||||
dirty={false} | |||||
id="organization-display-name" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.display_name" | |||||
name="name" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
> | > | ||||
onboarding.create_organization.add_additional_info | |||||
<DropdownIcon | |||||
className="little-spacer-left" | |||||
turned={false} | |||||
/> | |||||
</ResetButtonLink> | |||||
<Component /> | |||||
</OrganizationDetailsInput> | |||||
</div> | </div> | ||||
<div | <div | ||||
className="js-additional-info" | |||||
hidden={true} | |||||
className="big-spacer-top" | |||||
> | > | ||||
<div | |||||
className="big-spacer-top" | |||||
> | |||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.display_name.description" | |||||
dirty={false} | |||||
id="organization-display-name" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.display_name" | |||||
name="name" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
/> | |||||
</div> | |||||
<div | |||||
className="big-spacer-top" | |||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.avatar.description" | |||||
dirty={false} | |||||
id="organization-avatar" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.avatar" | |||||
name="avatar" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
> | > | ||||
<OrganizationDetailsInput | |||||
description="onboarding.create_organization.avatar.description" | |||||
dirty={false} | |||||
id="organization-avatar" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.avatar" | |||||
name="avatar" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
/> | |||||
</div> | |||||
<div | |||||
className="big-spacer-top" | |||||
> | |||||
<OrganizationDetailsInput | |||||
dirty={false} | |||||
id="organization-description" | |||||
isSubmitting={false} | |||||
label="description" | |||||
name="description" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
/> | |||||
</div> | |||||
<div | |||||
className="big-spacer-top" | |||||
<Component /> | |||||
</OrganizationDetailsInput> | |||||
</div> | |||||
<div | |||||
className="big-spacer-top" | |||||
> | |||||
<OrganizationDetailsInput | |||||
dirty={false} | |||||
id="organization-description" | |||||
isSubmitting={false} | |||||
label="description" | |||||
name="description" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
> | > | ||||
<OrganizationDetailsInput | |||||
dirty={false} | |||||
id="organization-url" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.url" | |||||
name="url" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
/> | |||||
</div> | |||||
<Component /> | |||||
</OrganizationDetailsInput> | |||||
</div> | </div> | ||||
<div | <div | ||||
className="big-spacer-top" | className="big-spacer-top" | ||||
> | > | ||||
<SubmitButton | |||||
disabled={true} | |||||
<OrganizationDetailsInput | |||||
dirty={false} | |||||
id="organization-url" | |||||
isSubmitting={false} | |||||
label="onboarding.create_organization.url" | |||||
name="url" | |||||
onBlur={[Function]} | |||||
onChange={[Function]} | |||||
value="" | |||||
> | > | ||||
continue | |||||
</SubmitButton> | |||||
<Component /> | |||||
</OrganizationDetailsInput> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</div> | |||||
<div | |||||
className="big-spacer-top" | |||||
> | |||||
<SubmitButton | |||||
disabled={true} | |||||
> | |||||
continue | |||||
</SubmitButton> | |||||
</div> | |||||
</form> | </form> | ||||
`; | `; | ||||
isInitialValid={true} | isInitialValid={true} | ||||
onSubmit={[MockFunction]} | onSubmit={[MockFunction]} | ||||
validate={[Function]} | validate={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ValidationForm> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> |
<div | <div | ||||
className="boxed-group-inner" | className="boxed-group-inner" | ||||
> | > | ||||
<React.Fragment> | |||||
<Connect(withCurrentUser(BillingFormShim)) | |||||
onCommit={[MockFunction]} | |||||
onFailToUpgrade={[MockFunction]} | |||||
organizationKey={[MockFunction]} | |||||
subscriptionPlans={Array []} | |||||
/> | |||||
</React.Fragment> | |||||
<Connect(withCurrentUser(BillingFormShim)) | |||||
onCommit={[MockFunction]} | |||||
onFailToUpgrade={[MockFunction]} | |||||
organizationKey={[MockFunction]} | |||||
subscriptionPlans={Array []} | |||||
> | |||||
<Component /> | |||||
</Connect(withCurrentUser(BillingFormShim))> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div | <div | ||||
className="boxed-group-inner" | className="boxed-group-inner" | ||||
> | > | ||||
<React.Fragment> | |||||
<PlanSelect | |||||
onChange={[Function]} | |||||
plan="free" | |||||
startingPrice="10" | |||||
/> | |||||
<div | |||||
className="display-flex-center big-spacer-top" | |||||
<PlanSelect | |||||
onChange={[Function]} | |||||
plan="free" | |||||
startingPrice="10" | |||||
/> | |||||
<div | |||||
className="display-flex-center big-spacer-top" | |||||
> | |||||
<SubmitButton | |||||
disabled={false} | |||||
onClick={[Function]} | |||||
> | > | ||||
<SubmitButton | |||||
disabled={false} | |||||
onClick={[Function]} | |||||
> | |||||
my_account.create_organization | |||||
</SubmitButton> | |||||
</div> | |||||
</React.Fragment> | |||||
my_account.create_organization | |||||
</SubmitButton> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div | <div | ||||
className="boxed-group-inner" | className="boxed-group-inner" | ||||
> | > | ||||
<React.Fragment> | |||||
<PlanSelect | |||||
onChange={[Function]} | |||||
plan="paid" | |||||
startingPrice="10" | |||||
/> | |||||
<Connect(withCurrentUser(BillingFormShim)) | |||||
onCommit={[MockFunction]} | |||||
onFailToUpgrade={[MockFunction]} | |||||
organizationKey={[MockFunction]} | |||||
subscriptionPlans={Array []} | |||||
/> | |||||
</React.Fragment> | |||||
<PlanSelect | |||||
onChange={[Function]} | |||||
plan="paid" | |||||
startingPrice="10" | |||||
/> | |||||
<Connect(withCurrentUser(BillingFormShim)) | |||||
onCommit={[MockFunction]} | |||||
onFailToUpgrade={[MockFunction]} | |||||
organizationKey={[MockFunction]} | |||||
subscriptionPlans={Array []} | |||||
> | |||||
<Component /> | |||||
</Connect(withCurrentUser(BillingFormShim))> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> |
})); | })); | ||||
it('should work', async () => { | it('should work', async () => { | ||||
const wrapper = shallow(<App component={{ key: 'foo' }} />); | |||||
const wrapper = shallow<App>(<App component={{ key: 'foo' }} />); | |||||
expect(wrapper).toMatchSnapshot(); | expect(wrapper).toMatchSnapshot(); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().measures).toMatchSnapshot(); | expect(wrapper.state().measures).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(2); | |||||
expect(wrapper.state().paging!.total).toBe(2); | |||||
// edit | // edit | ||||
wrapper.find('List').prop<Function>('onEdit')({ | wrapper.find('List').prop<Function>('onEdit')({ | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().measures).toMatchSnapshot(); | expect(wrapper.state().measures).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(2); | |||||
expect(wrapper.state().paging!.total).toBe(2); | |||||
// delete | // delete | ||||
wrapper.find('List').prop<Function>('onDelete')('2'); | wrapper.find('List').prop<Function>('onDelete')('2'); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().measures).toMatchSnapshot(); | expect(wrapper.state().measures).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(1); | |||||
expect(wrapper.state().paging!.total).toBe(1); | |||||
}); | }); |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should work 1`] = ` | exports[`should work 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="custom_measures" | suggestions="custom_measures" | ||||
/> | /> | ||||
onCreate={[Function]} | onCreate={[Function]} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should work 2`] = ` | exports[`should work 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="custom_measures" | suggestions="custom_measures" | ||||
/> | /> | ||||
total={1} | total={1} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should work 3`] = ` | exports[`should work 3`] = ` |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should create new custom measure 1`] = ` | exports[`should create new custom measure 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
id="custom-measures-create" | id="custom-measures-create" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
> | > | ||||
create | create | ||||
</Button> | </Button> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should create new custom measure 2`] = ` | exports[`should create new custom measure 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
id="custom-measures-create" | id="custom-measures-create" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
onSubmit={[MockFunction]} | onSubmit={[MockFunction]} | ||||
skipMetrics={Array []} | skipMetrics={Array []} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
})); | })); | ||||
it('should work', async () => { | it('should work', async () => { | ||||
const wrapper = shallow(<App />); | |||||
(wrapper.instance() as App).mounted = true; | |||||
const wrapper = shallow<App>(<App />); | |||||
wrapper.instance().mounted = true; | |||||
expect(wrapper).toMatchSnapshot(); | expect(wrapper).toMatchSnapshot(); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().metrics).toMatchSnapshot(); | expect(wrapper.state().metrics).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(2); | |||||
expect(wrapper.state().paging!.total).toBe(2); | |||||
// edit | // edit | ||||
wrapper.find('List').prop<Function>('onEdit')({ | wrapper.find('List').prop<Function>('onEdit')({ | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().metrics).toMatchSnapshot(); | expect(wrapper.state().metrics).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(2); | |||||
expect(wrapper.state().paging!.total).toBe(2); | |||||
// delete | // delete | ||||
wrapper.find('List').prop<Function>('onDelete')('bar'); | wrapper.find('List').prop<Function>('onDelete')('bar'); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().metrics).toMatchSnapshot(); | expect(wrapper.state().metrics).toMatchSnapshot(); | ||||
expect(wrapper.state().paging.total).toBe(1); | |||||
expect(wrapper.state().paging!.total).toBe(1); | |||||
}); | }); |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should work 1`] = ` | exports[`should work 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="custom_metrics" | suggestions="custom_metrics" | ||||
/> | /> | ||||
onCreate={[Function]} | onCreate={[Function]} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should work 2`] = ` | exports[`should work 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="custom_metrics" | suggestions="custom_metrics" | ||||
/> | /> | ||||
total={1} | total={1} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should work 3`] = ` | exports[`should work 3`] = ` |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should create new group 1`] = ` | exports[`should create new group 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
id="metrics-create" | id="metrics-create" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
> | > | ||||
custom_metrics.create_metric | custom_metrics.create_metric | ||||
</Button> | </Button> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should create new group 2`] = ` | exports[`should create new group 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
id="metrics-create" | id="metrics-create" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
] | ] | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render a closed menu block 1`] = ` | exports[`should render a closed menu block 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<a | <a | ||||
className="list-group-item" | className="list-group-item" | ||||
href="#" | href="#" | ||||
Foobarbaz | Foobarbaz | ||||
</h3> | </h3> | ||||
</a> | </a> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render an opened menu block 1`] = ` | exports[`should render an opened menu block 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<a | <a | ||||
className="list-group-item" | className="list-group-item" | ||||
href="#" | href="#" | ||||
} | } | ||||
splat="/foo/" | splat="/foo/" | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
`; | `; | ||||
exports[`SearchResultTokens should render 1`] = ` | exports[`SearchResultTokens should render 1`] = ` | ||||
<React.Fragment> | |||||
<React.Fragment | |||||
key="0" | |||||
> | |||||
Foobar is a | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
<Fragment> | |||||
Foobar is a | |||||
<mark | |||||
key="1" | key="1" | ||||
> | > | ||||
<mark | |||||
key="1" | |||||
> | |||||
universal | |||||
</mark> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="2" | |||||
> | |||||
variable understood to represent whatever is being discussed. | |||||
</React.Fragment> | |||||
</React.Fragment> | |||||
universal | |||||
</mark> | |||||
variable understood to represent whatever is being discussed. | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should search 1`] = ` | exports[`should search 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<SearchResultEntry | <SearchResultEntry | ||||
active={false} | active={false} | ||||
key="lorem/origin" | key="lorem/origin" | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render menu 1`] = ` | exports[`should render menu 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<SearchBox | <SearchBox | ||||
className="big-spacer-top spacer-bottom" | className="big-spacer-top spacer-bottom" | ||||
minLength={2} | minLength={2} | ||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should search 1`] = ` | exports[`should search 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<SearchBox | <SearchBox | ||||
className="big-spacer-top spacer-bottom" | className="big-spacer-top spacer-bottom" | ||||
minLength={2} | minLength={2} | ||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
overlayClassName="modal-overlay" | overlayClassName="modal-overlay" | ||||
parentSelector={[Function]} | parentSelector={[Function]} | ||||
portalClassName="ReactModalPortal" | portalClassName="ReactModalPortal" | ||||
role="dialog" | |||||
shouldCloseOnEsc={true} | shouldCloseOnEsc={true} | ||||
shouldCloseOnOverlayClick={true} | shouldCloseOnOverlayClick={true} | ||||
shouldFocusAfterRender={true} | shouldFocusAfterRender={true} | ||||
shouldReturnFocusAfterClose={true} | shouldReturnFocusAfterClose={true} | ||||
> | > | ||||
<ModalPortal | |||||
ariaHideApp={true} | |||||
bodyOpenClassName="ReactModal__Body--open" | |||||
className="modal" | |||||
closeTimeoutMS={0} | |||||
contentLabel="users.update" | |||||
defaultStyles={ | |||||
Object { | |||||
"content": Object { | |||||
"WebkitOverflowScrolling": "touch", | |||||
"background": "#fff", | |||||
"border": "1px solid #ccc", | |||||
"borderRadius": "4px", | |||||
"bottom": "40px", | |||||
"left": "40px", | |||||
"outline": "none", | |||||
"overflow": "auto", | |||||
"padding": "20px", | |||||
"position": "absolute", | |||||
"right": "40px", | |||||
"top": "40px", | |||||
}, | |||||
"overlay": Object { | |||||
"backgroundColor": "rgba(255, 255, 255, 0.75)", | |||||
"bottom": 0, | |||||
"left": 0, | |||||
"position": "fixed", | |||||
"right": 0, | |||||
"top": 0, | |||||
}, | |||||
} | |||||
} | |||||
isOpen={true} | |||||
onRequestClose={[Function]} | |||||
overlayClassName="modal-overlay" | |||||
parentSelector={[Function]} | |||||
portalClassName="ReactModalPortal" | |||||
shouldCloseOnEsc={true} | |||||
shouldCloseOnOverlayClick={true} | |||||
shouldFocusAfterRender={true} | |||||
shouldReturnFocusAfterClose={true} | |||||
style={ | |||||
Object { | |||||
"content": Object {}, | |||||
"overlay": Object {}, | |||||
} | |||||
<Portal | |||||
containerInfo={ | |||||
<div | |||||
class="ReactModalPortal" | |||||
> | |||||
<div | |||||
class="ReactModal__Overlay ReactModal__Overlay--after-open modal-overlay" | |||||
> | |||||
<div | |||||
aria-label="users.update" | |||||
class="ReactModal__Content ReactModal__Content--after-open modal" | |||||
role="dialog" | |||||
tabindex="-1" | |||||
> | |||||
<header | |||||
class="modal-head" | |||||
> | |||||
<h2> | |||||
users.update | |||||
</h2> | |||||
</header> | |||||
<div | |||||
class="modal-body" | |||||
> | |||||
<div | |||||
class="select-list" | |||||
> | |||||
<div | |||||
class="display-flex-center" | |||||
> | |||||
<ul | |||||
class="radio-toggle spacer-right" | |||||
> | |||||
<li> | |||||
<input | |||||
checked="" | |||||
id="filter__selected" | |||||
name="filter" | |||||
type="radio" | |||||
value="selected" | |||||
/> | |||||
<label | |||||
for="filter__selected" | |||||
> | |||||
selected | |||||
</label> | |||||
</li> | |||||
<li> | |||||
<input | |||||
id="filter__deselected" | |||||
name="filter" | |||||
type="radio" | |||||
value="deselected" | |||||
/> | |||||
<label | |||||
for="filter__deselected" | |||||
> | |||||
unselected | |||||
</label> | |||||
</li> | |||||
<li> | |||||
<input | |||||
id="filter__all" | |||||
name="filter" | |||||
type="radio" | |||||
value="all" | |||||
/> | |||||
<label | |||||
for="filter__all" | |||||
> | |||||
all | |||||
</label> | |||||
</li> | |||||
</ul> | |||||
<div | |||||
class="search-box" | |||||
> | |||||
<input | |||||
aria-label="search_verb" | |||||
autocomplete="off" | |||||
class="search-box-input" | |||||
maxlength="100" | |||||
placeholder="search_verb" | |||||
type="search" | |||||
value="" | |||||
/> | |||||
<svg | |||||
class="search-box-magnifier" | |||||
height="16" | |||||
style="fill-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 1.41421;" | |||||
version="1.1" | |||||
viewBox="0 0 16 16" | |||||
width="16" | |||||
xml:space="preserve" | |||||
xmlns:xlink="http://www.w3.org/1999/xlink" | |||||
> | |||||
<path | |||||
d="M10.308 7.077c0-.89-.316-1.65-.949-2.283a3.111 3.111 0 0 0-2.282-.948c-.89 0-1.65.316-2.283.948a3.111 3.111 0 0 0-.948 2.283c0 .89.316 1.65.948 2.282a3.111 3.111 0 0 0 2.283.949c.89 0 1.65-.316 2.282-.949a3.111 3.111 0 0 0 .949-2.282zm3.692 6c0 .25-.091.466-.274.649a.887.887 0 0 1-.65.274.857.857 0 0 1-.648-.274L9.954 11.26c-.86.596-1.82.894-2.877.894a4.989 4.989 0 0 1-1.972-.4 5.076 5.076 0 0 1-1.623-1.082A5.076 5.076 0 0 1 2.4 9.049 4.989 4.989 0 0 1 2 7.077c0-.688.133-1.345.4-1.972a5.076 5.076 0 0 1 1.082-1.623A5.076 5.076 0 0 1 5.105 2.4 4.989 4.989 0 0 1 7.077 2c.687 0 1.345.133 1.972.4a5.076 5.076 0 0 1 1.623 1.082c.454.454.815.995 1.082 1.623.266.627.4 1.284.4 1.972a4.938 4.938 0 0 1-.894 2.877l2.473 2.474a.883.883 0 0 1 .267.649z" | |||||
style="fill: currentColor;" | |||||
/> | |||||
</svg> | |||||
</div> | |||||
</div> | |||||
<div | |||||
class="select-list-list-container spacer-top" | |||||
> | |||||
<ul | |||||
class="menu" | |||||
/> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer | |||||
class="modal-foot" | |||||
> | |||||
<button | |||||
class="button button-link" | |||||
type="reset" | |||||
> | |||||
Done | |||||
</button> | |||||
</footer> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
} | } | ||||
> | > | ||||
<div | |||||
aria-modal="true" | |||||
className="ReactModal__Overlay ReactModal__Overlay--after-open modal-overlay" | |||||
onClick={[Function]} | |||||
onMouseDown={[Function]} | |||||
style={Object {}} | |||||
<ModalPortal | |||||
ariaHideApp={true} | |||||
bodyOpenClassName="ReactModal__Body--open" | |||||
className="modal" | |||||
closeTimeoutMS={0} | |||||
contentLabel="users.update" | |||||
defaultStyles={ | |||||
Object { | |||||
"content": Object { | |||||
"WebkitOverflowScrolling": "touch", | |||||
"background": "#fff", | |||||
"border": "1px solid #ccc", | |||||
"borderRadius": "4px", | |||||
"bottom": "40px", | |||||
"left": "40px", | |||||
"outline": "none", | |||||
"overflow": "auto", | |||||
"padding": "20px", | |||||
"position": "absolute", | |||||
"right": "40px", | |||||
"top": "40px", | |||||
}, | |||||
"overlay": Object { | |||||
"backgroundColor": "rgba(255, 255, 255, 0.75)", | |||||
"bottom": 0, | |||||
"left": 0, | |||||
"position": "fixed", | |||||
"right": 0, | |||||
"top": 0, | |||||
}, | |||||
} | |||||
} | |||||
isOpen={true} | |||||
onRequestClose={[Function]} | |||||
overlayClassName="modal-overlay" | |||||
parentSelector={[Function]} | |||||
portalClassName="ReactModalPortal" | |||||
role="dialog" | |||||
shouldCloseOnEsc={true} | |||||
shouldCloseOnOverlayClick={true} | |||||
shouldFocusAfterRender={true} | |||||
shouldReturnFocusAfterClose={true} | |||||
style={ | |||||
Object { | |||||
"content": Object {}, | |||||
"overlay": Object {}, | |||||
} | |||||
} | |||||
> | > | ||||
<div | <div | ||||
aria-label="users.update" | |||||
className="ReactModal__Content ReactModal__Content--after-open modal" | |||||
className="ReactModal__Overlay ReactModal__Overlay--after-open modal-overlay" | |||||
onClick={[Function]} | onClick={[Function]} | ||||
onKeyDown={[Function]} | |||||
onMouseDown={[Function]} | onMouseDown={[Function]} | ||||
onMouseUp={[Function]} | |||||
style={Object {}} | style={Object {}} | ||||
tabIndex="-1" | |||||
> | > | ||||
<header | |||||
className="modal-head" | |||||
> | |||||
<h2> | |||||
users.update | |||||
</h2> | |||||
</header> | |||||
<div | <div | ||||
className="modal-body" | |||||
aria-label="users.update" | |||||
className="ReactModal__Content ReactModal__Content--after-open modal" | |||||
onClick={[Function]} | |||||
onKeyDown={[Function]} | |||||
onMouseDown={[Function]} | |||||
onMouseUp={[Function]} | |||||
role="dialog" | |||||
style={Object {}} | |||||
tabIndex="-1" | |||||
> | > | ||||
<DeferredSpinner | |||||
loading={true} | |||||
timeout={100} | |||||
<header | |||||
className="modal-head" | |||||
> | |||||
<h2> | |||||
users.update | |||||
</h2> | |||||
</header> | |||||
<div | |||||
className="modal-body" | |||||
> | > | ||||
<SelectList | |||||
elements={Array []} | |||||
onSearch={[Function]} | |||||
onSelect={[Function]} | |||||
onUnselect={[Function]} | |||||
renderElement={[Function]} | |||||
selectedElements={Array []} | |||||
<DeferredSpinner | |||||
loading={true} | |||||
timeout={100} | |||||
> | > | ||||
<div | |||||
className="select-list" | |||||
<SelectList | |||||
elements={Array []} | |||||
onSearch={[Function]} | |||||
onSelect={[Function]} | |||||
onUnselect={[Function]} | |||||
renderElement={[Function]} | |||||
selectedElements={Array []} | |||||
> | > | ||||
<div | <div | ||||
className="display-flex-center" | |||||
className="select-list" | |||||
> | > | ||||
<RadioToggle | |||||
className="spacer-right" | |||||
disabled={false} | |||||
name="filter" | |||||
onCheck={[Function]} | |||||
options={ | |||||
Array [ | |||||
Object { | |||||
"disabled": false, | |||||
"label": "selected", | |||||
"value": "selected", | |||||
}, | |||||
Object { | |||||
"disabled": false, | |||||
"label": "unselected", | |||||
"value": "deselected", | |||||
}, | |||||
Object { | |||||
"disabled": false, | |||||
"label": "all", | |||||
"value": "all", | |||||
}, | |||||
] | |||||
} | |||||
value="selected" | |||||
<div | |||||
className="display-flex-center" | |||||
> | > | ||||
<ul | |||||
className="radio-toggle spacer-right" | |||||
<RadioToggle | |||||
className="spacer-right" | |||||
disabled={false} | |||||
name="filter" | |||||
onCheck={[Function]} | |||||
options={ | |||||
Array [ | |||||
Object { | |||||
"disabled": false, | |||||
"label": "selected", | |||||
"value": "selected", | |||||
}, | |||||
Object { | |||||
"disabled": false, | |||||
"label": "unselected", | |||||
"value": "deselected", | |||||
}, | |||||
Object { | |||||
"disabled": false, | |||||
"label": "all", | |||||
"value": "all", | |||||
}, | |||||
] | |||||
} | |||||
value="selected" | |||||
> | > | ||||
<li | |||||
key="selected" | |||||
> | |||||
<input | |||||
checked={true} | |||||
disabled={false} | |||||
id="filter__selected" | |||||
name="filter" | |||||
onChange={[Function]} | |||||
type="radio" | |||||
value="selected" | |||||
/> | |||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__selected" | |||||
> | |||||
selected | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
<li | |||||
key="deselected" | |||||
<ul | |||||
className="radio-toggle spacer-right" | |||||
> | > | ||||
<input | |||||
checked={false} | |||||
disabled={false} | |||||
id="filter__deselected" | |||||
name="filter" | |||||
onChange={[Function]} | |||||
type="radio" | |||||
value="deselected" | |||||
/> | |||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__deselected" | |||||
> | |||||
unselected | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
<li | |||||
key="all" | |||||
<li | |||||
key="selected" | |||||
> | |||||
<input | |||||
checked={true} | |||||
disabled={false} | |||||
id="filter__selected" | |||||
name="filter" | |||||
onChange={[Function]} | |||||
type="radio" | |||||
value="selected" | |||||
/> | |||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__selected" | |||||
> | |||||
selected | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
<li | |||||
key="deselected" | |||||
> | |||||
<input | |||||
checked={false} | |||||
disabled={false} | |||||
id="filter__deselected" | |||||
name="filter" | |||||
onChange={[Function]} | |||||
type="radio" | |||||
value="deselected" | |||||
/> | |||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__deselected" | |||||
> | |||||
unselected | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
<li | |||||
key="all" | |||||
> | |||||
<input | |||||
checked={false} | |||||
disabled={false} | |||||
id="filter__all" | |||||
name="filter" | |||||
onChange={[Function]} | |||||
type="radio" | |||||
value="all" | |||||
/> | |||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__all" | |||||
> | |||||
all | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
</ul> | |||||
</RadioToggle> | |||||
<SearchBox | |||||
autoFocus={true} | |||||
loading={false} | |||||
onChange={[Function]} | |||||
placeholder="search_verb" | |||||
value="" | |||||
> | |||||
<div | |||||
className="search-box" | |||||
> | > | ||||
<input | <input | ||||
checked={false} | |||||
disabled={false} | |||||
id="filter__all" | |||||
name="filter" | |||||
aria-label="search_verb" | |||||
autoComplete="off" | |||||
autoFocus={true} | |||||
className="search-box-input" | |||||
maxLength={100} | |||||
onChange={[Function]} | onChange={[Function]} | ||||
type="radio" | |||||
value="all" | |||||
onKeyDown={[Function]} | |||||
placeholder="search_verb" | |||||
type="search" | |||||
value="" | |||||
/> | /> | ||||
<Tooltip> | |||||
<label | |||||
htmlFor="filter__all" | |||||
> | |||||
all | |||||
</label> | |||||
</Tooltip> | |||||
</li> | |||||
</ul> | |||||
</RadioToggle> | |||||
<SearchBox | |||||
autoFocus={true} | |||||
loading={false} | |||||
onChange={[Function]} | |||||
placeholder="search_verb" | |||||
value="" | |||||
> | |||||
<div | |||||
className="search-box" | |||||
> | |||||
<input | |||||
aria-label="search_verb" | |||||
autoComplete="off" | |||||
autoFocus={true} | |||||
className="search-box-input" | |||||
maxLength={100} | |||||
onChange={[Function]} | |||||
onKeyDown={[Function]} | |||||
placeholder="search_verb" | |||||
type="search" | |||||
value="" | |||||
/> | |||||
<DeferredSpinner | |||||
loading={false} | |||||
timeout={100} | |||||
> | |||||
<SearchIcon | |||||
className="search-box-magnifier" | |||||
<DeferredSpinner | |||||
loading={false} | |||||
timeout={100} | |||||
> | > | ||||
<Icon | |||||
<SearchIcon | |||||
className="search-box-magnifier" | className="search-box-magnifier" | ||||
> | > | ||||
<svg | |||||
<Icon | |||||
className="search-box-magnifier" | className="search-box-magnifier" | ||||
height={16} | |||||
style={ | |||||
Object { | |||||
"clipRule": "evenodd", | |||||
"fillRule": "evenodd", | |||||
"strokeLinejoin": "round", | |||||
"strokeMiterlimit": 1.41421, | |||||
} | |||||
} | |||||
version="1.1" | |||||
viewBox="0 0 16 16" | |||||
width={16} | |||||
xmlSpace="preserve" | |||||
xmlnsXlink="http://www.w3.org/1999/xlink" | |||||
> | > | ||||
<path | |||||
d="M10.308 7.077c0-.89-.316-1.65-.949-2.283a3.111 3.111 0 0 0-2.282-.948c-.89 0-1.65.316-2.283.948a3.111 3.111 0 0 0-.948 2.283c0 .89.316 1.65.948 2.282a3.111 3.111 0 0 0 2.283.949c.89 0 1.65-.316 2.282-.949a3.111 3.111 0 0 0 .949-2.282zm3.692 6c0 .25-.091.466-.274.649a.887.887 0 0 1-.65.274.857.857 0 0 1-.648-.274L9.954 11.26c-.86.596-1.82.894-2.877.894a4.989 4.989 0 0 1-1.972-.4 5.076 5.076 0 0 1-1.623-1.082A5.076 5.076 0 0 1 2.4 9.049 4.989 4.989 0 0 1 2 7.077c0-.688.133-1.345.4-1.972a5.076 5.076 0 0 1 1.082-1.623A5.076 5.076 0 0 1 5.105 2.4 4.989 4.989 0 0 1 7.077 2c.687 0 1.345.133 1.972.4a5.076 5.076 0 0 1 1.623 1.082c.454.454.815.995 1.082 1.623.266.627.4 1.284.4 1.972a4.938 4.938 0 0 1-.894 2.877l2.473 2.474a.883.883 0 0 1 .267.649z" | |||||
<svg | |||||
className="search-box-magnifier" | |||||
height={16} | |||||
style={ | style={ | ||||
Object { | Object { | ||||
"fill": "currentColor", | |||||
"clipRule": "evenodd", | |||||
"fillRule": "evenodd", | |||||
"strokeLinejoin": "round", | |||||
"strokeMiterlimit": 1.41421, | |||||
} | } | ||||
} | } | ||||
/> | |||||
</svg> | |||||
</Icon> | |||||
</SearchIcon> | |||||
</DeferredSpinner> | |||||
version="1.1" | |||||
viewBox="0 0 16 16" | |||||
width={16} | |||||
xmlSpace="preserve" | |||||
xmlnsXlink="http://www.w3.org/1999/xlink" | |||||
> | |||||
<path | |||||
d="M10.308 7.077c0-.89-.316-1.65-.949-2.283a3.111 3.111 0 0 0-2.282-.948c-.89 0-1.65.316-2.283.948a3.111 3.111 0 0 0-.948 2.283c0 .89.316 1.65.948 2.282a3.111 3.111 0 0 0 2.283.949c.89 0 1.65-.316 2.282-.949a3.111 3.111 0 0 0 .949-2.282zm3.692 6c0 .25-.091.466-.274.649a.887.887 0 0 1-.65.274.857.857 0 0 1-.648-.274L9.954 11.26c-.86.596-1.82.894-2.877.894a4.989 4.989 0 0 1-1.972-.4 5.076 5.076 0 0 1-1.623-1.082A5.076 5.076 0 0 1 2.4 9.049 4.989 4.989 0 0 1 2 7.077c0-.688.133-1.345.4-1.972a5.076 5.076 0 0 1 1.082-1.623A5.076 5.076 0 0 1 5.105 2.4 4.989 4.989 0 0 1 7.077 2c.687 0 1.345.133 1.972.4a5.076 5.076 0 0 1 1.623 1.082c.454.454.815.995 1.082 1.623.266.627.4 1.284.4 1.972a4.938 4.938 0 0 1-.894 2.877l2.473 2.474a.883.883 0 0 1 .267.649z" | |||||
style={ | |||||
Object { | |||||
"fill": "currentColor", | |||||
} | |||||
} | |||||
/> | |||||
</svg> | |||||
</Icon> | |||||
</SearchIcon> | |||||
</DeferredSpinner> | |||||
</div> | |||||
</SearchBox> | |||||
</div> | |||||
<SelectListListContainer | |||||
disabledElements={Array []} | |||||
elements={Array []} | |||||
filter="selected" | |||||
onSelect={[Function]} | |||||
onUnselect={[Function]} | |||||
renderElement={[Function]} | |||||
selectedElements={Array []} | |||||
> | |||||
<div | |||||
className="select-list-list-container spacer-top" | |||||
> | |||||
<ul | |||||
className="menu" | |||||
/> | |||||
</div> | </div> | ||||
</SearchBox> | |||||
</SelectListListContainer> | |||||
</div> | </div> | ||||
<SelectListListContainer | |||||
disabledElements={Array []} | |||||
elements={Array []} | |||||
filter="selected" | |||||
onSelect={[Function]} | |||||
onUnselect={[Function]} | |||||
renderElement={[Function]} | |||||
selectedElements={Array []} | |||||
> | |||||
<div | |||||
className="select-list-list-container spacer-top" | |||||
> | |||||
<ul | |||||
className="menu" | |||||
/> | |||||
</div> | |||||
</SelectListListContainer> | |||||
</div> | |||||
</SelectList> | |||||
</DeferredSpinner> | |||||
</div> | |||||
<footer | |||||
className="modal-foot" | |||||
> | |||||
<ResetButtonLink | |||||
onClick={[Function]} | |||||
</SelectList> | |||||
</DeferredSpinner> | |||||
</div> | |||||
<footer | |||||
className="modal-foot" | |||||
> | > | ||||
<Button | |||||
className="button-link" | |||||
<ResetButtonLink | |||||
onClick={[Function]} | onClick={[Function]} | ||||
type="reset" | |||||
> | > | ||||
<button | |||||
className="button button-link" | |||||
<Button | |||||
className="button-link" | |||||
onClick={[Function]} | onClick={[Function]} | ||||
type="reset" | type="reset" | ||||
> | > | ||||
Done | |||||
</button> | |||||
</Button> | |||||
</ResetButtonLink> | |||||
</footer> | |||||
<button | |||||
className="button button-link" | |||||
onClick={[Function]} | |||||
type="reset" | |||||
> | |||||
Done | |||||
</button> | |||||
</Button> | |||||
</ResetButtonLink> | |||||
</footer> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | |||||
</ModalPortal> | |||||
</ModalPortal> | |||||
</Portal> | |||||
</Modal> | </Modal> | ||||
</Modal> | </Modal> | ||||
</EditMembers> | </EditMembers> |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should create new group 1`] = ` | exports[`should create new group 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<header | <header | ||||
className="page-header" | className="page-header" | ||||
id="groups-header" | id="groups-header" | ||||
user_groups.page.description | user_groups.page.description | ||||
</p> | </p> | ||||
</header> | </header> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should create new group 2`] = ` | exports[`should create new group 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<header | <header | ||||
className="page-header" | className="page-header" | ||||
id="groups-header" | id="groups-header" | ||||
onClose={[Function]} | onClose={[Function]} | ||||
onSubmit={[Function]} | onSubmit={[Function]} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
userOrganizations: getMyOrganizations(state) | userOrganizations: getMyOrganizations(state) | ||||
}); | }); | ||||
const fetchIssueOrganizations = (organizationKeys: string[]) => (dispatch: Dispatch<Store>) => { | |||||
const fetchIssueOrganizations = (organizationKeys: string[]) => (dispatch: Dispatch) => { | |||||
if (!organizationKeys.length) { | if (!organizationKeys.length) { | ||||
return Promise.resolve(); | return Promise.resolve(); | ||||
} | } |
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
*/ | */ | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { ShallowWrapper } from 'enzyme'; | |||||
import App from '../App'; | import App from '../App'; | ||||
import { shallowWithIntl, waitAndUpdate } from '../../../../helpers/testUtils'; | import { shallowWithIntl, waitAndUpdate } from '../../../../helpers/testUtils'; | ||||
import { Issue } from '../../../../app/types'; | import { Issue } from '../../../../app/types'; | ||||
}; | }; | ||||
it('should render a list of issue', async () => { | it('should render a list of issue', async () => { | ||||
const wrapper: ShallowWrapper<App['props'], App['state']> = shallowWithIntl(<App {...PROPS} />, { | |||||
const wrapper = shallowWithIntl<App>(<App {...PROPS} />, { | |||||
context: { router: { replace } } | context: { router: { replace } } | ||||
}); | }); | ||||
}); | }); | ||||
it('should be able to check/uncheck a group of issues with the Shift key', async () => { | it('should be able to check/uncheck a group of issues with the Shift key', async () => { | ||||
const wrapper = shallowWithIntl(<App {...PROPS} />, { | |||||
const wrapper = shallowWithIntl<App>(<App {...PROPS} />, { | |||||
context: { router: { replace } } | context: { router: { replace } } | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().issues.length).toBe(4); | expect(wrapper.state().issues.length).toBe(4); | ||||
const instance = wrapper.instance() as App; | |||||
const instance = wrapper.instance(); | |||||
instance.handleIssueCheck('foo', eventNoShiftKey); | instance.handleIssueCheck('foo', eventNoShiftKey); | ||||
expect(wrapper.state().checked.length).toBe(1); | expect(wrapper.state().checked.length).toBe(1); | ||||
}); | }); | ||||
it('should avoid non-existing keys', async () => { | it('should avoid non-existing keys', async () => { | ||||
const wrapper = shallowWithIntl(<App {...PROPS} />, { | |||||
const wrapper = shallowWithIntl<App>(<App {...PROPS} />, { | |||||
context: { router: { replace } } | context: { router: { replace } } | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().issues.length).toBe(4); | expect(wrapper.state().issues.length).toBe(4); | ||||
const instance = wrapper.instance() as App; | |||||
const instance = wrapper.instance(); | |||||
instance.handleIssueCheck('foo', eventNoShiftKey); | instance.handleIssueCheck('foo', eventNoShiftKey); | ||||
expect(wrapper.state().checked.length).toBe(1); | expect(wrapper.state().checked.length).toBe(1); | ||||
}); | }); | ||||
it('should be able to uncheck all issue with global checkbox', async () => { | it('should be able to uncheck all issue with global checkbox', async () => { | ||||
const wrapper = shallowWithIntl(<App {...PROPS} />, { | |||||
const wrapper = shallowWithIntl<App>(<App {...PROPS} />, { | |||||
context: { router: { replace } } | context: { router: { replace } } | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
expect(wrapper.state().issues.length).toBe(4); | expect(wrapper.state().issues.length).toBe(4); | ||||
const instance = wrapper.instance() as App; | |||||
const instance = wrapper.instance(); | |||||
instance.handleIssueCheck('foo', eventNoShiftKey); | instance.handleIssueCheck('foo', eventNoShiftKey); | ||||
instance.handleIssueCheck('bar', eventNoShiftKey); | instance.handleIssueCheck('bar', eventNoShiftKey); | ||||
expect(wrapper.state().checked.length).toBe(2); | expect(wrapper.state().checked.length).toBe(2); | ||||
}); | }); | ||||
it('should be able to check all issue with global checkbox', async () => { | it('should be able to check all issue with global checkbox', async () => { | ||||
const wrapper = shallowWithIntl(<App {...PROPS} />, { | |||||
const wrapper = shallowWithIntl<App>(<App {...PROPS} />, { | |||||
context: { router: { replace } } | context: { router: { replace } } | ||||
}); | }); | ||||
await waitAndUpdate(wrapper); | await waitAndUpdate(wrapper); | ||||
const instance = wrapper.instance() as App; | |||||
const instance = wrapper.instance(); | |||||
expect(wrapper.state().checked.length).toBe(0); | expect(wrapper.state().checked.length).toBe(0); | ||||
instance.onCheckAll(true); | instance.onCheckAll(true); | ||||
expect(wrapper.state().checked.length).toBe(wrapper.state().issues.length); | expect(wrapper.state().checked.length).toBe(wrapper.state().issues.length); |
loading={false} | loading={false} | ||||
timeout={100} | timeout={100} | ||||
/> | /> | ||||
<React.Fragment> | |||||
<div | |||||
className="search-navigator-facet-empty little-spacer-top" | |||||
> | |||||
no_results | |||||
</div> | |||||
<MultipleSelectionHint | |||||
options={0} | |||||
values={0} | |||||
/> | |||||
</React.Fragment> | |||||
<div | |||||
className="search-navigator-facet-empty little-spacer-top" | |||||
> | |||||
no_results | |||||
</div> | |||||
<MultipleSelectionHint | |||||
options={0} | |||||
values={0} | |||||
/> | |||||
</FacetBox> | </FacetBox> | ||||
`; | `; | ||||
] | ] | ||||
} | } | ||||
/> | /> | ||||
<React.Fragment> | |||||
<FacetBox | |||||
className="is-inner" | |||||
property="owaspTop10" | |||||
> | |||||
<FacetHeader | |||||
name="issues.facet.owaspTop10" | |||||
onClick={[Function]} | |||||
open={true} | |||||
values={ | |||||
Array [ | |||||
"A3", | |||||
] | |||||
} | |||||
/> | |||||
<DeferredSpinner | |||||
<FacetBox | |||||
className="is-inner" | |||||
property="owaspTop10" | |||||
> | |||||
<FacetHeader | |||||
name="issues.facet.owaspTop10" | |||||
onClick={[Function]} | |||||
open={true} | |||||
values={ | |||||
Array [ | |||||
"A3", | |||||
] | |||||
} | |||||
/> | |||||
<DeferredSpinner | |||||
loading={false} | |||||
timeout={100} | |||||
/> | |||||
<FacetItemsList> | |||||
<FacetItem | |||||
active={false} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="a1" | |||||
loading={false} | loading={false} | ||||
timeout={100} | |||||
/> | |||||
<React.Fragment> | |||||
<FacetItemsList> | |||||
<FacetItem | |||||
active={false} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="a1" | |||||
loading={false} | |||||
name="A1 - a1 title" | |||||
onClick={[Function]} | |||||
stat="15" | |||||
tooltip="A1 - a1 title" | |||||
value="a1" | |||||
/> | |||||
<FacetItem | |||||
active={true} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="a3" | |||||
loading={false} | |||||
name="A3" | |||||
onClick={[Function]} | |||||
stat="5" | |||||
tooltip="A3" | |||||
value="a3" | |||||
/> | |||||
</FacetItemsList> | |||||
<MultipleSelectionHint | |||||
options={2} | |||||
values={1} | |||||
/> | |||||
</React.Fragment> | |||||
</FacetBox> | |||||
<FacetBox | |||||
className="is-inner" | |||||
property="sansTop25" | |||||
> | |||||
<FacetHeader | |||||
name="issues.facet.sansTop25" | |||||
name="A1 - a1 title" | |||||
onClick={[Function]} | onClick={[Function]} | ||||
open={true} | |||||
values={ | |||||
Array [ | |||||
"Risky Resource Management", | |||||
] | |||||
} | |||||
stat="15" | |||||
tooltip="A1 - a1 title" | |||||
value="a1" | |||||
/> | /> | ||||
<DeferredSpinner | |||||
<FacetItem | |||||
active={true} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="a3" | |||||
loading={false} | loading={false} | ||||
timeout={100} | |||||
name="A3" | |||||
onClick={[Function]} | |||||
stat="5" | |||||
tooltip="A3" | |||||
value="a3" | |||||
/> | /> | ||||
<React.Fragment> | |||||
<FacetItemsList> | |||||
<FacetItem | |||||
active={false} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="foo" | |||||
loading={false} | |||||
name="foo" | |||||
onClick={[Function]} | |||||
stat="12" | |||||
tooltip="foo" | |||||
value="foo" | |||||
/> | |||||
<FacetItem | |||||
active={true} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="risky-resource" | |||||
loading={false} | |||||
name="Risky Resource Management" | |||||
onClick={[Function]} | |||||
stat="10" | |||||
tooltip="Risky Resource Management" | |||||
value="risky-resource" | |||||
/> | |||||
</FacetItemsList> | |||||
<MultipleSelectionHint | |||||
options={2} | |||||
values={1} | |||||
/> | |||||
</React.Fragment> | |||||
</FacetBox> | |||||
<ListStyleFacet | |||||
className="is-inner" | |||||
facetHeader="issues.facet.cwe" | |||||
fetching={false} | |||||
getFacetItemText={[Function]} | |||||
getSearchResultKey={[Function]} | |||||
getSearchResultText={[Function]} | |||||
loadSearchResultCount={[Function]} | |||||
maxInitialItems={15} | |||||
maxItems={100} | |||||
minSearchLength={2} | |||||
onChange={[MockFunction]} | |||||
onSearch={[Function]} | |||||
onToggle={[MockFunction]} | |||||
</FacetItemsList> | |||||
<MultipleSelectionHint | |||||
options={2} | |||||
values={1} | |||||
/> | |||||
</FacetBox> | |||||
<FacetBox | |||||
className="is-inner" | |||||
property="sansTop25" | |||||
> | |||||
<FacetHeader | |||||
name="issues.facet.sansTop25" | |||||
onClick={[Function]} | |||||
open={true} | open={true} | ||||
property="cwe" | |||||
query={Object {}} | |||||
renderFacetItem={[Function]} | |||||
renderSearchResult={[Function]} | |||||
searchPlaceholder="search.search_for_cwe" | |||||
stats={ | |||||
Object { | |||||
"173": 3, | |||||
"42": 5, | |||||
} | |||||
} | |||||
values={ | values={ | ||||
Array [ | Array [ | ||||
"42", | |||||
"Risky Resource Management", | |||||
] | ] | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
<DeferredSpinner | |||||
loading={false} | |||||
timeout={100} | |||||
/> | |||||
<FacetItemsList> | |||||
<FacetItem | |||||
active={false} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="foo" | |||||
loading={false} | |||||
name="foo" | |||||
onClick={[Function]} | |||||
stat="12" | |||||
tooltip="foo" | |||||
value="foo" | |||||
/> | |||||
<FacetItem | |||||
active={true} | |||||
disabled={false} | |||||
halfWidth={false} | |||||
key="risky-resource" | |||||
loading={false} | |||||
name="Risky Resource Management" | |||||
onClick={[Function]} | |||||
stat="10" | |||||
tooltip="Risky Resource Management" | |||||
value="risky-resource" | |||||
/> | |||||
</FacetItemsList> | |||||
<MultipleSelectionHint | |||||
options={2} | |||||
values={1} | |||||
/> | |||||
</FacetBox> | |||||
<ListStyleFacet | |||||
className="is-inner" | |||||
facetHeader="issues.facet.cwe" | |||||
fetching={false} | |||||
getFacetItemText={[Function]} | |||||
getSearchResultKey={[Function]} | |||||
getSearchResultText={[Function]} | |||||
loadSearchResultCount={[Function]} | |||||
maxInitialItems={15} | |||||
maxItems={100} | |||||
minSearchLength={2} | |||||
onChange={[MockFunction]} | |||||
onSearch={[Function]} | |||||
onToggle={[MockFunction]} | |||||
open={true} | |||||
property="cwe" | |||||
query={Object {}} | |||||
renderFacetItem={[Function]} | |||||
renderSearchResult={[Function]} | |||||
searchPlaceholder="search.search_for_cwe" | |||||
stats={ | |||||
Object { | |||||
"173": 3, | |||||
"42": 5, | |||||
} | |||||
} | |||||
values={ | |||||
Array [ | |||||
"42", | |||||
] | |||||
} | |||||
/> | |||||
</FacetBox> | </FacetBox> | ||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = ` | exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_under_maintenance | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.1", | |||||
} | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_under_maintenance | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.1", | |||||
} | } | ||||
/> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.2", | |||||
} | |||||
} | |||||
/> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.2", | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = ` | exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_under_maintenance | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.1", | |||||
} | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_under_maintenance | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.1", | |||||
} | } | ||||
/> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.2", | |||||
} | |||||
} | |||||
/> | |||||
<p | |||||
className="maintenance-text" | |||||
dangerouslySetInnerHTML={ | |||||
Object { | |||||
"__html": "maintenance.sonarqube_is_under_maintenance.2", | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Maintenance Page should render DOWN status 1`] = ` | exports[`Maintenance Page should render DOWN status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.sonarqube_is_down | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.sonarqube_is_down.text | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.sonarqube_is_down | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.sonarqube_is_down.text | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | > | ||||
<a | |||||
href="/" | |||||
> | |||||
maintenance.try_again | |||||
</a> | |||||
</p> | |||||
</React.Fragment> | |||||
maintenance.try_again | |||||
</a> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Maintenance Page should render OFFLINE status 1`] = ` | exports[`Maintenance Page should render OFFLINE status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.sonarqube_is_offline | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.sonarqube_is_offline.text | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | > | ||||
maintenance.sonarqube_is_offline | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.sonarqube_is_offline.text | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | |||||
maintenance.try_again | |||||
</a> | |||||
</p> | |||||
</React.Fragment> | |||||
maintenance.try_again | |||||
</a> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Maintenance Page should render STARTING status 1`] = ` | exports[`Maintenance Page should render STARTING status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_starting | |||||
</h1> | |||||
<p | |||||
className="maintenance-spinner" | |||||
> | |||||
<i | |||||
className="spinner" | |||||
/> | |||||
</p> | |||||
</React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_starting | |||||
</h1> | |||||
<p | |||||
className="maintenance-spinner" | |||||
> | |||||
<i | |||||
className="spinner" | |||||
/> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Maintenance Page should render UP status 1`] = ` | exports[`Maintenance Page should render UP status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_up | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.sonarqube_is_up | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
maintenance.all_systems_opetational | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | > | ||||
maintenance.all_systems_opetational | |||||
</p> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</React.Fragment> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should render MIGRATION_FAILED state 1`] = ` | exports[`Setup Page should render MIGRATION_FAILED state 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.upgrade_failed | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_failed.text | |||||
</p> | |||||
</React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.upgrade_failed | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_failed.text | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = ` | exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-success" | |||||
> | |||||
maintenance.database_is_up_to_date | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
<h1 | |||||
className="maintenance-title text-success" | |||||
> | |||||
maintenance.database_is_up_to_date | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | > | ||||
<a | |||||
href="/" | |||||
> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</React.Fragment> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should render NO_MIGRATION state 1`] = ` | exports[`Setup Page should render NO_MIGRATION state 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.database_is_up_to_date | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | > | ||||
maintenance.database_is_up_to_date | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
<a | |||||
href="/" | |||||
> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</React.Fragment> | |||||
layout.home | |||||
</a> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should render NOT_SUPPORTED state 1`] = ` | exports[`Setup Page should render NOT_SUPPORTED state 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.migration_not_supported | |||||
</h1> | |||||
<p> | |||||
maintenance.migration_not_supported.text | |||||
</p> | |||||
</React.Fragment> | |||||
<h1 | |||||
className="maintenance-title text-danger" | |||||
> | |||||
maintenance.migration_not_supported | |||||
</h1> | |||||
<p> | |||||
maintenance.migration_not_supported.text | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should start migration 1`] = ` | exports[`Setup Page should start migration 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple panel-warning" | className="page-simple panel-warning" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.upgrade_database | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_database.1 | |||||
</p> | |||||
<p | |||||
className="maintenance-text" | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.upgrade_database | |||||
</h1> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_database.1 | |||||
</p> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_database.2 | |||||
</p> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_database.3 | |||||
</p> | |||||
<div | |||||
className="maintenance-spinner" | |||||
> | |||||
<Button | |||||
id="start-migration" | |||||
onClick={[Function]} | |||||
> | > | ||||
maintenance.upgrade_database.2 | |||||
</p> | |||||
<p | |||||
className="maintenance-text" | |||||
> | |||||
maintenance.upgrade_database.3 | |||||
</p> | |||||
<div | |||||
className="maintenance-spinner" | |||||
> | |||||
<Button | |||||
id="start-migration" | |||||
onClick={[Function]} | |||||
> | |||||
maintenance.upgrade | |||||
</Button> | |||||
</div> | |||||
</React.Fragment> | |||||
maintenance.upgrade | |||||
</Button> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`Setup Page should start migration 2`] = ` | exports[`Setup Page should start migration 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defaultTitle="maintenance.page" | defaultTitle="maintenance.page" | ||||
defer={true} | defer={true} | ||||
className="page-simple" | className="page-simple" | ||||
id="nonav" | id="nonav" | ||||
> | > | ||||
<React.Fragment> | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.database_migration | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
<h1 | |||||
className="maintenance-title" | |||||
> | |||||
maintenance.database_migration | |||||
</h1> | |||||
<p | |||||
className="maintenance-text text-center" | |||||
> | |||||
background_tasks.table.started | |||||
<DateFromNow | |||||
date="2017-01-02T00:00:00.000Z" | |||||
/> | |||||
<br /> | |||||
<small | |||||
className="text-muted" | |||||
> | > | ||||
background_tasks.table.started | |||||
<DateFromNow | |||||
<TimeFormatter | |||||
date="2017-01-02T00:00:00.000Z" | date="2017-01-02T00:00:00.000Z" | ||||
long={true} | |||||
/> | /> | ||||
<br /> | |||||
<small | |||||
className="text-muted" | |||||
> | |||||
<TimeFormatter | |||||
date="2017-01-02T00:00:00.000Z" | |||||
long={true} | |||||
/> | |||||
</small> | |||||
</p> | |||||
<p | |||||
className="maintenance-spinner" | |||||
> | |||||
<i | |||||
className="spinner" | |||||
/> | |||||
</p> | |||||
</React.Fragment> | |||||
</small> | |||||
</p> | |||||
<p | |||||
className="maintenance-spinner" | |||||
> | |||||
<i | |||||
className="spinner" | |||||
/> | |||||
</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render and open the modal 1`] = ` | exports[`should render and open the modal 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
key="add-member-button" | key="add-member-button" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
> | > | ||||
organization.members.add | organization.members.add | ||||
</Button> | </Button> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render and open the modal 2`] = ` | exports[`should render and open the modal 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Button | <Button | ||||
key="add-member-button" | key="add-member-button" | ||||
onClick={[Function]} | onClick={[Function]} | ||||
</footer> | </footer> | ||||
</form> | </form> | ||||
</Modal> | </Modal> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
> | > | ||||
organization.members.x_groups.0 | organization.members.x_groups.0 | ||||
</td> | </td> | ||||
<React.Fragment> | |||||
<td | |||||
className="nowrap text-middle text-right" | |||||
> | |||||
<ActionsDropdown> | |||||
<ActionsDropdownItem | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.manage_groups | |||||
</ActionsDropdownItem> | |||||
<ActionsDropdownDivider /> | |||||
<ActionsDropdownItem | |||||
destructive={true} | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.remove | |||||
</ActionsDropdownItem> | |||||
</ActionsDropdown> | |||||
</td> | |||||
</React.Fragment> | |||||
<td | |||||
className="nowrap text-middle text-right" | |||||
> | |||||
<ActionsDropdown> | |||||
<ActionsDropdownItem | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.manage_groups | |||||
</ActionsDropdownItem> | |||||
<ActionsDropdownDivider /> | |||||
<ActionsDropdownItem | |||||
destructive={true} | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.remove | |||||
</ActionsDropdownItem> | |||||
</ActionsDropdown> | |||||
</td> | |||||
</tr> | </tr> | ||||
`; | `; | ||||
> | > | ||||
organization.members.x_groups.3 | organization.members.x_groups.3 | ||||
</td> | </td> | ||||
<React.Fragment> | |||||
<td | |||||
className="nowrap text-middle text-right" | |||||
> | |||||
<ActionsDropdown> | |||||
<ActionsDropdownItem | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.manage_groups | |||||
</ActionsDropdownItem> | |||||
<ActionsDropdownDivider /> | |||||
<ActionsDropdownItem | |||||
destructive={true} | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.remove | |||||
</ActionsDropdownItem> | |||||
</ActionsDropdown> | |||||
</td> | |||||
</React.Fragment> | |||||
<td | |||||
className="nowrap text-middle text-right" | |||||
> | |||||
<ActionsDropdown> | |||||
<ActionsDropdownItem | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.manage_groups | |||||
</ActionsDropdownItem> | |||||
<ActionsDropdownDivider /> | |||||
<ActionsDropdownItem | |||||
destructive={true} | |||||
onClick={[Function]} | |||||
> | |||||
organization.members.remove | |||||
</ActionsDropdownItem> | |||||
</ActionsDropdown> | |||||
</td> | |||||
</tr> | </tr> | ||||
`; | `; |
/> | /> | ||||
</div> | </div> | ||||
</MembersPageHeader> | </MembersPageHeader> | ||||
<React.Fragment> | |||||
<MembersListHeader | |||||
handleSearch={[Function]} | |||||
total={3} | |||||
/> | |||||
<MembersList | |||||
members={ | |||||
Array [ | |||||
Object { | |||||
"avatar": "", | |||||
"groupCount": 3, | |||||
"login": "admin", | |||||
"name": "Admin Istrator", | |||||
}, | |||||
Object { | |||||
"avatar": "7daf6c79d4802916d83f6266e24850af", | |||||
"groupCount": 1, | |||||
"login": "john", | |||||
"name": "John Doe", | |||||
}, | |||||
] | |||||
} | |||||
organization={ | |||||
<MembersListHeader | |||||
handleSearch={[Function]} | |||||
total={3} | |||||
/> | |||||
<MembersList | |||||
members={ | |||||
Array [ | |||||
Object { | Object { | ||||
"canAdmin": true, | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
} | |||||
} | |||||
organizationGroups={ | |||||
Array [ | |||||
Object { | |||||
"default": true, | |||||
"description": "", | |||||
"id": 1, | |||||
"membersCount": 2, | |||||
"name": "Members", | |||||
}, | |||||
Object { | |||||
"default": false, | |||||
"description": "", | |||||
"id": 2, | |||||
"membersCount": 0, | |||||
"name": "Watchers", | |||||
}, | |||||
] | |||||
"avatar": "", | |||||
"groupCount": 3, | |||||
"login": "admin", | |||||
"name": "Admin Istrator", | |||||
}, | |||||
Object { | |||||
"avatar": "7daf6c79d4802916d83f6266e24850af", | |||||
"groupCount": 1, | |||||
"login": "john", | |||||
"name": "John Doe", | |||||
}, | |||||
] | |||||
} | |||||
organization={ | |||||
Object { | |||||
"canAdmin": true, | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
} | } | ||||
removeMember={[Function]} | |||||
updateMemberGroups={[Function]} | |||||
/> | |||||
<ListFooter | |||||
count={2} | |||||
loadMore={[Function]} | |||||
ready={true} | |||||
total={3} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
organizationGroups={ | |||||
Array [ | |||||
Object { | |||||
"default": true, | |||||
"description": "", | |||||
"id": 1, | |||||
"membersCount": 2, | |||||
"name": "Members", | |||||
}, | |||||
Object { | |||||
"default": false, | |||||
"description": "", | |||||
"id": 2, | |||||
"membersCount": 0, | |||||
"name": "Watchers", | |||||
}, | |||||
] | |||||
} | |||||
removeMember={[Function]} | |||||
updateMemberGroups={[Function]} | |||||
/> | |||||
<ListFooter | |||||
count={2} | |||||
loadMore={[Function]} | |||||
ready={true} | |||||
total={3} | |||||
/> | |||||
</div> | </div> | ||||
`; | `; | ||||
<MembersPageHeader | <MembersPageHeader | ||||
loading={false} | loading={false} | ||||
/> | /> | ||||
<React.Fragment> | |||||
<MembersListHeader | |||||
handleSearch={[Function]} | |||||
total={3} | |||||
/> | |||||
<MembersList | |||||
members={ | |||||
Array [ | |||||
Object { | |||||
"avatar": "", | |||||
"groupCount": 3, | |||||
"login": "admin", | |||||
"name": "Admin Istrator", | |||||
}, | |||||
Object { | |||||
"avatar": "7daf6c79d4802916d83f6266e24850af", | |||||
"groupCount": 1, | |||||
"login": "john", | |||||
"name": "John Doe", | |||||
}, | |||||
] | |||||
} | |||||
organization={ | |||||
<MembersListHeader | |||||
handleSearch={[Function]} | |||||
total={3} | |||||
/> | |||||
<MembersList | |||||
members={ | |||||
Array [ | |||||
Object { | Object { | ||||
"key": "foo", | |||||
"name": "Foo", | |||||
} | |||||
"avatar": "", | |||||
"groupCount": 3, | |||||
"login": "admin", | |||||
"name": "Admin Istrator", | |||||
}, | |||||
Object { | |||||
"avatar": "7daf6c79d4802916d83f6266e24850af", | |||||
"groupCount": 1, | |||||
"login": "john", | |||||
"name": "John Doe", | |||||
}, | |||||
] | |||||
} | |||||
organization={ | |||||
Object { | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
} | } | ||||
organizationGroups={Array []} | |||||
removeMember={[Function]} | |||||
updateMemberGroups={[Function]} | |||||
/> | |||||
<ListFooter | |||||
count={2} | |||||
loadMore={[Function]} | |||||
ready={true} | |||||
total={3} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
organizationGroups={Array []} | |||||
removeMember={[Function]} | |||||
updateMemberGroups={[Function]} | |||||
/> | |||||
<ListFooter | |||||
count={2} | |||||
loadMore={[Function]} | |||||
ready={true} | |||||
total={3} | |||||
/> | |||||
</div> | </div> | ||||
`; | `; |
import { addGlobalSuccessMessage } from '../../store/globalMessages'; | import { addGlobalSuccessMessage } from '../../store/globalMessages'; | ||||
import { translate, translateWithParameters } from '../../helpers/l10n'; | import { translate, translateWithParameters } from '../../helpers/l10n'; | ||||
import { Organization, OrganizationBase } from '../../app/types'; | import { Organization, OrganizationBase } from '../../app/types'; | ||||
import { Store } from '../../store/rootReducer'; | |||||
export const fetchOrganization = (key: string) => (dispatch: Dispatch<Store>) => { | |||||
export const fetchOrganization = (key: string) => (dispatch: Dispatch) => { | |||||
return Promise.all([api.getOrganization(key), api.getOrganizationNavigation(key)]).then( | return Promise.all([api.getOrganization(key), api.getOrganizationNavigation(key)]).then( | ||||
([organization, navigation]) => { | ([organization, navigation]) => { | ||||
if (organization) { | if (organization) { | ||||
); | ); | ||||
}; | }; | ||||
export const createOrganization = (organization: OrganizationBase) => ( | |||||
dispatch: Dispatch<Store> | |||||
) => { | |||||
export const createOrganization = (organization: OrganizationBase) => (dispatch: Dispatch<any>) => { | |||||
return api.createOrganization(organization).then((organization: Organization) => { | return api.createOrganization(organization).then((organization: Organization) => { | ||||
dispatch(actions.createOrganization(organization)); | dispatch(actions.createOrganization(organization)); | ||||
dispatch( | dispatch( | ||||
}; | }; | ||||
export const updateOrganization = (key: string, changes: OrganizationBase) => ( | export const updateOrganization = (key: string, changes: OrganizationBase) => ( | ||||
dispatch: Dispatch<Store> | |||||
dispatch: Dispatch<any> | |||||
) => { | ) => { | ||||
return api.updateOrganization(key, changes).then(() => { | return api.updateOrganization(key, changes).then(() => { | ||||
dispatch(actions.updateOrganization(key, changes)); | dispatch(actions.updateOrganization(key, changes)); | ||||
}); | }); | ||||
}; | }; | ||||
export const deleteOrganization = (key: string) => (dispatch: Dispatch<Store>) => { | |||||
export const deleteOrganization = (key: string) => (dispatch: Dispatch<any>) => { | |||||
return api.deleteOrganization(key).then(() => { | return api.deleteOrganization(key).then(() => { | ||||
dispatch(actions.deleteOrganization(key)); | dispatch(actions.deleteOrganization(key)); | ||||
dispatch(addGlobalSuccessMessage(translate('organization.deleted'))); | dispatch(addGlobalSuccessMessage(translate('organization.deleted'))); |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should show a info message for paying organization 1`] = ` | exports[`should show a info message for paying organization 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
} | } | ||||
modalHeader="organization.delete" | modalHeader="organization.delete" | ||||
onConfirm={[Function]} | onConfirm={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ConfirmButton> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`smoke test 1`] = ` | exports[`smoke test 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
} | } | ||||
modalHeader="organization.delete" | modalHeader="organization.delete" | ||||
onConfirm={[Function]} | onConfirm={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ConfirmButton> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
issues.max_new_code_period | issues.max_new_code_period | ||||
: | : | ||||
<React.Fragment> | |||||
<DateFromNow | |||||
date="2017-01-01T11:39:03+0100" | |||||
/> | |||||
<br /> | |||||
<span | |||||
className="note" | |||||
> | |||||
from | |||||
: | |||||
Foo | |||||
</span> | |||||
</React.Fragment> | |||||
<DateFromNow | |||||
date="2017-01-01T11:39:03+0100" | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
<br /> | |||||
<span | |||||
className="note" | |||||
> | |||||
from | |||||
: | |||||
Foo | |||||
</span> | |||||
</div> | </div> | ||||
</Tooltip> | </Tooltip> | ||||
`; | `; |
<br /> | <br /> | ||||
<DateFromNow | <DateFromNow | ||||
date={2013-09-21T22:00:00.000Z} | date={2013-09-21T22:00:00.000Z} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
</div> | </div> | ||||
</Tooltip> | </Tooltip> | ||||
`; | `; | ||||
<br /> | <br /> | ||||
<DateFromNow | <DateFromNow | ||||
date={2013-09-21T22:00:00.000Z} | date={2013-09-21T22:00:00.000Z} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
</div> | </div> | ||||
`; | `; | ||||
<br /> | <br /> | ||||
<DateFromNow | <DateFromNow | ||||
date={2013-09-21T22:00:00.000Z} | date={2013-09-21T22:00:00.000Z} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
</div> | </div> | ||||
`; | `; | ||||
<br /> | <br /> | ||||
<DateFromNow | <DateFromNow | ||||
date={2018-08-16T22:00:00.000Z} | date={2018-08-16T22:00:00.000Z} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
</div> | </div> | ||||
</Tooltip> | </Tooltip> | ||||
`; | `; | ||||
<br /> | <br /> | ||||
<DateFromNow | <DateFromNow | ||||
date={2013-09-21T22:00:00.000Z} | date={2013-09-21T22:00:00.000Z} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFromNow> | |||||
</div> | </div> | ||||
`; | `; |
<div | <div | ||||
className="overview-main page-main sonarcloud" | className="overview-main page-main sonarcloud" | ||||
> | > | ||||
<React.Fragment> | |||||
<AnalyzeTutorial | |||||
component={ | |||||
Object { | |||||
"analysisDate": "2016-01-01", | |||||
"breadcrumbs": Array [], | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
"organization": "org", | |||||
"qualifier": "TRK", | |||||
"version": "0.0.1", | |||||
} | |||||
<AnalyzeTutorial | |||||
component={ | |||||
Object { | |||||
"analysisDate": "2016-01-01", | |||||
"breadcrumbs": Array [], | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
"organization": "org", | |||||
"qualifier": "TRK", | |||||
"version": "0.0.1", | |||||
} | } | ||||
currentUser={ | |||||
Object { | |||||
"isLoggedIn": true, | |||||
"login": "luke", | |||||
"name": "Skywalker", | |||||
} | |||||
} | |||||
currentUser={ | |||||
Object { | |||||
"isLoggedIn": true, | |||||
"login": "luke", | |||||
"name": "Skywalker", | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
</div> | </div> | ||||
<div | <div | ||||
className="overview-sidebar page-sidebar-fixed" | className="overview-sidebar page-sidebar-fixed" | ||||
> | > | ||||
<div | <div | ||||
className="overview-main page-main sonarcloud" | className="overview-main page-main sonarcloud" | ||||
> | |||||
<React.Fragment /> | |||||
</div> | |||||
/> | |||||
<div | <div | ||||
className="overview-sidebar page-sidebar-fixed" | className="overview-sidebar page-sidebar-fixed" | ||||
> | > | ||||
<div | <div | ||||
className="overview-main page-main sonarcloud" | className="overview-main page-main sonarcloud" | ||||
> | > | ||||
<React.Fragment> | |||||
<WarningMessage | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "b", | |||||
"type": "LONG", | |||||
} | |||||
<WarningMessage | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "b", | |||||
"type": "LONG", | |||||
} | } | ||||
message="provisioning.no_analysis_on_main_branch" | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
message="provisioning.no_analysis_on_main_branch" | |||||
/> | |||||
</div> | </div> | ||||
<div | <div | ||||
className="overview-sidebar page-sidebar-fixed" | className="overview-sidebar page-sidebar-fixed" | ||||
<div | <div | ||||
className="overview-main page-main sonarcloud" | className="overview-main page-main sonarcloud" | ||||
> | > | ||||
<React.Fragment> | |||||
<WarningMessage | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "b", | |||||
"type": "LONG", | |||||
} | |||||
<WarningMessage | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "b", | |||||
"type": "LONG", | |||||
} | } | ||||
message="provisioning.no_analysis_on_main_branch.bad_configuration" | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
message="provisioning.no_analysis_on_main_branch.bad_configuration" | |||||
/> | |||||
</div> | </div> | ||||
<div | <div | ||||
className="overview-sidebar page-sidebar-fixed" | className="overview-sidebar page-sidebar-fixed" |
}); | }); | ||||
it('should disabled PermissionCell checkboxes when waiting for promise to return', async () => { | it('should disabled PermissionCell checkboxes when waiting for promise to return', async () => { | ||||
const wrapper = shallow(groupHolder); | |||||
const wrapper = shallow<GroupHolder>(groupHolder); | |||||
expect(wrapper.state().loading).toEqual([]); | expect(wrapper.state().loading).toEqual([]); | ||||
(wrapper.instance() as GroupHolder).handleCheck(true, 'baz'); | |||||
wrapper.instance().handleCheck(true, 'baz'); | |||||
wrapper.update(); | wrapper.update(); | ||||
expect(wrapper.state().loading).toEqual(['baz']); | expect(wrapper.state().loading).toEqual(['baz']); | ||||
(wrapper.instance() as GroupHolder).handleCheck(true, 'bar'); | |||||
wrapper.instance().handleCheck(true, 'bar'); | |||||
wrapper.update(); | wrapper.update(); | ||||
expect(wrapper.state().loading).toEqual(['baz', 'bar']); | expect(wrapper.state().loading).toEqual(['baz', 'bar']); | ||||
}); | }); | ||||
it('should disabled PermissionCell checkboxes when waiting for promise to return', async () => { | it('should disabled PermissionCell checkboxes when waiting for promise to return', async () => { | ||||
const wrapper = shallow(userHolder); | |||||
const wrapper = shallow<UserHolder>(userHolder); | |||||
expect(wrapper.state().loading).toEqual([]); | expect(wrapper.state().loading).toEqual([]); | ||||
(wrapper.instance() as UserHolder).handleCheck(true, 'baz'); | |||||
wrapper.instance().handleCheck(true, 'baz'); | |||||
wrapper.update(); | wrapper.update(); | ||||
expect(wrapper.state().loading).toEqual(['baz']); | expect(wrapper.state().loading).toEqual(['baz']); | ||||
(wrapper.instance() as UserHolder).handleCheck(true, 'bar'); | |||||
wrapper.instance().handleCheck(true, 'bar'); | |||||
wrapper.update(); | wrapper.update(); | ||||
expect(wrapper.state().loading).toEqual(['baz', 'bar']); | expect(wrapper.state().loading).toEqual(['baz', 'bar']); | ||||
} | } | ||||
selectedPermission="bar" | selectedPermission="bar" | ||||
/> | /> | ||||
<React.Fragment> | |||||
<tr> | |||||
<td | |||||
className="divider" | |||||
colSpan={20} | |||||
/> | |||||
</tr> | |||||
<tr /> | |||||
</React.Fragment> | |||||
<tr> | |||||
<td | |||||
className="divider" | |||||
colSpan={20} | |||||
/> | |||||
</tr> | |||||
<tr /> | |||||
<GroupHolder | <GroupHolder | ||||
group={ | group={ | ||||
Object { | Object { |
disableWidth={false} | disableWidth={false} | ||||
onResize={[Function]} | onResize={[Function]} | ||||
style={Object {}} | style={Object {}} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</AutoSizer> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
`; | `; |
onDelete: () => void = jest.fn(), | onDelete: () => void = jest.fn(), | ||||
onClose: () => void = jest.fn() | onClose: () => void = jest.fn() | ||||
) { | ) { | ||||
const wrapper = shallow( | |||||
const wrapper = shallow<DeleteBranchModal>( | |||||
<DeleteBranchModal | <DeleteBranchModal | ||||
branchLike={branchLike} | branchLike={branchLike} | ||||
component="foo" | component="foo" | ||||
onDelete={onDelete} | onDelete={onDelete} | ||||
/> | /> | ||||
); | ); | ||||
(wrapper.instance() as any).mounted = true; | |||||
wrapper.instance().mounted = true; | |||||
return wrapper; | return wrapper; | ||||
} | } | ||||
function shallowRender(onRename: () => void = jest.fn(), onClose: () => void = jest.fn()) { | function shallowRender(onRename: () => void = jest.fn(), onClose: () => void = jest.fn()) { | ||||
const branch: MainBranch = { isMain: true, name: 'master' }; | const branch: MainBranch = { isMain: true, name: 'master' }; | ||||
const wrapper = shallow( | |||||
const wrapper = shallow<RenameBranchModal>( | |||||
<RenameBranchModal branch={branch} component="foo" onClose={onClose} onRename={onRename} /> | <RenameBranchModal branch={branch} component="foo" onClose={onClose} onRename={onRename} /> | ||||
); | ); | ||||
(wrapper.instance() as any).mounted = true; | |||||
wrapper.instance().mounted = true; | |||||
return wrapper; | return wrapper; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
<React.Fragment> | |||||
<br /> | |||||
<FormattedMessage | |||||
defaultMessage="project_branches.page.life_time.admin" | |||||
id="project_branches.page.life_time.admin" | |||||
values={ | |||||
Object { | |||||
"settings": <Link | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
to="/admin/settings" | |||||
> | |||||
settings.page | |||||
</Link>, | |||||
} | |||||
<br /> | |||||
<FormattedMessage | |||||
defaultMessage="project_branches.page.life_time.admin" | |||||
id="project_branches.page.life_time.admin" | |||||
values={ | |||||
Object { | |||||
"settings": <Link | |||||
onlyActiveOnIndex={false} | |||||
style={Object {}} | |||||
to="/admin/settings" | |||||
> | |||||
settings.page | |||||
</Link>, | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
</p> | </p> | ||||
</header> | </header> | ||||
<div | <div | ||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> | ||||
<React.Fragment | |||||
key="branch-master" | |||||
> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "master", | |||||
} | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": true, | |||||
"name": "master", | |||||
} | } | ||||
component="foo" | |||||
isOrphan={false} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="pull-request-1234" | |||||
> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"base": "master", | |||||
"branch": "feature", | |||||
"key": "1234", | |||||
"title": "Feature PR", | |||||
} | |||||
} | |||||
component="foo" | |||||
isOrphan={false} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"base": "master", | |||||
"branch": "feature", | |||||
"key": "1234", | |||||
"title": "Feature PR", | |||||
} | } | ||||
component="foo" | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="branch-feature" | |||||
> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"mergeBranch": "master", | |||||
"name": "feature", | |||||
"type": "SHORT", | |||||
} | |||||
} | |||||
component="foo" | |||||
onChange={[MockFunction]} | |||||
/> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"mergeBranch": "master", | |||||
"name": "feature", | |||||
"type": "SHORT", | |||||
} | } | ||||
component="foo" | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="branch-branch-1.0" | |||||
> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "branch-1.0", | |||||
"type": "LONG", | |||||
} | |||||
} | |||||
component="foo" | |||||
onChange={[MockFunction]} | |||||
/> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"name": "branch-1.0", | |||||
"type": "LONG", | |||||
} | } | ||||
component="foo" | |||||
isOrphan={false} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</React.Fragment> | |||||
<React.Fragment | |||||
key="branch-feature" | |||||
> | |||||
<tr> | |||||
<td | |||||
colSpan={4} | |||||
} | |||||
component="foo" | |||||
isOrphan={false} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
<tr> | |||||
<td | |||||
colSpan={4} | |||||
> | |||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | > | ||||
<div | |||||
className="display-inline-block text-middle" | |||||
> | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | |||||
</td> | |||||
</tr> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "foobar", | |||||
"name": "feature", | |||||
"type": "SHORT", | |||||
} | |||||
branches.orphan_branches | |||||
</div> | |||||
<HelpTooltip | |||||
className="spacer-left" | |||||
overlay="branches.orphan_branches.tooltip" | |||||
/> | |||||
</td> | |||||
</tr> | |||||
<BranchRow | |||||
branchLike={ | |||||
Object { | |||||
"isMain": false, | |||||
"isOrphan": true, | |||||
"mergeBranch": "foobar", | |||||
"name": "feature", | |||||
"type": "SHORT", | |||||
} | } | ||||
component="foo" | |||||
isOrphan={true} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
component="foo" | |||||
isOrphan={true} | |||||
onChange={[MockFunction]} | |||||
/> | |||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</div> | </div> |
modalBody="project_deletion.delete_resource_confirmation.Foo" | modalBody="project_deletion.delete_resource_confirmation.Foo" | ||||
modalHeader="qualifier.delete.TRK" | modalHeader="qualifier.delete.TRK" | ||||
onConfirm={[Function]} | onConfirm={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ConfirmButton> | |||||
`; | `; | ||||
exports[`should render 2`] = ` | exports[`should render 2`] = ` |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render 1`] = ` | exports[`should render 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<header | <header | ||||
className="page-header" | className="page-header" | ||||
> | > | ||||
project_links.page.description | project_links.page.description | ||||
</div> | </div> | ||||
</header> | </header> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
modalBody="project_links.are_you_sure_to_delete_x_link.foo" | modalBody="project_links.are_you_sure_to_delete_x_link.foo" | ||||
modalHeader="project_links.delete_project_link" | modalHeader="project_links.delete_project_link" | ||||
onConfirm={[MockFunction]} | onConfirm={[MockFunction]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ConfirmButton> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
`; | `; |
import * as React from 'react'; | import * as React from 'react'; | ||||
import { shallow } from 'enzyme'; | import { shallow } from 'enzyme'; | ||||
import ProfileRow from '../ProfileRow'; | import ProfileRow from '../ProfileRow'; | ||||
import { doAsync } from '../../../helpers/testUtils'; | |||||
it('renders', () => { | it('renders', () => { | ||||
expect( | expect( | ||||
).toMatchSnapshot(); | ).toMatchSnapshot(); | ||||
}); | }); | ||||
it('changes profile', () => { | |||||
it('changes profile', async () => { | |||||
const onChangeProfile = jest.fn(() => Promise.resolve()); | const onChangeProfile = jest.fn(() => Promise.resolve()); | ||||
const wrapper = shallow( | |||||
const wrapper = shallow<ProfileRow>( | |||||
<ProfileRow | <ProfileRow | ||||
onChangeProfile={onChangeProfile} | onChangeProfile={onChangeProfile} | ||||
possibleProfiles={[randomProfile('bar'), randomProfile('baz')]} | possibleProfiles={[randomProfile('bar'), randomProfile('baz')]} | ||||
wrapper.find('Select').prop<Function>('onChange')({ value: 'baz' }); | wrapper.find('Select').prop<Function>('onChange')({ value: 'baz' }); | ||||
expect(onChangeProfile).toBeCalledWith('foo', 'baz'); | expect(onChangeProfile).toBeCalledWith('foo', 'baz'); | ||||
expect(wrapper.state().loading).toBeTruthy(); | expect(wrapper.state().loading).toBeTruthy(); | ||||
return doAsync().then(() => { | |||||
expect(wrapper.state().loading).toBeFalsy(); | |||||
}); | |||||
await new Promise(setImmediate); | |||||
expect(wrapper.state().loading).toBeFalsy(); | |||||
}); | }); | ||||
function randomProfile(key: string) { | function randomProfile(key: string) { |
const cardHeight = this.getCardHeight(); | const cardHeight = this.getCardHeight(); | ||||
return ( | return ( | ||||
<WindowScroller> | <WindowScroller> | ||||
{({ height, isScrolling, registerChild, onChildScroll, scrollTop }) => ( | |||||
{({ height, isScrolling, onChildScroll, scrollTop }) => ( | |||||
<AutoSizer disableHeight={true}> | <AutoSizer disableHeight={true}> | ||||
{({ width }) => ( | {({ width }) => ( | ||||
<div ref={registerChild as any}> | |||||
<div> | |||||
<List | <List | ||||
autoHeight={true} | autoHeight={true} | ||||
height={height} | height={height} |
/> | /> | ||||
<ScreenPositionHelper | <ScreenPositionHelper | ||||
className="layout-page-side-outer" | className="layout-page-side-outer" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ScreenPositionHelper> | |||||
<div | <div | ||||
className="layout-page-main" | className="layout-page-main" | ||||
> | > | ||||
/> | /> | ||||
<ScreenPositionHelper | <ScreenPositionHelper | ||||
className="layout-page-side-outer" | className="layout-page-side-outer" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ScreenPositionHelper> | |||||
<div | <div | ||||
className="layout-page-main" | className="layout-page-main" | ||||
> | > |
} | } | ||||
} | } | ||||
/> | /> | ||||
<React.Fragment> | |||||
<NewReliabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
<NewReliabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
<NewSecurityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
} | |||||
/> | |||||
<NewSecurityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
<NewMaintainabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
} | |||||
/> | |||||
<NewMaintainabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
<NewCoverageFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
} | |||||
/> | |||||
<NewCoverageFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
<NewDuplicationsFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
} | |||||
/> | |||||
<NewDuplicationsFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
<NewLinesFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | |||||
} | |||||
/> | |||||
<NewLinesFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"view": "leak", | |||||
} | } | ||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
<Connect(LanguagesFilter) | <Connect(LanguagesFilter) | ||||
onQueryChange={[MockFunction]} | onQueryChange={[MockFunction]} | ||||
query={ | query={ | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
<React.Fragment> | |||||
<ReliabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
<ReliabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | } | ||||
/> | |||||
<SecurityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
/> | |||||
<SecurityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | } | ||||
/> | |||||
<MaintainabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
/> | |||||
<MaintainabilityFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | } | ||||
/> | |||||
<CoverageFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
/> | |||||
<CoverageFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | } | ||||
/> | |||||
<DuplicationsFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
/> | |||||
<DuplicationsFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | } | ||||
/> | |||||
<SizeFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
value="3" | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
/> | |||||
<SizeFilter | |||||
onQueryChange={[MockFunction]} | |||||
query={ | |||||
Object { | |||||
"size": "3", | |||||
} | |||||
} | |||||
value="3" | |||||
/> | |||||
<Connect(LanguagesFilter) | <Connect(LanguagesFilter) | ||||
onQueryChange={[MockFunction]} | onQueryChange={[MockFunction]} | ||||
query={ | query={ |
</span> | </span> | ||||
<DateTimeFormatter | <DateTimeFormatter | ||||
date="2017-01-01" | date="2017-01-01" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateTimeFormatter> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div | <div |
> | > | ||||
<DateTimeFormatter | <DateTimeFormatter | ||||
date="2017-01-01" | date="2017-01-01" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateTimeFormatter> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div | <div |
scrollingResetTimeInterval={150} | scrollingResetTimeInterval={150} | ||||
serverHeight={0} | serverHeight={0} | ||||
serverWidth={0} | serverWidth={0} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</WindowScroller> | |||||
</div> | </div> | ||||
`; | `; | ||||
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Checkbox | <Checkbox | ||||
checked={false} | checked={false} | ||||
disabled={false} | disabled={false} | ||||
Awesome Project | Awesome Project | ||||
</span> | </span> | ||||
</Checkbox> | </Checkbox> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render disabled 1`] = ` | exports[`should render disabled 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Checkbox | <Checkbox | ||||
checked={true} | checked={true} | ||||
disabled={true} | disabled={true} | ||||
onboarding.create_project.already_imported | onboarding.create_project.already_imported | ||||
</Link> | </Link> | ||||
</span> | </span> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render selected 1`] = ` | exports[`should render selected 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Checkbox | <Checkbox | ||||
checked={true} | checked={true} | ||||
disabled={false} | disabled={false} | ||||
Awesome Project | Awesome Project | ||||
</span> | </span> | ||||
</Checkbox> | </Checkbox> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should display the list of repositories 1`] = ` | exports[`should display the list of repositories 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<p | <p | ||||
className="alert alert-info width-60 big-spacer-bottom" | className="alert alert-info width-60 big-spacer-bottom" | ||||
> | > | ||||
timeout={100} | timeout={100} | ||||
/> | /> | ||||
</form> | </form> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should display the provider app install button 1`] = ` | exports[`should display the provider app install button 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<p | <p | ||||
className="alert alert-info width-60 big-spacer-bottom" | className="alert alert-info width-60 big-spacer-bottom" | ||||
> | > | ||||
<DeferredSpinner | <DeferredSpinner | ||||
timeout={100} | timeout={100} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should display the provider app install button 2`] = ` | exports[`should display the provider app install button 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<p | <p | ||||
className="alert alert-info width-60 big-spacer-bottom" | className="alert alert-info width-60 big-spacer-bottom" | ||||
> | > | ||||
onboarding.create_project.install_app_x.button.Foo Provider | onboarding.create_project.install_app_x.button.Foo Provider | ||||
</IdentityProviderLink> | </IdentityProviderLink> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
timeout={100} | timeout={100} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render correctly 2`] = ` | exports[`should render correctly 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
onboarding.create_project.header | onboarding.create_project.header | ||||
</h1> | </h1> | ||||
</div> | </div> | ||||
<React.Fragment> | |||||
<ul | |||||
className="flex-tabs" | |||||
> | |||||
<li> | |||||
<a | |||||
className="js-auto selected" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.select_repositories | |||||
<span | |||||
className="rounded alert alert-small spacer-left display-inline-block alert-info" | |||||
> | |||||
beta | |||||
</span> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
className="js-manual" | |||||
href="#" | |||||
onClick={[Function]} | |||||
<ul | |||||
className="flex-tabs" | |||||
> | |||||
<li> | |||||
<a | |||||
className="js-auto selected" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.select_repositories | |||||
<span | |||||
className="rounded alert alert-small spacer-left display-inline-block alert-info" | |||||
> | > | ||||
onboarding.create_project.create_manually | |||||
</a> | |||||
</li> | |||||
</ul> | |||||
<AutoProjectCreate | |||||
identityProvider={ | |||||
Object { | |||||
"backgroundColor": "blue", | |||||
"iconPath": "icon/path", | |||||
"key": "github", | |||||
"name": "GitHub", | |||||
} | |||||
beta | |||||
</span> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
className="js-manual" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.create_manually | |||||
</a> | |||||
</li> | |||||
</ul> | |||||
<AutoProjectCreate | |||||
identityProvider={ | |||||
Object { | |||||
"backgroundColor": "blue", | |||||
"iconPath": "icon/path", | |||||
"key": "github", | |||||
"name": "GitHub", | |||||
} | } | ||||
onProjectCreate={[Function]} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
onProjectCreate={[Function]} | |||||
/> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render with Manual creation only 1`] = ` | exports[`should render with Manual creation only 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
onboarding.create_project.header | onboarding.create_project.header | ||||
</h1> | </h1> | ||||
</div> | </div> | ||||
<React.Fragment> | |||||
<Connect(ManualProjectCreate) | |||||
currentUser={ | |||||
Object { | |||||
"externalProvider": "microsoft", | |||||
"groups": Array [], | |||||
"isLoggedIn": true, | |||||
"login": "foo", | |||||
"name": "Foo", | |||||
"scmAccounts": Array [], | |||||
} | |||||
<Connect(ManualProjectCreate) | |||||
currentUser={ | |||||
Object { | |||||
"externalProvider": "microsoft", | |||||
"groups": Array [], | |||||
"isLoggedIn": true, | |||||
"login": "foo", | |||||
"name": "Foo", | |||||
"scmAccounts": Array [], | |||||
} | } | ||||
onProjectCreate={[Function]} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
onProjectCreate={[Function]} | |||||
/> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should switch tabs 1`] = ` | exports[`should switch tabs 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
onboarding.create_project.header | onboarding.create_project.header | ||||
</h1> | </h1> | ||||
</div> | </div> | ||||
<React.Fragment> | |||||
<ul | |||||
className="flex-tabs" | |||||
> | |||||
<li> | |||||
<a | |||||
className="js-auto selected" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.select_repositories | |||||
<span | |||||
className="rounded alert alert-small spacer-left display-inline-block alert-info" | |||||
> | |||||
beta | |||||
</span> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
className="js-manual" | |||||
href="#" | |||||
onClick={[Function]} | |||||
<ul | |||||
className="flex-tabs" | |||||
> | |||||
<li> | |||||
<a | |||||
className="js-auto selected" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.select_repositories | |||||
<span | |||||
className="rounded alert alert-small spacer-left display-inline-block alert-info" | |||||
> | > | ||||
onboarding.create_project.create_manually | |||||
</a> | |||||
</li> | |||||
</ul> | |||||
<AutoProjectCreate | |||||
identityProvider={ | |||||
Object { | |||||
"backgroundColor": "blue", | |||||
"iconPath": "icon/path", | |||||
"key": "github", | |||||
"name": "GitHub", | |||||
} | |||||
beta | |||||
</span> | |||||
</a> | |||||
</li> | |||||
<li> | |||||
<a | |||||
className="js-manual" | |||||
href="#" | |||||
onClick={[Function]} | |||||
> | |||||
onboarding.create_project.create_manually | |||||
</a> | |||||
</li> | |||||
</ul> | |||||
<AutoProjectCreate | |||||
identityProvider={ | |||||
Object { | |||||
"backgroundColor": "blue", | |||||
"iconPath": "icon/path", | |||||
"key": "github", | |||||
"name": "GitHub", | |||||
} | } | ||||
onProjectCreate={[Function]} | |||||
/> | |||||
</React.Fragment> | |||||
} | |||||
onProjectCreate={[Function]} | |||||
/> | |||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
`; | `; | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<form | <form | ||||
onSubmit={[Function]} | onSubmit={[Function]} | ||||
> | > | ||||
timeout={100} | timeout={100} | ||||
/> | /> | ||||
</form> | </form> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
`; | `; | ||||
exports[`restores access 1`] = ` | exports[`restores access 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown | <ActionsDropdown | ||||
onOpen={[Function]} | onOpen={[Function]} | ||||
> | > | ||||
projects_role.apply_template | projects_role.apply_template | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`restores access 2`] = ` | exports[`restores access 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown | <ActionsDropdown | ||||
onOpen={[Function]} | onOpen={[Function]} | ||||
> | > | ||||
projects_role.apply_template | projects_role.apply_template | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`restores access 3`] = ` | exports[`restores access 3`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown | <ActionsDropdown | ||||
onOpen={[Function]} | onOpen={[Function]} | ||||
> | > | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`renders with all permissions 1`] = ` | exports[`renders with all permissions 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown> | <ActionsDropdown> | ||||
<ActionsDropdownItem | <ActionsDropdownItem | ||||
id="quality-profile-activate-more-rules" | id="quality-profile-activate-more-rules" | ||||
delete | delete | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`renders with no permissions 1`] = ` | exports[`renders with no permissions 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown> | <ActionsDropdown> | ||||
<ActionsDropdownItem | <ActionsDropdownItem | ||||
download="foo.xml" | download="foo.xml" | ||||
compare | compare | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`renders with permission to edit only 1`] = ` | exports[`renders with permission to edit only 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown> | <ActionsDropdown> | ||||
<ActionsDropdownItem | <ActionsDropdownItem | ||||
id="quality-profile-activate-more-rules" | id="quality-profile-activate-more-rules" | ||||
rename | rename | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`disables save button on error 1`] = ` | exports[`disables save button on error 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="settings-definition-changes nowrap" | className="settings-definition-changes nowrap" | ||||
> | > | ||||
cancel | cancel | ||||
</Button> | </Button> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`displays cancel button when value changed and has error 1`] = ` | exports[`displays cancel button when value changed and has error 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="settings-definition-changes nowrap" | className="settings-definition-changes nowrap" | ||||
> | > | ||||
cancel | cancel | ||||
</Button> | </Button> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`displays cancel button when value changed and no error 1`] = ` | exports[`displays cancel button when value changed and no error 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="settings-definition-changes nowrap" | className="settings-definition-changes nowrap" | ||||
> | > | ||||
cancel | cancel | ||||
</Button> | </Button> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`displays default message when value is default 1`] = ` | exports[`displays default message when value is default 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="spacer-top note" | className="spacer-top note" | ||||
style={ | style={ | ||||
settings.default.no_value | settings.default.no_value | ||||
</span> | </span> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`displays reset button when empty and not default 1`] = ` | exports[`displays reset button when empty and not default 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="settings-definition-changes nowrap" | className="settings-definition-changes nowrap" | ||||
> | > | ||||
settings.default.no_value | settings.default.no_value | ||||
</span> | </span> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`displays save button when it can be saved 1`] = ` | exports[`displays save button when it can be saved 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="settings-definition-changes nowrap" | className="settings-definition-changes nowrap" | ||||
> | > | ||||
cancel | cancel | ||||
</Button> | </Button> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should support more than two nodes 1`] = ` | exports[`should support more than two nodes 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HealthCard | <HealthCard | ||||
biggerHealth={true} | biggerHealth={true} | ||||
health="RED" | health="RED" | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HealthCard | <HealthCard | ||||
biggerHealth={true} | biggerHealth={true} | ||||
health="RED" | health="RED" | ||||
} | } | ||||
} | } | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
<DateFormatter | <DateFormatter | ||||
date="2017-04-02" | date="2017-04-02" | ||||
long={true} | long={true} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFormatter> | |||||
<p | <p | ||||
className="little-spacer-top" | className="little-spacer-top" | ||||
> | > | ||||
<DateFormatter | <DateFormatter | ||||
date="2017-03-01" | date="2017-03-01" | ||||
long={true} | long={true} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFormatter> | |||||
<p | <p | ||||
className="little-spacer-top" | className="little-spacer-top" | ||||
> | > |
<DateFormatter | <DateFormatter | ||||
date="2017-03-01" | date="2017-03-01" | ||||
long={true} | long={true} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</DateFormatter> | |||||
<a | <a | ||||
className="spacer-left" | className="spacer-left" | ||||
href="changelogurl" | href="changelogurl" |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`renders correctly 1`] = ` | exports[`renders correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div | <div | ||||
className="page-header big-spacer-bottom" | className="page-header big-spacer-bottom" | ||||
> | > | ||||
</p> | </p> | ||||
</div> | </div> | ||||
<AnalyzeTutorialSuggestion /> | <AnalyzeTutorialSuggestion /> | ||||
<React.Fragment> | |||||
<TokenStep | |||||
currentUser={ | |||||
Object { | |||||
"groups": Array [], | |||||
"isLoggedIn": true, | |||||
"login": "luke", | |||||
"name": "Skywalker", | |||||
"scmAccounts": Array [], | |||||
} | |||||
<TokenStep | |||||
currentUser={ | |||||
Object { | |||||
"groups": Array [], | |||||
"isLoggedIn": true, | |||||
"login": "luke", | |||||
"name": "Skywalker", | |||||
"scmAccounts": Array [], | |||||
} | } | ||||
finished={false} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={true} | |||||
stepNumber={1} | |||||
/> | |||||
<ProjectAnalysisStep | |||||
component={ | |||||
Object { | |||||
"analysisDate": "2016-01-01", | |||||
"breadcrumbs": Array [], | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
"organization": "org", | |||||
"qualifier": "TRK", | |||||
"version": "0.0.1", | |||||
} | |||||
} | |||||
finished={false} | |||||
onContinue={[Function]} | |||||
onOpen={[Function]} | |||||
open={true} | |||||
stepNumber={1} | |||||
/> | |||||
<ProjectAnalysisStep | |||||
component={ | |||||
Object { | |||||
"analysisDate": "2016-01-01", | |||||
"breadcrumbs": Array [], | |||||
"key": "foo", | |||||
"name": "Foo", | |||||
"organization": "org", | |||||
"qualifier": "TRK", | |||||
"version": "0.0.1", | |||||
} | } | ||||
displayRowLayout={true} | |||||
open={false} | |||||
organization="org" | |||||
stepNumber={2} | |||||
/> | |||||
</React.Fragment> | |||||
</React.Fragment> | |||||
} | |||||
displayRowLayout={true} | |||||
open={false} | |||||
organization="org" | |||||
stepNumber={2} | |||||
/> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`selects c# 1`] = ` | exports[`selects c# 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
onDelete={[Function]} | onDelete={[Function]} | ||||
onDone={[Function]} | onDone={[Function]} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects c-family 1`] = ` | exports[`selects c-family 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value={null} | value={null} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects c-family 2`] = ` | exports[`selects c-family 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
onDelete={[Function]} | onDelete={[Function]} | ||||
onDone={[Function]} | onDone={[Function]} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects c-family 3`] = ` | exports[`selects c-family 3`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value={null} | value={null} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects c-family 4`] = ` | exports[`selects c-family 4`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
onDone={[Function]} | onDone={[Function]} | ||||
projectKey="project-foo" | projectKey="project-foo" | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects java 1`] = ` | exports[`selects java 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value={null} | value={null} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects java 2`] = ` | exports[`selects java 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value="maven" | value="maven" | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects java 3`] = ` | exports[`selects java 3`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value="gradle" | value="gradle" | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects other 1`] = ` | exports[`selects other 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
value={null} | value={null} | ||||
/> | /> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`selects other 2`] = ` | exports[`selects other 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<div> | <div> | ||||
<h4 | <h4 | ||||
className="spacer-bottom" | className="spacer-bottom" | ||||
onDelete={[Function]} | onDelete={[Function]} | ||||
onDone={[Function]} | onDone={[Function]} | ||||
/> | /> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
snippet="build-wrapper-win-x86-64.exe --out-dir bw-output make clean all" | snippet="build-wrapper-win-x86-64.exe --out-dir bw-output make clean all" | ||||
/> | /> | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
snippet="build-wrapper-linux-x86-64 --out-dir bw-output make clean all" | snippet="build-wrapper-linux-x86-64 --out-dir bw-output make clean all" | ||||
/> | /> | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet="build-wrapper-linux-x86-64 --out-dir bw-output make clean all" | snippet="build-wrapper-linux-x86-64 --out-dir bw-output make clean all" |
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.msbuild.execute.text" | message="onboarding.analysis.msbuild.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet={ | snippet={ | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.msbuild.execute.text" | message="onboarding.analysis.msbuild.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet={ | snippet={ |
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.java.gradle.text.1" | message="onboarding.analysis.java.gradle.text.1" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
snippet="plugins { | snippet="plugins { | ||||
id \\"org.sonarqube\\" version \\"2.6\\" | id \\"org.sonarqube\\" version \\"2.6\\" | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.java.gradle.text.1" | message="onboarding.analysis.java.gradle.text.1" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
snippet="plugins { | snippet="plugins { | ||||
id \\"org.sonarqube\\" version \\"2.6\\" | id \\"org.sonarqube\\" version \\"2.6\\" | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.java.gradle.text.1" | message="onboarding.analysis.java.gradle.text.1" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
snippet="plugins { | snippet="plugins { | ||||
id \\"org.sonarqube\\" version \\"2.6\\" | id \\"org.sonarqube\\" version \\"2.6\\" |
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.msbuild.execute.text" | message="onboarding.analysis.msbuild.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet={ | snippet={ | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.msbuild.execute.text" | message="onboarding.analysis.msbuild.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet={ | snippet={ |
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={true} | isOneLine={true} | ||||
snippet={ | snippet={ | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={false} | isOneLine={false} | ||||
snippet={ | snippet={ | ||||
</h4> | </h4> | ||||
<InstanceMessage | <InstanceMessage | ||||
message="onboarding.analysis.sq_scanner.execute.text" | message="onboarding.analysis.sq_scanner.execute.text" | ||||
/> | |||||
> | |||||
<Component /> | |||||
</InstanceMessage> | |||||
<CodeSnippet | <CodeSnippet | ||||
isOneLine={false} | isOneLine={false} | ||||
snippet={ | snippet={ |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`guides for on-premise 1`] = ` | exports[`guides for on-premise 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
tutorials.find_tutorial_back_in_help | tutorials.find_tutorial_back_in_help | ||||
</span> | </span> | ||||
</footer> | </footer> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`guides for on-premise 2`] = ` | exports[`guides for on-premise 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
tutorials.find_tutorial_back_in_help | tutorials.find_tutorial_back_in_help | ||||
</span> | </span> | ||||
</footer> | </footer> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`guides for sonarcloud 1`] = ` | exports[`guides for sonarcloud 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
tutorials.find_tutorial_back_in_plus | tutorials.find_tutorial_back_in_plus | ||||
</span> | </span> | ||||
</footer> | </footer> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`guides for sonarcloud 2`] = ` | exports[`guides for sonarcloud 2`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
tutorials.find_tutorial_back_in_plus | tutorials.find_tutorial_back_in_plus | ||||
</span> | </span> | ||||
</footer> | </footer> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`guides for sonarcloud 3`] = ` | exports[`guides for sonarcloud 3`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<HelmetWrapper | <HelmetWrapper | ||||
defer={true} | defer={true} | ||||
encodeSpecialCharacters={true} | encodeSpecialCharacters={true} | ||||
tutorials.find_tutorial_back_in_plus | tutorials.find_tutorial_back_in_plus | ||||
</span> | </span> | ||||
</footer> | </footer> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown> | <ActionsDropdown> | ||||
<ActionsDropdownItem | <ActionsDropdownItem | ||||
className="js-user-update" | className="js-user-update" | ||||
users.deactivate | users.deactivate | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should be in loading status 1`] = ` | exports[`should be in loading status 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="webhooks" | suggestions="webhooks" | ||||
/> | /> | ||||
/> | /> | ||||
</PageHeader> | </PageHeader> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should fetch webhooks and display them 1`] = ` | exports[`should fetch webhooks and display them 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<Suggestions | <Suggestions | ||||
suggestions="webhooks" | suggestions="webhooks" | ||||
/> | /> | ||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |
onClose={[MockFunction]} | onClose={[MockFunction]} | ||||
onSubmit={[MockFunction]} | onSubmit={[MockFunction]} | ||||
validate={[Function]} | validate={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ValidationModal> | |||||
`; | `; | ||||
exports[`should render correctly when updating a webhook 1`] = ` | exports[`should render correctly when updating a webhook 1`] = ` | ||||
onClose={[MockFunction]} | onClose={[MockFunction]} | ||||
onSubmit={[MockFunction]} | onSubmit={[MockFunction]} | ||||
validate={[Function]} | validate={[Function]} | ||||
/> | |||||
> | |||||
<Component /> | |||||
</ValidationModal> | |||||
`; | `; |
<div | <div | ||||
className="page-actions" | className="page-actions" | ||||
> | > | ||||
<React.Fragment> | |||||
<Button | |||||
className="js-webhook-create" | |||||
onClick={[Function]} | |||||
> | |||||
create | |||||
</Button> | |||||
</React.Fragment> | |||||
<Button | |||||
className="js-webhook-create" | |||||
onClick={[Function]} | |||||
> | |||||
create | |||||
</Button> | |||||
</div> | </div> | ||||
`; | `; |
// Jest Snapshot v1, https://goo.gl/fbAQLP | // Jest Snapshot v1, https://goo.gl/fbAQLP | ||||
exports[`should display the deliveries form 1`] = ` | exports[`should display the deliveries form 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown | <ActionsDropdown | ||||
className="big-spacer-left" | className="big-spacer-left" | ||||
> | > | ||||
delete | delete | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; | ||||
exports[`should render correctly 1`] = ` | exports[`should render correctly 1`] = ` | ||||
<React.Fragment> | |||||
<Fragment> | |||||
<ActionsDropdown | <ActionsDropdown | ||||
className="big-spacer-left" | className="big-spacer-left" | ||||
> | > | ||||
delete | delete | ||||
</ActionsDropdownItem> | </ActionsDropdownItem> | ||||
</ActionsDropdown> | </ActionsDropdown> | ||||
</React.Fragment> | |||||
</Fragment> | |||||
`; | `; |