From e015a7d98b424acecba79e175d43bff0337326f6 Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Thu, 13 Dec 2018 10:46:00 -0500 Subject: [PATCH 001/109] chore: remove unnecessary css file from the build output --- config/webpack.config.prod.js | 1 - 1 file changed, 1 deletion(-) diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index f73fb68543..03be76b777 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -243,7 +243,6 @@ module.exports = { ], }, plugins: [ - new ExtractTextPlugin('style.css'), // Makes some environment variables available in index.html. // The public URL is available as %PUBLIC_URL% in index.html, e.g.: // From 5c4946bc206760dc67a20749b4641bfbfc03a4d5 Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Fri, 14 Dec 2018 08:31:48 -0500 Subject: [PATCH 002/109] chore: update docs regarding apache compression config --- deploy/DEPLOY.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/DEPLOY.md b/deploy/DEPLOY.md index 998ca1dfff..1d1f874047 100644 --- a/deploy/DEPLOY.md +++ b/deploy/DEPLOY.md @@ -54,6 +54,14 @@ Add a `VirtualHost` entry in `/etc/httpd/conf/httpd.conf`. The web application u ``` +It is recommended to add the following to `/etc/httpd/conf/httpd.conf` to enable the compression of files served by Apache + +```http + + SetOutputFilter DEFLATE + +``` + ## Clone repository Use `git` to clone the web app repository From 03ad41db3709e0f227aa7aa90e64b6c2970d4642 Mon Sep 17 00:00:00 2001 From: Mike Joyce Date: Fri, 14 Dec 2018 11:24:32 -0500 Subject: [PATCH 003/109] Update bid list due date to match site-wide format --- .../BidList/BidListHeader/BidListHeader.jsx | 15 +++++++++++++-- .../__snapshots__/BidListHeader.test.jsx.snap | 2 +- .../BidList/__snapshots__/BidList.test.jsx.snap | 8 ++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Components/ProfileDashboard/BidList/BidListHeader/BidListHeader.jsx b/src/Components/ProfileDashboard/BidList/BidListHeader/BidListHeader.jsx index d1ad3b6485..6a186a5e1e 100644 --- a/src/Components/ProfileDashboard/BidList/BidListHeader/BidListHeader.jsx +++ b/src/Components/ProfileDashboard/BidList/BidListHeader/BidListHeader.jsx @@ -1,11 +1,14 @@ import React from 'react'; +import PropTypes from 'prop-types'; import FontAwesome from 'react-fontawesome'; +import dateFns from 'date-fns'; +import { formatDate } from '../../../../utilities'; // Due date is static for now -const BidListHeader = () => ( +const BidListHeader = ({ date }) => (
- All bids are due 7.15.18 + {` All bids are due ${formatDate(date)}`}
@@ -13,4 +16,12 @@ const BidListHeader = () => (
); +BidListHeader.propTypes = { + date: PropTypes.string, +}; + +BidListHeader.defaultProps = { + date: dateFns.format('07/15/2019', 'MM/DD/YYYY'), +}; + export default BidListHeader; diff --git a/src/Components/ProfileDashboard/BidList/BidListHeader/__snapshots__/BidListHeader.test.jsx.snap b/src/Components/ProfileDashboard/BidList/BidListHeader/__snapshots__/BidListHeader.test.jsx.snap index b365da217d..0cd0adaf8a 100644 --- a/src/Components/ProfileDashboard/BidList/BidListHeader/__snapshots__/BidListHeader.test.jsx.snap +++ b/src/Components/ProfileDashboard/BidList/BidListHeader/__snapshots__/BidListHeader.test.jsx.snap @@ -10,7 +10,7 @@ exports[`BidListHeaderComponent matches snapshot 1`] = ` - All bids are due 7.15.18 + All bids are due 07/15/2019
- +
- +
Date: Mon, 17 Dec 2018 09:41:02 -0500 Subject: [PATCH 004/109] Use position id instead of position_number to query for position details --- .../BidListResultsCard/BidContent/BidContent.jsx | 5 +++-- .../BidListResultsCard/BidContent/BidContent.test.jsx | 2 ++ .../BidContent/__snapshots__/BidContent.test.jsx.snap | 2 +- src/Components/BidListResultsCard/BidListResultsCard.jsx | 1 + .../__snapshots__/BidListResultsCard.test.jsx.snap | 1 + .../BidTrackerCardTitle/BidTrackerCardTitle.jsx | 2 +- .../BidTrackerCardTitle/BidTrackerCardTitle.test.jsx | 2 +- .../__snapshots__/BidTrackerCardTitle.test.jsx.snap | 4 ++-- .../BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx | 2 +- .../__snapshots__/BidTrackerCardTop.test.jsx.snap | 2 +- src/Components/CompareList/CompareList.jsx | 2 +- .../CompareList/__snapshots__/CompareList.test.jsx.snap | 8 ++++---- .../FavoritesListResultsCard/FavoritesListResultsCard.jsx | 2 +- .../__snapshots__/FavoritesListResultsCard.test.jsx.snap | 2 +- src/Components/ResultsCard/ResultsCard.jsx | 2 +- .../ResultsCondensedCardTop/ResultsCondensedCardTop.jsx | 2 +- .../__snapshots__/ResultsCondensedCardTop.test.jsx.snap | 4 ++-- src/actions/positionDetails.js | 6 +++--- 18 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/Components/BidListResultsCard/BidContent/BidContent.jsx b/src/Components/BidListResultsCard/BidContent/BidContent.jsx index f43ae12cdf..6eeba1f62b 100644 --- a/src/Components/BidListResultsCard/BidContent/BidContent.jsx +++ b/src/Components/BidListResultsCard/BidContent/BidContent.jsx @@ -5,7 +5,7 @@ import BidStatus from '../BidStatus'; import BidCount from '../../BidCount'; import { BID_STATISTICS_OBJECT } from '../../../Constants/PropTypes'; -const BidContent = ({ status, positionNumber, postName, positionTitle, bidStatistics }) => ( +const BidContent = ({ id, status, positionNumber, postName, positionTitle, bidStatistics }) => (
@@ -13,7 +13,7 @@ const BidContent = ({ status, positionNumber, postName, positionTitle, bidStatis
Position number - + {positionNumber}
@@ -25,6 +25,7 @@ const BidContent = ({ status, positionNumber, postName, positionTitle, bidStatis ); BidContent.propTypes = { + id: PropTypes.number.isRequired, status: PropTypes.string.isRequired, positionNumber: PropTypes.string.isRequired, postName: PropTypes.string.isRequired, diff --git a/src/Components/BidListResultsCard/BidContent/BidContent.test.jsx b/src/Components/BidListResultsCard/BidContent/BidContent.test.jsx index 87d5e94dd7..77b11233f6 100644 --- a/src/Components/BidListResultsCard/BidContent/BidContent.test.jsx +++ b/src/Components/BidListResultsCard/BidContent/BidContent.test.jsx @@ -9,6 +9,7 @@ describe('BidContentComponent', () => { it('is defined', () => { const wrapper = shallow( { it('matches snapshot', () => { const wrapper = shallow( 055A45 diff --git a/src/Components/BidListResultsCard/BidListResultsCard.jsx b/src/Components/BidListResultsCard/BidListResultsCard.jsx index c05885a6df..e1e632f920 100644 --- a/src/Components/BidListResultsCard/BidListResultsCard.jsx +++ b/src/Components/BidListResultsCard/BidListResultsCard.jsx @@ -38,6 +38,7 @@ class BidListResultsCard extends Component { content={
( BidTrackerCardTitle.propTypes = { title: PropTypes.string.isRequired, - id: PropTypes.string.isRequired, + id: PropTypes.number.isRequired, status: PropTypes.string.isRequired, bidStatistics: BID_STATISTICS_OBJECT.isRequired, post: POST_DETAILS.isRequired, diff --git a/src/Components/BidTracker/BidTrackerCardTitle/BidTrackerCardTitle.test.jsx b/src/Components/BidTracker/BidTrackerCardTitle/BidTrackerCardTitle.test.jsx index 0d25d5c0a7..f99f44c5bd 100644 --- a/src/Components/BidTracker/BidTrackerCardTitle/BidTrackerCardTitle.test.jsx +++ b/src/Components/BidTracker/BidTrackerCardTitle/BidTrackerCardTitle.test.jsx @@ -8,7 +8,7 @@ import postObject from '../../../__mocks__/postObject'; const props = { title: 'Title', - id: 'a123', + id: 100, status: DRAFT_PROP, bidStatistics, post: postObject, diff --git a/src/Components/BidTracker/BidTrackerCardTitle/__snapshots__/BidTrackerCardTitle.test.jsx.snap b/src/Components/BidTracker/BidTrackerCardTitle/__snapshots__/BidTrackerCardTitle.test.jsx.snap index 7056dbda61..26bc860734 100644 --- a/src/Components/BidTracker/BidTrackerCardTitle/__snapshots__/BidTrackerCardTitle.test.jsx.snap +++ b/src/Components/BidTracker/BidTrackerCardTitle/__snapshots__/BidTrackerCardTitle.test.jsx.snap @@ -17,7 +17,7 @@ exports[`BidTrackerCardTitleComponent matches snapshot when status is "submitted > View position @@ -83,7 +83,7 @@ exports[`BidTrackerCardTitleComponent matches snapshot when status is not "submi > View position diff --git a/src/Components/BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx b/src/Components/BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx index 4ed84cb295..de78795dbb 100644 --- a/src/Components/BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx +++ b/src/Components/BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx @@ -16,7 +16,7 @@ const BidTrackerCardTop = ({ bid, showQuestion }) => {
{
{c.title}
- View position + View position
diff --git a/src/Components/CompareList/__snapshots__/CompareList.test.jsx.snap b/src/Components/CompareList/__snapshots__/CompareList.test.jsx.snap index 8f113935eb..7c30509f0d 100644 --- a/src/Components/CompareList/__snapshots__/CompareList.test.jsx.snap +++ b/src/Components/CompareList/__snapshots__/CompareList.test.jsx.snap @@ -42,7 +42,7 @@ exports[`CompareListComponent matches snapshot 1`] = ` > View position @@ -62,7 +62,7 @@ exports[`CompareListComponent matches snapshot 1`] = ` > View position @@ -301,7 +301,7 @@ exports[`CompareListComponent matches snapshot when there is an obc id 1`] = ` > View position @@ -321,7 +321,7 @@ exports[`CompareListComponent matches snapshot when there is an obc id 1`] = ` > View position diff --git a/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/FavoritesListResultsCard.jsx b/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/FavoritesListResultsCard.jsx index 6d107500e7..e4a3f56f4c 100644 --- a/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/FavoritesListResultsCard.jsx +++ b/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/FavoritesListResultsCard.jsx @@ -16,7 +16,7 @@ const FavoritesListResultsCard = ({ position }) => ( />
- View Position + View Position
diff --git a/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/__snapshots__/FavoritesListResultsCard.test.jsx.snap b/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/__snapshots__/FavoritesListResultsCard.test.jsx.snap index 56a8bf21e3..073039b50d 100644 --- a/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/__snapshots__/FavoritesListResultsCard.test.jsx.snap +++ b/src/Components/ProfileDashboard/Favorites/FavoritesListResultsCard/__snapshots__/FavoritesListResultsCard.test.jsx.snap @@ -106,7 +106,7 @@ exports[`FavoritesListResultsCardComponent matches snapshot 1`] = ` View Position diff --git a/src/Components/ResultsCard/ResultsCard.jsx b/src/Components/ResultsCard/ResultsCard.jsx index a85befa593..400c9bb757 100644 --- a/src/Components/ResultsCard/ResultsCard.jsx +++ b/src/Components/ResultsCard/ResultsCard.jsx @@ -120,7 +120,7 @@ const ResultsCard = (props) => {

{title}

- View position + View position
diff --git a/src/Components/ResultsCondensedCardTop/ResultsCondensedCardTop.jsx b/src/Components/ResultsCondensedCardTop/ResultsCondensedCardTop.jsx index a12f3f4c97..ba22a02a72 100644 --- a/src/Components/ResultsCondensedCardTop/ResultsCondensedCardTop.jsx +++ b/src/Components/ResultsCondensedCardTop/ResultsCondensedCardTop.jsx @@ -30,7 +30,7 @@ const ResultsCondensedCardTop = ({ position, type }) => {
- View position + View position
); diff --git a/src/Components/ResultsCondensedCardTop/__snapshots__/ResultsCondensedCardTop.test.jsx.snap b/src/Components/ResultsCondensedCardTop/__snapshots__/ResultsCondensedCardTop.test.jsx.snap index 1abfb44ee1..14f67ae3b2 100644 --- a/src/Components/ResultsCondensedCardTop/__snapshots__/ResultsCondensedCardTop.test.jsx.snap +++ b/src/Components/ResultsCondensedCardTop/__snapshots__/ResultsCondensedCardTop.test.jsx.snap @@ -31,7 +31,7 @@ exports[`ResultsCondensedCardTopComponent matches snapshot 1`] = ` > View position @@ -76,7 +76,7 @@ exports[`ResultsCondensedCardTopComponent matches snapshot when type is serviceN > View position diff --git a/src/actions/positionDetails.js b/src/actions/positionDetails.js index 3a8df30bca..14e3df30b0 100644 --- a/src/actions/positionDetails.js +++ b/src/actions/positionDetails.js @@ -28,11 +28,11 @@ export function positionDetailsPatchState(positionDetails) { }; } -export function positionDetailsFetchData(query) { +export function positionDetailsFetchData(id) { return (dispatch) => { dispatch(positionDetailsIsLoading(true)); - api.get(`/position/?position_number=${query}`) - .then(response => response.data.results) + api.get(`/position/${id}/`) + .then(response => [response.data]) .then((positionDetails) => { dispatch(positionDetailsFetchDataSuccess(positionDetails)); dispatch(positionDetailsIsLoading(false)); From f600519074066578eb000a31390833c2680111a8 Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Mon, 17 Dec 2018 11:05:40 -0500 Subject: [PATCH 005/109] chore: remove unused props from components --- src/Containers/Home/Home.jsx | 10 +++------- src/Containers/HomePage/HomePage.jsx | 7 ++----- .../HomePagePositionsContainer.jsx | 2 +- .../HomePagePositionsContainer.test.jsx | 20 ++++++++++++++++--- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/Containers/Home/Home.jsx b/src/Containers/Home/Home.jsx index b003fdceb8..87f5d3b987 100644 --- a/src/Containers/Home/Home.jsx +++ b/src/Containers/Home/Home.jsx @@ -6,7 +6,7 @@ import { bidListFetchData } from '../../actions/bidList'; import { homePagePositionsFetchData } from '../../actions/homePagePositions'; import { toggleSearchBar } from '../../actions/showSearchBar'; import HomePage from '../../Containers/HomePage/HomePage'; -import { FILTERS_PARENT, EMPTY_FUNCTION, HOME_PAGE_POSITIONS, USER_PROFILE, BID_LIST } from '../../Constants/PropTypes'; +import { FILTERS_PARENT, EMPTY_FUNCTION, HOME_PAGE_POSITIONS, BID_LIST } from '../../Constants/PropTypes'; import { DEFAULT_HOME_PAGE_POSITIONS } from '../../Constants/DefaultProps'; import { LOGIN_REDIRECT } from '../../login/routes'; @@ -20,7 +20,7 @@ class Home extends Component { }; } - componentWillMount() { + componentDidMount() { if (!this.props.isAuthorized()) { this.props.onNavigateTo(LOGIN_REDIRECT); } else { @@ -35,7 +35,7 @@ class Home extends Component { render() { const { onNavigateTo, items, homePagePositions, homePagePositionsHasErrored, homePagePositionsIsLoading, - userProfile, userProfileIsLoading, bidList, filtersIsLoading } = this.props; + userProfileIsLoading, bidList, filtersIsLoading } = this.props; return ( @@ -59,7 +58,6 @@ Home.propTypes = { homePagePositions: HOME_PAGE_POSITIONS, homePagePositionsHasErrored: PropTypes.bool, homePagePositionsIsLoading: PropTypes.bool, - userProfile: USER_PROFILE, userProfileIsLoading: PropTypes.bool, bidList: BID_LIST.isRequired, bidListFetchData: PropTypes.func.isRequired, @@ -74,7 +72,6 @@ Home.defaultProps = { homePagePositions: DEFAULT_HOME_PAGE_POSITIONS, homePagePositionsHasErrored: false, homePagePositionsIsLoading: true, - userProfile: {}, userProfileIsLoading: false, bidList: { results: [] }, filtersIsLoading: false, @@ -87,7 +84,6 @@ const mapStateToProps = state => ({ homePagePositions: state.homePagePositions, homePagePositionsHasErrored: state.homePagePositionsHasErrored, homePagePositionsIsLoading: state.homePagePositionsIsLoading, - userProfile: state.userProfile, userProfileIsLoading: state.userProfileIsLoading, bidList: state.bidListFetchDataSuccess, }); diff --git a/src/Containers/HomePage/HomePage.jsx b/src/Containers/HomePage/HomePage.jsx index 65e02d16bd..d428b78e2c 100644 --- a/src/Containers/HomePage/HomePage.jsx +++ b/src/Containers/HomePage/HomePage.jsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { USER_PROFILE, BID_RESULTS } from '../../Constants/PropTypes'; +import { BID_RESULTS } from '../../Constants/PropTypes'; import HomePagePositionsContainer from '../HomePagePositionsContainer/HomePagePositionsContainer'; class HomePage extends Component { @@ -13,11 +13,10 @@ class HomePage extends Component { } render() { - const { userProfile, userProfileIsLoading, bidList, onNavigateTo } = this.props; + const { userProfileIsLoading, bidList, onNavigateTo } = this.props; return (
{ expect(wrapper).toBeDefined(); }); - it('fetches data on componentWillMount', () => { + it('fetches data on componentDidMount', () => { const spy = sinon.spy(); const wrapper = shallow( { homePagePositionsFetchData={spy} />); expect(wrapper).toBeDefined(); + wrapper.instance().componentDidMount(); sinon.assert.calledOnce(spy); }); - it('fetches data on componentWillReceiveProps', () => { + it('fetches data on prop update', () => { const spy = sinon.spy(); const wrapper = shallow( { wrapper.instance().setState({ hasFetched: false }); wrapper.setProps({}); expect(wrapper.instance().state.hasFetched).toBe(true); - sinon.assert.calledTwice(spy); + sinon.assert.calledOnce(spy); + }); + + it('does not fetch data on prop update when hasFetched is true', () => { + const spy = sinon.spy(); + const wrapper = shallow( + ); + wrapper.instance().setState({ hasFetched: true }); + wrapper.setProps({}); + expect(wrapper.instance().state.hasFetched).toBe(true); + sinon.assert.notCalled(spy); }); }); From 2dbad862472f0f796d7cea751498b5fd4c41e8ff Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Mon, 17 Dec 2018 14:11:16 -0500 Subject: [PATCH 006/109] chore: fix err due to incorrect favicon size in manifest --- public/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/manifest.json b/public/manifest.json index 7b63d98e71..e1c753f599 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -4,7 +4,7 @@ "icons": [ { "src": "favicon.ico", - "sizes": "192x192", + "sizes": "16x16", "type": "image/png" } ], From d129c592eed244cedf77b15378e78bb11b8413b2 Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Mon, 17 Dec 2018 14:42:45 -0500 Subject: [PATCH 007/109] chore: remove unused props from the Home container --- src/Containers/Home/Home.jsx | 36 ++----------------------------- src/Containers/Home/Home.test.jsx | 2 -- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/Containers/Home/Home.jsx b/src/Containers/Home/Home.jsx index 87f5d3b987..7b109d109d 100644 --- a/src/Containers/Home/Home.jsx +++ b/src/Containers/Home/Home.jsx @@ -3,11 +3,8 @@ import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import { bidListFetchData } from '../../actions/bidList'; -import { homePagePositionsFetchData } from '../../actions/homePagePositions'; -import { toggleSearchBar } from '../../actions/showSearchBar'; import HomePage from '../../Containers/HomePage/HomePage'; -import { FILTERS_PARENT, EMPTY_FUNCTION, HOME_PAGE_POSITIONS, BID_LIST } from '../../Constants/PropTypes'; -import { DEFAULT_HOME_PAGE_POSITIONS } from '../../Constants/DefaultProps'; +import { BID_LIST } from '../../Constants/PropTypes'; import { LOGIN_REDIRECT } from '../../login/routes'; class Home extends Component { @@ -33,17 +30,10 @@ class Home extends Component { } render() { - const { onNavigateTo, items, homePagePositions, - homePagePositionsHasErrored, homePagePositionsIsLoading, - userProfileIsLoading, bidList, filtersIsLoading } = this.props; + const { onNavigateTo, userProfileIsLoading, bidList } = this.props; return ( @@ -53,47 +43,25 @@ class Home extends Component { Home.propTypes = { onNavigateTo: PropTypes.func.isRequired, - items: FILTERS_PARENT, isAuthorized: PropTypes.func.isRequired, - homePagePositions: HOME_PAGE_POSITIONS, - homePagePositionsHasErrored: PropTypes.bool, - homePagePositionsIsLoading: PropTypes.bool, userProfileIsLoading: PropTypes.bool, bidList: BID_LIST.isRequired, bidListFetchData: PropTypes.func.isRequired, - filtersIsLoading: PropTypes.bool, }; Home.defaultProps = { - items: { filters: [] }, - hasErrored: false, - isLoading: true, - homePagePositionsFetchData: EMPTY_FUNCTION, - homePagePositions: DEFAULT_HOME_PAGE_POSITIONS, - homePagePositionsHasErrored: false, - homePagePositionsIsLoading: true, userProfileIsLoading: false, bidList: { results: [] }, - filtersIsLoading: false, }; const mapStateToProps = state => ({ - items: state.filters, - hasErrored: state.filtersHasErrored, - filtersIsLoading: state.filtersIsLoading, - homePagePositions: state.homePagePositions, - homePagePositionsHasErrored: state.homePagePositionsHasErrored, - homePagePositionsIsLoading: state.homePagePositionsIsLoading, userProfileIsLoading: state.userProfileIsLoading, bidList: state.bidListFetchDataSuccess, }); export const mapDispatchToProps = dispatch => ({ - homePagePositionsFetchData: (skills, grade) => - dispatch(homePagePositionsFetchData(skills, grade)), onNavigateTo: dest => dispatch(push(dest)), bidListFetchData: () => dispatch(bidListFetchData()), - toggleSearchBarVisibility: showHide => dispatch(toggleSearchBar(showHide)), }); export default connect(mapStateToProps, mapDispatchToProps)(Home); diff --git a/src/Containers/Home/Home.test.jsx b/src/Containers/Home/Home.test.jsx index a683dae49e..c5e449eea4 100644 --- a/src/Containers/Home/Home.test.jsx +++ b/src/Containers/Home/Home.test.jsx @@ -48,8 +48,6 @@ describe('mapDispatchToProps', () => { const config = { fetchData: [{}], onNavigateTo: ['/results'], - toggleFavorite: [1, true], - toggleSearchBarVisibility: [true], }; testDispatchFunctions(mapDispatchToProps, config); }); From 1aff270b32ced0417cfa99bc40945942e8d6bc5d Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Mon, 17 Dec 2018 15:29:02 -0500 Subject: [PATCH 008/109] chore: remove unused props from the HomePagePositionsContainer component --- .../HomePagePositionsContainer.jsx | 32 +++++++------------ .../HomePagePositionsContainer.test.jsx | 1 - 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.jsx b/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.jsx index b5a17395f5..57802dc83c 100644 --- a/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.jsx +++ b/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.jsx @@ -36,25 +36,21 @@ class HomePagePositionsContainer extends Component { } render() { - const { homePagePositions, userProfileIsLoading, - homePagePositionsHasErrored, homePagePositionsIsLoading, - userProfile, onNavigateTo, bidList } = this.props; + const { homePagePositions, userProfileIsLoading, homePagePositionsIsLoading, + userProfile, bidList } = this.props; return (
{ - (userProfileIsLoading || homePagePositionsIsLoading) && + (userProfileIsLoading || homePagePositionsIsLoading) + ? - } - { - !userProfileIsLoading && !homePagePositionsIsLoading && - + : + }
); @@ -62,12 +58,10 @@ class HomePagePositionsContainer extends Component { } HomePagePositionsContainer.propTypes = { - homePagePositionsFetchData: PropTypes.func, // eslint-disable-line + homePagePositionsFetchData: PropTypes.func, homePagePositions: HOME_PAGE_POSITIONS, - homePagePositionsHasErrored: PropTypes.bool, homePagePositionsIsLoading: PropTypes.bool, userProfile: USER_PROFILE.isRequired, - onNavigateTo: PropTypes.func.isRequired, bidList: BID_RESULTS.isRequired, userProfileIsLoading: PropTypes.bool, }; @@ -75,7 +69,6 @@ HomePagePositionsContainer.propTypes = { HomePagePositionsContainer.defaultProps = { homePagePositionsFetchData: EMPTY_FUNCTION, homePagePositions: DEFAULT_HOME_PAGE_POSITIONS, - homePagePositionsHasErrored: false, homePagePositionsIsLoading: true, userProfile: {}, userProfileIsLoading: false, @@ -84,7 +77,6 @@ HomePagePositionsContainer.defaultProps = { const mapStateToProps = state => ({ userProfile: state.userProfile, homePagePositions: state.homePagePositions, - homePagePositionsHasErrored: state.homePagePositionsHasErrored, homePagePositionsIsLoading: state.homePagePositionsIsLoading, userProfileIsLoading: state.userProfileIsLoading, }); diff --git a/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.test.jsx b/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.test.jsx index 2323f539c3..a0dff54611 100644 --- a/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.test.jsx +++ b/src/Containers/HomePagePositionsContainer/HomePagePositionsContainer.test.jsx @@ -16,7 +16,6 @@ const mockStore = configureStore(middlewares); describe('Home', () => { const props = { userProfile: { id: 1, skills: [], grade: '01' }, - onNavigateTo: () => {}, bidList: [], homePagePositions: DEFAULT_HOME_PAGE_POSITIONS, }; From 91a7b3541ca5802603a5a3d968bff4250d5b16b1 Mon Sep 17 00:00:00 2001 From: Rob Tirserio Date: Tue, 18 Dec 2018 11:02:02 -0500 Subject: [PATCH 009/109] fix: update profile page based on qa --- src/Components/BidCount/BidCount.jsx | 2 +- .../__snapshots__/BidCount.test.jsx.snap | 4 +- .../__snapshots__/BidCycleList.test.jsx.snap | 1 + .../BidTrackerCardTitle.test.jsx.snap | 2 +- .../__snapshots__/BidTracker.test.jsx.snap | 2 + src/Components/Favorite/Favorite.jsx | 2 +- .../FavoritePositions/FavoritePositions.jsx | 2 +- .../FavoritePositions.test.jsx.snap | 1 + .../ProfileDashboard.test.jsx.snap | 1 + .../ProfileSectionTitle.jsx | 9 +- .../ResultsCondensedCardBottom.jsx | 13 +- .../ResultsCondensedCardBottom.test.jsx.snap | 151 +----------------- .../ResultsCondensedCardStats.test.jsx.snap | 2 +- .../__snapshots__/SavedSearches.test.jsx.snap | 1 + src/sass/_bidCount.scss | 1 + src/sass/_condensedCard.scss | 5 +- src/sass/_profile.scss | 4 + 17 files changed, 34 insertions(+), 169 deletions(-) diff --git a/src/Components/BidCount/BidCount.jsx b/src/Components/BidCount/BidCount.jsx index 685769b8dc..c5c85f4766 100644 --- a/src/Components/BidCount/BidCount.jsx +++ b/src/Components/BidCount/BidCount.jsx @@ -30,7 +30,7 @@ BidCount.propTypes = { BidCount.defaultProps = { bidStatistics: {}, hideLabel: false, - label: 'Bid Count:', + label: 'Bid count:', altStyle: false, }; diff --git a/src/Components/BidCount/__snapshots__/BidCount.test.jsx.snap b/src/Components/BidCount/__snapshots__/BidCount.test.jsx.snap index 49ecf05a28..431646e070 100644 --- a/src/Components/BidCount/__snapshots__/BidCount.test.jsx.snap +++ b/src/Components/BidCount/__snapshots__/BidCount.test.jsx.snap @@ -8,7 +8,7 @@ exports[`BidCountComponent matches snapshot 1`] = ` className="bid-count-label" id="bid-counts" > - Bid Count: + Bid count:
    - Bid Count: + Bid count: