Skip to content

Smoke Testing 2020-09-15 #2 #4919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ workflows:
filters:
branches:
only:
- milestone-20200924
- develop
# This is alternate dev env for parallel testing
- "build-test":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ exports[`Default render 1`] = `
},
Object {
"href": "https://www.topcoder-dev.com/blog",
"openNewTab": true,
"title": "Blog",
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
}
onShowBadges={[Function]}
showBadgesButton={true}
wins={3}
wins={0}
/>
</div>
</Sticky>
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder-dev.com/blog',
openNewTab: true,
},
{
title: 'Thrive',
Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder.com/blog',
openNewTab: true,
},
{
title: 'Thrive',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1000.22.7",
"topcoder-react-ui-kit": "2.0.0",
"topcoder-react-ui-kit": "1000.1.0",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
"url-parse": "^1.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/ProfilePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class ProfilePage extends React.Component {
info={info}
onShowBadges={() => this.setState({ badgesModalOpen: true })}
showBadgesButton={achievements && achievements.length > 0}
wins={_.get(stats, 'wins', 0)}
wins={_.get((stats && stats[0]) || {}, 'wins', 0)}
/>
</div>
</Sticky>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ function Tip(props) {

const allPhases = c.phases || [];
const endPhaseDate = Math.max(...allPhases.map(d => phaseEndDate(d)));
const registrationPhase = allPhases.find(phase => phase.name === 'Registration');
const submissionPhase = allPhases.find(phase => phase.name === 'Submission');
const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission');
const registrationPhase = allPhases.find(phase => phase.name === 'Registration') || {};
const submissionPhase = allPhases.find(phase => phase.name === 'Submission') || {};
const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission') || {};

if (registrationPhase) {
if (!_.isEmpty(registrationPhase)) {
steps.push({
date: phaseStartDate(registrationPhase),
name: 'Start',
});
}
if (checkpointPhase) {
if (!_.isEmpty(checkpointPhase)) {
steps.push({
date: phaseEndDate(checkpointPhase),
name: 'Checkpoint',
Expand All @@ -119,7 +119,7 @@ function Tip(props) {
date: phaseEndDate(iterativeReviewPhase),
name: 'Iterative Review',
});
} else if (submissionPhase) {
} else if (!_.isEmpty(submissionPhase)) {
steps.push({
date: phaseEndDate(submissionPhase),
name: 'Submission',
Expand Down
4 changes: 4 additions & 0 deletions src/shared/routes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ function Routes({ communityId }) {
component={() => <TrackHomePages base="/community" />}
path="/community/(competitive-programming|data-science|design|development|qa)/how-to-compete"
/>
<Redirect
from="/community/gigs"
to="/gigs"
/>
<Route
component={PolicyPages}
exact
Expand Down
8 changes: 4 additions & 4 deletions src/shared/utils/challenge-listing/sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import moment from 'moment';
import { find, sumBy } from 'lodash';
import { find, sumBy, isEmpty } from 'lodash';
import { phaseStartDate, phaseEndDate } from './helper';

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