Skip to content

Marathon match submission download / Collapsible timeline / Markdown rendering updates --> PROD #6824

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 33 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
042711c
Updates to allow for downloading marathon match submissions for all c…
jmgasper Oct 17, 2022
37d5eed
Fix up lint issue
jmgasper Oct 17, 2022
8c750b2
Ignore failing test for now - only fails on CI/CD
jmgasper Oct 17, 2022
560a27f
These test are frustrating - works fine locally, not in CI/CD
jmgasper Oct 17, 2022
ffd115c
UI updates and fixes how we use the token for downloading marathon ma…
jmgasper Oct 17, 2022
a215959
UI updates for modal display of marathon match submissions
jmgasper Oct 20, 2022
6ef811b
Fix merge issue
jmgasper Oct 20, 2022
c3f6572
Width fix
jmgasper Oct 20, 2022
6ef9813
Width fix
jmgasper Oct 20, 2022
2aedb4b
Make date and time one line on submission history popup
jmgasper Nov 1, 2022
bccafa9
Merge branch 'develop' into marathon_match_submission_download
jmgasper Jan 31, 2023
a19c59a
Ability to download all submissions for a marathon match, after it’s …
jmgasper Jan 31, 2023
4f885f4
Expand “SRMs” abbreviation
jmgasper Jan 31, 2023
d40e4aa
Compress timeline view
jmgasper Feb 1, 2023
6d9aab7
Fix failing test
jmgasper Feb 1, 2023
6108300
Revert "Fix failing test"
jmgasper Feb 1, 2023
4d359da
Ok, React is being dumb about these snapshots
jmgasper Feb 1, 2023
64b88d3
Top uni nav not displayed (Mobile)
jmgasper Feb 2, 2023
837e740
Merge branch 'universal_nav' into marathon_match_submission_download
jmgasper Feb 3, 2023
78961db
Updates to submission download buttons
jmgasper Feb 3, 2023
3ee73d2
Fix failing test
jmgasper Feb 3, 2023
f444233
Updated wording on time remaining in phase
jmgasper Feb 6, 2023
fbf0f2c
Simplify user handling in uninav
jmgasper Feb 7, 2023
c7d083b
Lint errors
jmgasper Feb 7, 2023
b031ad3
Lint fix
jmgasper Feb 7, 2023
eb99d69
Markdown rendering fixes
jmgasper Feb 7, 2023
b36957a
Additional download submission UAT tweaks
jmgasper Feb 9, 2023
f0f9de3
Merge pull request #6823 from topcoder-platform/marathon_match_submis…
jmgasper Feb 11, 2023
d5acd6a
Fix for grey background flashing behind “Download All” button
jmgasper Feb 13, 2023
b1a0ddf
Merge pull request #6825 from topcoder-platform/marathon_match_submis…
jmgasper Feb 13, 2023
5061db9
Only show download for MM challenge type, not tag
jmgasper Feb 14, 2023
f359796
Lint errors
jmgasper Feb 14, 2023
a7c3e22
Revert "Only show download for MM challenge type, not tag"
jmgasper Feb 14, 2023
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 @@ -364,6 +364,7 @@ workflows:
branches:
only:
- universal_nav
- marathon_match_submission_download
- feat/badges-box
# This is beta env for production soft releases
- "build-prod-beta":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Matches shallow shapshot shapshot 1 1`] = `
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__container___1WzuZ"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__row___tH5eB src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__no-border___1tHzW"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col-1___3g3Tt src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col___2-hjE"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mobile-header___3NsEQ"
>
SUBMISSION
</div>
<span>
1
</span>
</div>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col-2___2KjRa src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col___2-hjE"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mobile-header___3NsEQ"
>
FINAL SCORE
</div>
<div>
N/A
</div>
</div>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col-3___3MsR- src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col___2-hjE"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mobile-header___3NsEQ"
>
PROVISIONAL SCORE
</div>
<div>
80
</div>
</div>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col-4___SJw2x src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col___2-hjE src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mm___2y_Fx"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mobile-header___3NsEQ"
>
TIME
</div>
<div>
06 Nov 2017

15:49:35
</div>
</div>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col-2___2KjRa src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__col___2-hjE src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__center___2l_Ch"
>
<div
className="src-shared-components-challenge-detail-Submissions-SubmissionRow-SubmissionHistoryRow-___style__mobile-header___3NsEQ"
>
Action
</div>
<button
onClick={[Function]}
type="button"
>
<DownloadIcon
fill="none"
height="18"
viewBox="0 0 18 18"
width="18"
xmlns="http://www.w3.org/2000/svg"
/>
</button>
</div>
</div>
</div>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from 'react';
// import ReactDOM from 'react-dom';
import Renderer from 'react-test-renderer/shallow';
import TU from 'react-dom/test-utils';
import SubmissionHistoryRow from 'components/challenge-detail/Submissions/SubmissionRow/SubmissionHistoryRow';

const mockData = {
isMM: true,
submission: 1,
finalScore: 80,
provisionalScore: 80,
submissionTime: '2017-11-06T15:49:35.000Z',
isReviewPhaseComplete: false,
status: 'completed',
numWinners: 1,
challengeStatus: 'Completed',
auth: {
tokenV3: 'tokenV3',
},
submissionId: '1',
isLoggedIn: true,
};

describe('Matches shallow shapshot', () => {
test('shapshot 1', () => {
const renderer = new Renderer();

renderer.render((
<SubmissionHistoryRow {...mockData} />
));
expect(renderer.getRenderOutput()).toMatchSnapshot();
});
});

class Wrapper extends React.Component {
componentDidMount() {}

render() {
return <SubmissionHistoryRow {...this.props} />;
}
}

describe('render properly', () => {
test('click', () => {
const instance = TU.renderIntoDocument((<Wrapper {...mockData} />));
const matches = TU.scryRenderedDOMComponentsWithTag(instance, 'button');
expect(matches).toHaveLength(1);
TU.Simulate.click(matches[0]);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Matches shallow shapshot shapshot 1 1`] = `
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__winner___GzUxl"
>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__left___3hdSd"
>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__placement___Qyy47 src-shared-components-challenge-detail-Winners-Winner-___style__placement-1___1LrAQ"
>
<span>
1th
</span>
</div>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__info___37iL7"
>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__avatar-prize___1LtwD"
>
<ThemedAvatar
composeAdhocTheme="deeply"
composeContextTheme="softly"
mapThemrProps={[Function]}
theme={
Object {
"avatar": "src-shared-components-challenge-detail-Winners-Winner-style___avatar___18tFlU",
}
}
themePriority="adhoc-context-default"
/>
<div>
<a
className="src-shared-components-challenge-detail-Winners-Winner-___style__handle___2klay"
href="undefined/members/test"
target="_blank"
>
test
</a>
</div>
</div>
</div>
</div>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__right___1SPxZ"
>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__prize___1snZ8"
>
$
200
</div>
</div>
<div
className="src-shared-components-challenge-detail-Winners-Winner-___style__download-container___OXVza"
>
<button
onClick={[Function]}
type="button"
>
<DownloadIcon
fill="none"
height="18"
viewBox="0 0 18 18"
width="18"
xmlns="http://www.w3.org/2000/svg"
/>
</button>
</div>
</div>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import React from 'react';
// import ReactDOM from 'react-dom';
import Renderer from 'react-test-renderer/shallow';
import TU from 'react-dom/test-utils';
import Winner from 'components/challenge-detail/Winners/Winner';

const mockData = {
isDesign: false,
isMM: true,
prizes: [
{ value: 200, type: 'USD' },
{ value: 100, type: 'USD' },
],
submissions: [
{
placement: 1,
createdBy: 'test',
created: '2017-11-06T15:49:35.000Z',
id: '1',
},
{
placement: 1,
createdBy: 'test',
created: '2017-12-06T15:49:35.000Z',
id: '2',
},
{
placement: 1,
createdBy: 'test2',
created: '2017-11-06T15:49:35.000Z',
id: '3',
},
],
viewable: false,
winner: {
handle: 'test',
placement: 1,
},
isLoggedIn: true,
auth: {
tokenV3: 'tokenV3',
},
};

describe('Matches shallow shapshot', () => {
test('shapshot 1', () => {
const renderer = new Renderer();

renderer.render((
<Winner {...mockData} />
));
expect(renderer.getRenderOutput()).toMatchSnapshot();
});
});

class Wrapper extends React.Component {
componentDidMount() {}

render() {
return <Winner {...this.props} />;
}
}

describe('render properly', () => {
test('click', () => {
const instance = TU.renderIntoDocument((<Wrapper {...mockData} />));
const matches = TU.scryRenderedDOMComponentsWithTag(instance, 'button');
expect(matches).toHaveLength(1);
TU.Simulate.click(matches[0]);
});
});
Loading