Skip to content

Commit

Permalink
Merge pull request #604 from Amsterdam/release-3-2-2020
Browse files Browse the repository at this point in the history
Release/2020-02-03
  • Loading branch information
jasperswart authored Feb 3, 2020
2 parents 5760bef + 5975219 commit f1fef1a
Show file tree
Hide file tree
Showing 13 changed files with 2,762 additions and 1,583 deletions.
3,787 changes: 2,289 additions & 1,498 deletions package-lock.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"not Explorer < 11"
],
"dependencies": {
"@babel/polyfill": "^7.7.0",
"@datapunt/asc-assets": "^0.17.7",
"@datapunt/asc-core": "^0.17.7",
"@datapunt/asc-ui": "^0.17.7",
"@babel/polyfill": "^7.8.3",
"@datapunt/asc-assets": "^0.18.1",
"@datapunt/asc-core": "^0.18.1",
"@datapunt/asc-ui": "^0.18.1",
"@datapunt/leaflet-geojson-bbox-layer": "0.1.1",
"@datapunt/matomo-tracker-js": "0.0.15",
"@sentry/browser": "^5.9.0",
Expand Down Expand Up @@ -94,7 +94,7 @@
"proj4": "^2.4.4",
"react": "^16.12.0",
"react-albus": "^2.0.0",
"react-app-polyfill": "^1.0.4",
"react-app-polyfill": "^1.0.5",
"react-datepicker": "^1.5.0",
"react-dom": "^16.12.0",
"react-intl": "2.3.0",
Expand All @@ -112,17 +112,17 @@
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-transform-async-to-generator": "^7.7.4",
"@babel/plugin-transform-modules-commonjs": "^7.7.5",
"@babel/plugin-transform-react-constant-elements": "^7.7.4",
"@babel/plugin-transform-react-inline-elements": "^7.7.4",
"@babel/preset-env": "^7.7.6",
"@babel/preset-react": "^7.7.4",
"@babel/register": "^7.7.4",
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
"@babel/plugin-transform-react-constant-elements": "^7.8.3",
"@babel/plugin-transform-react-inline-elements": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"@babel/register": "^7.8.3",
"@redux-saga/is": "^1.1.2",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
Expand All @@ -134,17 +134,17 @@
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"babel-plugin-dynamic-import-node": "^2.2.0",
"babel-plugin-inline-react-svg": "^1.1.0",
"babel-plugin-inline-react-svg": "^1.1.1",
"babel-plugin-react-intl": "^4.1.20",
"babel-plugin-styled-components": "^1.10.6",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"chalk": "^3.0.0",
"circular-dependency-plugin": "^5.2.0",
"compression-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.0.5",
"compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.4.1",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"css-loader": "^3.4.2",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"enzyme-to-json": "^3.4.3",
Expand All @@ -162,7 +162,7 @@
"eventsource-polyfill": "0.9.6",
"exports-loader": "^0.7.0",
"express": "^4.17.1",
"file-loader": "^4.2.0",
"file-loader": "^5.0.2",
"formdata-polyfill": "^3.0.19",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
Expand All @@ -179,7 +179,7 @@
"lint-staged": "^9.5.0",
"lodash.clonedeep": "^4.5.0",
"match-media-mock": "^0.1.1",
"mini-css-extract-plugin": "^0.8.0",
"mini-css-extract-plugin": "^0.9.0",
"minimist": "^1.2.0",
"node-plop": "^0.23.0",
"node-sass": "^4.12.0",
Expand All @@ -195,15 +195,15 @@
"redux-saga-test-plan": "^4.0.0-rc.3",
"regenerator-runtime": "^0.13.3",
"rimraf": "^3.0.0",
"sass-loader": "^8.0.0",
"sass-loader": "^8.0.2",
"shelljs": "^0.8.3",
"style-loader": "^1.0.0",
"svg-url-loader": "^3.0.2",
"terser-webpack-plugin": "^2.2.1",
"url-loader": "^2.2.0",
"style-loader": "^1.1.3",
"svg-url-loader": "^3.0.3",
"terser-webpack-plugin": "^2.3.2",
"url-loader": "^3.0.0",
"url-polyfill": "^1.1.7",
"uuid": "^3.3.3",
"webpack": "^4.41.2",
"webpack": "^4.41.5",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10",
"webpack-dev-middleware": "^3.7.2",
Expand Down
8 changes: 7 additions & 1 deletion src/components/BackLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ BackLink.propTypes = {
/** @ignore */
className: PropTypes.string,
/** Route indicator */
to: PropTypes.string.isRequired,
to: PropTypes.oneOfType([
PropTypes.string,
PropTypes.shape({
pathname: PropTypes.string,
state: PropTypes.shape({}),
}),
]).isRequired,
};

export default BackLink;
6 changes: 5 additions & 1 deletion src/components/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const StyledTH = styled.th`
text-align: left;
`;

const StyledTD = styled.td`
cursor: pointer;
`;
Expand Down Expand Up @@ -30,7 +34,7 @@ const List = ({
<thead>
<tr>
{colHeaders.map(colHeader => (
<th key={colHeader}>{colHeader}</th>
<StyledTH key={colHeader}>{colHeader}</StyledTH>
))}
</tr>
</thead>
Expand Down
8 changes: 5 additions & 3 deletions src/components/SiteHeader/__tests__/SiteHeader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,20 @@ describe('components/SiteHeader', () => {
});

it('should render correctly when logged in', () => {
jest.spyOn(auth, 'isAuthenticated').mockImplementation(() => true);

const { container, queryByText } = render(
withAppContext(<SiteHeader location={{ pathname: '/' }} />)
);

// afhandelen menu item
expect(queryByText('Afhandelen')).toBeTruthy();
expect(queryByText('Afhandelen')).toBeInTheDocument();

// search field
expect(container.querySelector('input[type="text"]')).toBeTruthy();
expect(container.querySelector('input')).toBeInTheDocument();

// log out button
expect(queryByText('Uitloggen')).toBeTruthy();
expect(queryByText('Uitloggen')).toBeInTheDocument();
});

it('should handle logout callback', () => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/SiteHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ const StyledSearchBar = styled(SearchBar)`
`;

const HeaderWrapper = styled.div`
z-index: 1;
${({ tall }) =>
!tall &&
css`
Expand Down Expand Up @@ -191,7 +193,7 @@ const MenuItems = ({ onLogOut, showItems }) => {

{showItems.settings &&
(showItems.users || showItems.groups || showItems.departments) && (
<StyledMenuFlyout label="Instellingen">
<StyledMenuFlyout label="Instellingen" $as="span">
{showItems.users && (
<StyledMenuButton $as={NavLink} to="/instellingen/gebruikers">
Gebruikers
Expand Down Expand Up @@ -270,7 +272,6 @@ export const SiteHeader = props => {
<Fragment>
<HeaderWrapper
isFrontOffice={isFrontOffice}
title={title}
tall={tall}
className={`siteHeader ${tall ? 'isTall' : 'isShort'}`}
data-testid="siteHeader"
Expand Down
2 changes: 1 addition & 1 deletion src/signals/incident/services/map-paths/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const mapPaths = (params, incident, wizard) => {
...(mapMerge[meta.pathMerge] || []),
{
id: name,
label: meta.labelShort || meta.label,
label: meta.labelShort || meta.label || '',
category_url,
answer,
},
Expand Down
3 changes: 1 addition & 2 deletions src/signals/incident/services/map-paths/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ describe('The map paths service', () => {
},
value_0: {
meta: {
label: 'Waarde nul',
pathMerge: 'extra_properties',
isVisible: true,
},
Expand Down Expand Up @@ -117,7 +116,7 @@ describe('The map paths service', () => {
},
{
id: 'value_0',
label: 'Waarde nul',
label: '',
answer: 0,
category_url,
},
Expand Down
Loading

0 comments on commit f1fef1a

Please sign in to comment.