Skip to content

Commit

Permalink
Merge pull request #1923 from HSLdevcom/disable-citybike
Browse files Browse the repository at this point in the history
disabling citybikes
  • Loading branch information
vesameskanen authored Nov 1, 2017
2 parents aa18066 + ad93084 commit f84494c
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/component/IndexPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class IndexPage extends React.Component {
componentDidMount() {
const search = this.context.location.search;

if (search && search.indexOf('citybikes') >= -1) {
if (search && search.indexOf('citybikes') > -1) {
console.warn('Enabling citybikes');
this.context.config.transportModes.citybike.defaultValue = true;
}

Expand Down
2 changes: 2 additions & 0 deletions app/component/ModeFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class ModeFilter extends React.Component {
config: PropTypes.object.isRequired,
};

// TODO use props instead of config so that visual tests do not break every
// time modes are updated...
availableModes = () =>
Object.keys(this.context.config.transportModes).filter(
mode => this.context.config.transportModes[mode].availableForSelection,
Expand Down
6 changes: 4 additions & 2 deletions app/configurations/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ export default {
locationAware: true,
},

// TODO: Switch back in april
cityBike: {
showCityBikes: true,
showCityBikes: false,

useUrl: {
fi: 'https://www.hsl.fi/citybike',
Expand Down Expand Up @@ -283,8 +284,9 @@ export default {
defaultValue: true,
},

// TODO: Switch back in april
citybike: {
availableForSelection: true,
availableForSelection: false,
defaultValue: false,
},

Expand Down
4 changes: 2 additions & 2 deletions test/flow/page_object/customizeSearch.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const async = require('async');

// TODO: add citybikes back in april
const modalities = [
'bus',
'tram',
'rail',
'subway',
'ferry',
'citybike',
'airplane',
/* 'citybike', */ 'airplane',
];

function clickCanvasToggle() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual-images/ModeFilter_grey-buttons/grey-buttons/edge13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual-images/ModeFilter_grey-buttons/grey-buttons/ie11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/visual-images/ModeFilter_white-buttons/white-buttons/ie11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f84494c

Please sign in to comment.