-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Content updates to Candidate Review page #1186
Changes from 9 commits
e1217eb
997ff46
7efaeb3
b2b5a38
f4b5570
3ef251f
5d207c6
215c62e
2f31ab1
32ad7bb
f22112d
0e54f9c
c221484
4f229f1
6caa980
b43f9f5
1ef3d9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not entirely satisfied by this placement but there wasn't a strong enough organization strategy in place for content-related utilities used by more than one component. Ideally, it would be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose something like this could go into
Good thought for the future! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from 'react'; | ||
import { convertDateToString } from '../../utils/formatter'; | ||
|
||
export const getTestersRunHistory = ( | ||
testPlanReport, | ||
testId, | ||
draftTestPlanRuns = [] | ||
) => { | ||
const { id: testPlanReportId, at, browser } = testPlanReport; | ||
let lines = []; | ||
|
||
draftTestPlanRuns.forEach(draftTestPlanRun => { | ||
const { testPlanReport, testResults, tester } = draftTestPlanRun; | ||
|
||
const testResult = testResults.find(item => item.test.id === testId); | ||
if (testPlanReportId === testPlanReport.id && testResult?.completedAt) { | ||
lines.push( | ||
<li | ||
key={`${testResult.atVersion.id}-${testResult.browserVersion.id}-${testResult.test.id}-${tester.username}`} | ||
> | ||
Tested with{' '} | ||
<b> | ||
{at.name} {testResult.atVersion.name} | ||
</b>{' '} | ||
and{' '} | ||
<b> | ||
{browser.name} {testResult.browserVersion.name} | ||
</b>{' '} | ||
by{' '} | ||
<b> | ||
<a href={`https://github.com/${tester.username}`}> | ||
{tester.username} | ||
</a> | ||
</b>{' '} | ||
on {convertDateToString(testResult.completedAt, 'MMMM DD, YYYY')}. | ||
</li> | ||
); | ||
} | ||
}); | ||
|
||
return ( | ||
<ul | ||
style={{ | ||
marginBottom: '0' | ||
}} | ||
> | ||
{lines} | ||
</ul> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to ourselves to also bring this to the TestRun page as well!