Skip to content

Commit e86eab7

Browse files
authored
Allow public viewing for Conflicts Page (#1213)
1 parent fbae626 commit e86eab7

File tree

5 files changed

+25
-32
lines changed

5 files changed

+25
-32
lines changed

client/components/TestPlanReportStatusDialog/index.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const TestPlanReportStatusDialog = ({
6060
<ReportStatusSummary
6161
testPlanVersion={testPlanVersion}
6262
testPlanReport={testPlanReport}
63-
me={me}
6463
/>
6564
{isSignedIn && isAdmin && !testPlanReport ? (
6665
<AddTestToQueueWithConfirmation

client/components/TestQueue/Conflicts/TestConflictsActions.jsx

+24-19
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,36 @@ const ActionButton = styled(Button)`
2929
margin: 0;
3030
`;
3131

32-
const TestConflictsActions = ({ issueLink, isAdmin, testPlanRuns }) => {
32+
const TestConflictsActions = ({
33+
issueLink,
34+
isAdmin,
35+
testPlanRuns,
36+
testIndex
37+
}) => {
38+
const openResultsLabel = isAdmin ? 'Open run as...' : 'View Results for...';
39+
3340
return (
3441
<ActionContainer>
3542
<Button variant="secondary" target="_blank" href={issueLink}>
3643
<FontAwesomeIcon icon={faExclamationCircle} />
3744
Raise an Issue for Conflict
3845
</Button>
39-
{isAdmin && (
40-
<Dropdown>
41-
<Dropdown.Toggle variant="secondary" as={ActionButton}>
42-
<FontAwesomeIcon icon={faFileImport} />
43-
Open run as...
44-
</Dropdown.Toggle>
45-
<Dropdown.Menu>
46-
{testPlanRuns.map(testPlanRun => (
47-
<Dropdown.Item
48-
key={testPlanRun.id}
49-
href={`/run/${testPlanRun.id}?user=${testPlanRun.tester.id}`}
50-
>
51-
{testPlanRun.tester.username}
52-
</Dropdown.Item>
53-
))}
54-
</Dropdown.Menu>
55-
</Dropdown>
56-
)}
46+
<Dropdown>
47+
<Dropdown.Toggle variant="secondary" as={ActionButton}>
48+
<FontAwesomeIcon icon={faFileImport} />
49+
{openResultsLabel}
50+
</Dropdown.Toggle>
51+
<Dropdown.Menu>
52+
{testPlanRuns.map(testPlanRun => (
53+
<Dropdown.Item
54+
key={testPlanRun.id}
55+
href={`/run/${testPlanRun.id}?user=${testPlanRun.tester.id}#${testIndex}`}
56+
>
57+
{testPlanRun.tester.username}
58+
</Dropdown.Item>
59+
))}
60+
</Dropdown.Menu>
61+
</Dropdown>
5762
</ActionContainer>
5863
);
5964
};

client/components/TestQueue/index.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ const TestQueue = () => {
332332
<ReportStatusSummary
333333
testPlanVersion={testPlanVersion}
334334
testPlanReport={testPlanReport}
335-
me={data.me}
336335
fromTestQueue
337336
/>
338337
{hasBotRun ? (

client/components/common/ReportStatusSummary/index.jsx

-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
TestPlanRunPropType,
99
UserPropType
1010
} from '../proptypes';
11-
import { evaluateAuth } from '../../../utils/evaluateAuth';
1211

1312
const IncompleteStatusReport = styled.span`
1413
min-width: 5rem;
@@ -18,11 +17,8 @@ const IncompleteStatusReport = styled.span`
1817
const ReportStatusSummary = ({
1918
testPlanVersion,
2019
testPlanReport,
21-
me,
2220
fromTestQueue = false
2321
}) => {
24-
const { isSignedIn, isAdmin, isTester, isVendor } = evaluateAuth(me);
25-
2622
const renderCompleteReportStatus = testPlanReport => {
2723
const formattedDate = dates.convertDateToString(
2824
testPlanReport.markedFinalAt,
@@ -37,8 +33,6 @@ const ReportStatusSummary = ({
3733

3834
const getConflictsAnchor = conflictsCount => {
3935
if (conflictsCount === 0) return null;
40-
if (!isSignedIn) return null;
41-
if (!isTester && !isVendor && !isAdmin) return null;
4236
return (
4337
<a
4438
style={{ color: '#ce1b4c' }}

client/routes/index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export default () => (
4242
<Route
4343
exact
4444
path="/test-queue/:testPlanReportId/conflicts"
45-
element={
46-
<ConfirmAuth requiredPermission="TESTER">
47-
<TestQueueConflicts />
48-
</ConfirmAuth>
49-
}
45+
element={<TestQueueConflicts />}
5046
/>
5147
<Route
5248
exact

0 commit comments

Comments
 (0)