Skip to content

Commit fc42d37

Browse files
Merge pull request #4919 from topcoder-platform/milestone-20200924
Smoke Testing 2020-09-15 #2
2 parents f3e8601 + c7e17cf commit fc42d37

File tree

10 files changed

+21
-13
lines changed

10 files changed

+21
-13
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ workflows:
230230
filters:
231231
branches:
232232
only:
233+
- milestone-20200924
233234
- develop
234235
# This is alternate dev env for parallel testing
235236
- "build-test":

__tests__/shared/components/Header/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ exports[`Default render 1`] = `
118118
},
119119
Object {
120120
"href": "https://www.topcoder-dev.com/blog",
121+
"openNewTab": true,
121122
"title": "Blog",
122123
},
123124
Object {

__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
5858
}
5959
onShowBadges={[Function]}
6060
showBadgesButton={true}
61-
wins={3}
61+
wins={0}
6262
/>
6363
</div>
6464
</Sticky>

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ module.exports = {
370370
{
371371
title: 'Blog',
372372
href: 'https://www.topcoder-dev.com/blog',
373+
openNewTab: true,
373374
},
374375
{
375376
title: 'Thrive',

config/production.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ module.exports = {
171171
{
172172
title: 'Blog',
173173
href: 'https://www.topcoder.com/blog',
174+
openNewTab: true,
174175
},
175176
{
176177
title: 'Thrive',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
139139
"tc-ui": "^1.0.12",
140140
"topcoder-react-lib": "1000.22.7",
141-
"topcoder-react-ui-kit": "2.0.0",
141+
"topcoder-react-ui-kit": "1000.1.0",
142142
"topcoder-react-utils": "0.7.8",
143143
"turndown": "^4.0.2",
144144
"url-parse": "^1.4.1",

src/shared/components/ProfilePage/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class ProfilePage extends React.Component {
192192
info={info}
193193
onShowBadges={() => this.setState({ badgesModalOpen: true })}
194194
showBadgesButton={achievements && achievements.length > 0}
195-
wins={_.get(stats, 'wins', 0)}
195+
wins={_.get((stats && stats[0]) || {}, 'wins', 0)}
196196
/>
197197
</div>
198198
</Sticky>

src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,17 @@ function Tip(props) {
9797

9898
const allPhases = c.phases || [];
9999
const endPhaseDate = Math.max(...allPhases.map(d => phaseEndDate(d)));
100-
const registrationPhase = allPhases.find(phase => phase.name === 'Registration');
101-
const submissionPhase = allPhases.find(phase => phase.name === 'Submission');
102-
const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission');
100+
const registrationPhase = allPhases.find(phase => phase.name === 'Registration') || {};
101+
const submissionPhase = allPhases.find(phase => phase.name === 'Submission') || {};
102+
const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission') || {};
103103

104-
if (registrationPhase) {
104+
if (!_.isEmpty(registrationPhase)) {
105105
steps.push({
106106
date: phaseStartDate(registrationPhase),
107107
name: 'Start',
108108
});
109109
}
110-
if (checkpointPhase) {
110+
if (!_.isEmpty(checkpointPhase)) {
111111
steps.push({
112112
date: phaseEndDate(checkpointPhase),
113113
name: 'Checkpoint',
@@ -119,7 +119,7 @@ function Tip(props) {
119119
date: phaseEndDate(iterativeReviewPhase),
120120
name: 'Iterative Review',
121121
});
122-
} else if (submissionPhase) {
122+
} else if (!_.isEmpty(submissionPhase)) {
123123
steps.push({
124124
date: phaseEndDate(submissionPhase),
125125
name: 'Submission',

src/shared/routes/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ function Routes({ communityId }) {
9595
component={() => <TrackHomePages base="/community" />}
9696
path="/community/(competitive-programming|data-science|design|development|qa)/how-to-compete"
9797
/>
98+
<Redirect
99+
from="/community/gigs"
100+
to="/gigs"
101+
/>
98102
<Route
99103
component={PolicyPages}
100104
exact

src/shared/utils/challenge-listing/sort.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import moment from 'moment';
6-
import { find, sumBy } from 'lodash';
6+
import { find, sumBy, isEmpty } from 'lodash';
77
import { phaseStartDate, phaseEndDate } from './helper';
88

99
export const SORTS = {
@@ -56,10 +56,10 @@ export default {
5656
const getChallengeStartDate = (challenge) => {
5757
// extract the phases from `challenge.phases`,
5858
// as `challenge.registrationStartDate` returned from API is not reliable
59-
const registrationPhase = find(challenge.phases, p => p.name === 'Registration');
60-
const submissionPhase = find(challenge.phases, p => p.name === 'Submission');
59+
const registrationPhase = find(challenge.phases, p => p.name === 'Registration') || {};
60+
const submissionPhase = find(challenge.phases, p => p.name === 'Submission') || {};
6161
// registration phase exists
62-
if (registrationPhase) {
62+
if (!isEmpty(registrationPhase)) {
6363
return moment(phaseStartDate(registrationPhase));
6464
}
6565
// registration phase doesnt exist, This is possibly a F2F or TSK. Take submission phase

0 commit comments

Comments
 (0)