Skip to content

Smoke Testing 2020-09-15 #1 #4918

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 21 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
774f8c7
Update FilterPanel.jsx
rashmi73 Sep 9, 2020
8227ebd
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
fe9e708
Update index.jsx
rashmi73 Sep 10, 2020
01405d9
Update FilterPanel.jsx
rashmi73 Sep 10, 2020
1310b69
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
ed9025e
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
f22bd8b
fix: for issue #2069
narekcat Sep 10, 2020
1c91948
fix: for issue #2069
luizrrodrigues Sep 13, 2020
f0af65d
Merge pull request #4893 from narekcat/issue-2069
luizrrodrigues Sep 13, 2020
09f4c8b
Hide RSS feature from front-end
luizrrodrigues Sep 13, 2020
e1822d4
Merge pull request #4904 from topcoder-platform/issue-4898
luizrrodrigues Sep 13, 2020
1371d6d
Merge branch 'milestone-20200917' into milestone-20200910
luizrrodrigues Sep 13, 2020
55f67d1
Merge pull request #4905 from topcoder-platform/milestone-20200910
luizrrodrigues Sep 13, 2020
5b5bb81
Deploy milestone-20200917 to Dev and Stag
luizrrodrigues Sep 13, 2020
2d6649a
Merge pull request #4882 from rashmi73/issue_4874
luizrrodrigues Sep 13, 2020
77ea494
fix: for issue #2069
luizrrodrigues Sep 14, 2020
3fba920
ChallengeTile: Fix MM link to Challenge details page
luizrrodrigues Sep 14, 2020
8ac5916
Merge pull request #4907 from topcoder-platform/issue-2069
luizrrodrigues Sep 14, 2020
8a80704
Profile Stats Challenges : Fix loading icon
luizrrodrigues Sep 14, 2020
beaf57a
Merge pull request #4908 from topcoder-platform/issue-2069
luizrrodrigues Sep 14, 2020
0f91bf0
Merge branch 'develop' into milestone-20200917
luizrrodrigues Sep 15, 2020
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
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ workflows:
filters:
branches:
only:
- milestone-20200917
- develop
# This is alternate dev env for parallel testing
- "build-test":
Expand Down Expand Up @@ -260,7 +259,7 @@ workflows:
filters:
branches:
only:
- feature-contentful
- develop
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,15 @@ exports[`renders marathon 1`] = `
className="src-shared-components-ChallengeTile-___style__completed-challenge___3w5tT"
>
<header>
<a
<Link
className="src-shared-components-ChallengeTile-___style__name___1jF7j"
href="https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=17153"
replace={false}
to="/challenges/15404"
>
2018 TCO Marathon
</a>
<span>
2018 TCO Marathon
</span>
</Link>
<p
className="src-shared-components-ChallengeTile-___style__subtrack-color___2AJaw"
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1.0.4",
"topcoder-react-lib": "1000.22.6",
"topcoder-react-ui-kit": "2.0.0",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
Expand Down
18 changes: 4 additions & 14 deletions src/shared/components/ChallengeTile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Challenge tile.
*/
/* eslint-env browser */
import _ from 'lodash';
import React from 'react';
import PT from 'prop-types';
import { Link } from 'react-router-dom';
Expand Down Expand Up @@ -83,36 +82,27 @@ class ChallengeTile extends React.Component {
margin: '10px 5px',
};

const isDataScience = track === COMPETITION_TRACKS.DATA_SCIENCE;
const isDevelopment = track === COMPETITION_TRACKS.DEVELOP;
const isDesign = track === COMPETITION_TRACKS.DESIGN;

const roundId = isDataScience ? _.get(challenge, 'rounds.0.id') : 0;

return (
<div styleName="challenge tile" style={extraStyle}>
<div styleName={outStyleName}>
<div styleName="completed-challenge">
<header>
{ !isDataScience && (!challenge.isPrivate
{ !challenge.isPrivate
? (
<Link to={`/challenges/${challenge.id}`} styleName="name">
<span>
{ challenge.name }
</span>
</Link>
) : (
)
: (
<span>
{ challenge.name }
</span>
)) }

{ isDataScience
&& (
<a styleName="name" href={`https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=${roundId}`}>
{ challenge.name }
</a>
) }
)}

<p styleName="subtrack-color">
{underscoreReplace(type)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,10 @@ const processPastChallenge = (challenge) => {
class SubTrackChallengeView extends React.Component {
constructor(props, context) {
super(props, context);
// this is current page number. starts with 0.
// everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE
this.state = {
// this is current page number. starts with 0.
// this is current page number. starts with 1.
// everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE
pageNum: 0,
pageNum: 1,
// which challenge's modal should be poped. null means no modal
challengeIndexToPopModal: null,
};
Expand All @@ -140,13 +138,17 @@ class SubTrackChallengeView extends React.Component {
userId,
} = this.props;

const {
pageNum,
} = this.state;

if (track === 'DEVELOP' || track === 'DESIGN') {
if (!loadingSubTrackChallengesUUID) {
loadSubtrackChallenges(
handle,
auth.tokenV3,
track, subTrack,
0,
pageNum,
CHALLENGE_PER_PAGE,
true,
userId,
Expand All @@ -155,11 +157,12 @@ class SubTrackChallengeView extends React.Component {
} else if (track === 'DATA_SCIENCE') {
if (subTrack === 'SRM') {
if (!loadingSRMUUID) {
loadSRM(handle, auth.tokenV3, 0, CHALLENGE_PER_PAGE, true);
// pageNum - 1 to match with v4 offset
loadSRM(handle, auth.tokenV3, pageNum - 1, CHALLENGE_PER_PAGE, true);
}
} else if (subTrack === 'MARATHON_MATCH') {
if (!loadingMarathonUUID) {
loadMarathon(handle, auth.tokenV3, 0, CHALLENGE_PER_PAGE, true);
loadMarathon(handle, userId, auth.tokenV3, pageNum, CHALLENGE_PER_PAGE, true);
}
}
}
Expand Down Expand Up @@ -204,12 +207,12 @@ class SubTrackChallengeView extends React.Component {
} else if (track === 'DATA_SCIENCE') {
if (subTrack === 'SRM') {
if (!loadingSRMUUID) {
loadSRM(handle, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false);
loadSRM(handle, auth.tokenV3, pageNum, CHALLENGE_PER_PAGE, false);
this.setState({ pageNum: pageNum + 1 });
}
} else if (subTrack === 'MARATHON_MATCH') {
if (!loadingMarathonUUID) {
loadMarathon(handle, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false);
loadMarathon(handle, userId, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false);
this.setState({ pageNum: pageNum + 1 });
}
}
Expand Down Expand Up @@ -245,7 +248,7 @@ class SubTrackChallengeView extends React.Component {
userId,
} = this.props;

if (pageNum === 0
if (pageNum === 1
&& (loadingSubTrackChallengesUUID || loadingSRMUUID || loadingMarathonUUID)) {
return <LoadingIndicator />;
}
Expand Down Expand Up @@ -347,7 +350,6 @@ class SubTrackChallengeView extends React.Component {
userMarathons,
item => ({
...item,
submissionEndDate: _.get(item, 'rounds.0.systemTestEndAt'),
pointTotal: _.get(item, 'rounds.0.userMMDetails.pointTotal'),
}),
);
Expand Down Expand Up @@ -440,10 +442,18 @@ function mapDispatchToProps(dispatch) {
dispatch(action.getUserSrmInit(handle, uuid));
dispatch(action.getUserSrmDone(uuid, handle, tokenV3, pageNum, pageSize, refresh));
},
loadMarathon: (handle, tokenV3, pageNum, pageSize, refresh) => {
loadMarathon: (handle, memberId, tokenV3, pageNum, pageSize, refresh) => {
const uuid = shortId();
dispatch(action.getUserMarathonInit(handle, uuid));
dispatch(action.getUserMarathonDone(uuid, handle, tokenV3, pageNum, pageSize, refresh));
dispatch(action.getUserMarathonDone(
uuid,
handle,
memberId,
tokenV3,
pageNum,
pageSize,
refresh,
));
},
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import PT from 'prop-types';
import SwitchWithLabel from 'components/SwitchWithLabel';
import { challenge as challengeUtils } from 'topcoder-react-lib';
import { COMPETITION_TRACKS as TRACKS } from 'utils/tc';
import _ from 'lodash';

import localStorage from 'localStorage';
import ChallengeSearchBar from './ChallengeSearchBar';
import EditTrackPanel from './EditTrackPanel';
import FiltersIcon from './FiltersSwitch/filters-icon.svg';
Expand Down Expand Up @@ -54,8 +52,6 @@ export default function ChallengeFilters({
const switchTrack = (track, on) => {
const act = on ? Filter.addTrack : Filter.removeTrack;
const filterObj = act(filterState, track);
const newFilterObj = _.pick(filterObj, 'tracks');
localStorage.setItem('trackStatus', JSON.stringify(newFilterObj));
setFilterState(filterObj);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ export default function FiltersPanel({
setFilterState({});
selectCommunity(defaultCommunityId);
setSearchText('');
localStorage.setItem('trackStatus', JSON.stringify({}));
}}
size="sm"
theme={{ button: style.button }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import './style.scss';

const Filter = challengeUtils.filter;

const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all';
// DISABLED: Until feeds.topcoder.com domain fixed community-app#4606
// const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all';

export default function BucketSelector({
activeBucket,
Expand Down Expand Up @@ -109,11 +110,14 @@ export default function BucketSelector({
) : ''
}
<hr />
{/* DISABLED: Until feeds.topcoder.com domain fixed community-app#4606 */}
{/*
<div styleName="get-rss">
<a href={RSS_LINK}>
Get the RSS feed
</a>
</div>
*/}
</div>
);
}
Expand Down
7 changes: 0 additions & 7 deletions src/shared/containers/challenge-listing/FilterPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import shortId from 'shortid';
import FilterPanel from 'components/challenge-listing/Filters/ChallengeFilters';
import PT from 'prop-types';
import React from 'react';
import localStorage from 'localStorage';
import sidebarActions from 'actions/challenge-listing/sidebar';
import { BUCKETS, isReviewOpportunitiesBucket } from 'utils/challenge-listing/buckets';
import { bindActionCreators } from 'redux';
Expand Down Expand Up @@ -64,12 +63,6 @@ export class Container extends React.Component {
const query = qs.parse(window.location.search.slice(1));
if (query.filter && !filterState.track) {
setFilterState(query.filter);
} else {
const trackStatus = localStorage.getItem('trackStatus');
const filterObj = trackStatus ? JSON.parse(trackStatus) : null;
if (filterObj) {
setFilterState(filterObj);
}
}
}

Expand Down