Skip to content

Commit 1b1ea11

Browse files
authored
Merge pull request #1385 from w3c/development
Create April 28, 2025 Release
2 parents 57e0d7e + f3318f3 commit 1b1ea11

File tree

11 files changed

+159
-161
lines changed

11 files changed

+159
-161
lines changed

admins.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ Paul-Clue
1717
gracemccants
1818
outofambit
1919
ChrisC
20+
LouisDo10

client/components/TestQueue/AssignTesters.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useApolloClient } from '@apollo/client';
44
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
55
import { faCheck, faRobot, faUser } from '@fortawesome/free-solid-svg-icons';
66
import { Button, Dropdown } from 'react-bootstrap';
7-
import CompletionStatusListItem from './CompletionStatusListItem';
7+
import CompletionStatusListItem from '../TestQueueCompletionStatusListItem';
88
import useConfirmationModal from '../../hooks/useConfirmationModal';
99
import BasicThemedModal from '../common/BasicThemedModal';
1010
import { LoadingStatus, useTriggerLoad } from '../common/LoadingStatus';

client/components/TestQueue/CompletionStatusListItem/index.jsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

client/components/TestQueueCompletionStatusListItem/index.js

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,82 +4,80 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
44
import { faRobot } from '@fortawesome/free-solid-svg-icons';
55
import BotTestCompletionStatus from './BotTestCompletionStatus';
66
import PreviouslyAutomatedTestCompletionStatus from './PreviouslyAutomatedTestCompletionStatus';
7-
import { TestPlanRunPropType } from '../common/proptypes';
7+
import {
8+
TestPlanReportPropType,
9+
TestPlanRunPropType,
10+
UserPropType
11+
} from '../common/proptypes';
12+
import testQueueStyles from '../TestQueue/TestQueue.module.css';
813

914
const TestQueueCompletionStatusListItem = ({
10-
runnableTestsLength,
15+
rowId,
16+
testPlanReport,
1117
testPlanRun,
12-
id
18+
tester
1319
}) => {
14-
const { testResultsLength, tester } = testPlanRun;
20+
const { username, isBot } = tester;
1521
const testPlanRunPreviouslyAutomated = useMemo(
1622
() => testPlanRun.initiatedByAutomation,
1723
[testPlanRun]
1824
);
1925

20-
const renderTesterInfo = () => {
21-
if (tester.isBot) {
22-
return (
23-
<span aria-describedby={id}>
24-
<FontAwesomeIcon icon={faRobot} />
25-
{tester.username}
26-
</span>
27-
);
28-
} else {
29-
return (
30-
<a
31-
href={`https://github.com/` + `${tester.username}`}
32-
target="_blank"
33-
rel="noopener noreferrer"
34-
// Allows ATs to read the number of
35-
// completed tests when tabbing to this
36-
// link
37-
aria-describedby={id}
38-
>
39-
{tester.username}
40-
</a>
41-
);
42-
}
43-
};
26+
let info;
27+
let completionStatus;
4428

45-
const renderTestCompletionStatus = () => {
46-
if (tester.isBot) {
47-
return (
48-
<BotTestCompletionStatus
49-
id={id}
50-
testPlanRun={testPlanRun}
51-
runnableTestsLength={runnableTestsLength}
52-
/>
53-
);
54-
} else if (testPlanRunPreviouslyAutomated) {
55-
return (
56-
<PreviouslyAutomatedTestCompletionStatus
57-
id={id}
58-
testPlanRunId={testPlanRun.id}
59-
runnableTestsLength={runnableTestsLength}
60-
/>
61-
);
62-
} else {
63-
return (
64-
<div id={id} className="text-secondary">
65-
{`${testResultsLength} of ${runnableTestsLength} tests complete`}
66-
</div>
67-
);
68-
}
69-
};
29+
if (isBot) {
30+
info = (
31+
<span>
32+
<FontAwesomeIcon icon={faRobot} />
33+
{username}
34+
</span>
35+
);
36+
completionStatus = (
37+
<BotTestCompletionStatus
38+
id={`BotTestCompletionStatus_${rowId}`}
39+
testPlanRun={testPlanRun}
40+
runnableTestsLength={testPlanReport.runnableTestsLength}
41+
/>
42+
);
43+
} else {
44+
info = (
45+
<a
46+
href={`https://github.com/${username}`}
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
>
50+
{username}
51+
</a>
52+
);
53+
54+
completionStatus = testPlanRunPreviouslyAutomated ? (
55+
<PreviouslyAutomatedTestCompletionStatus
56+
id={`PreviouslyAutomatedTestCompletionStatus_${rowId}`}
57+
testPlanRunId={testPlanRun.id}
58+
runnableTestsLength={testPlanReport.runnableTestsLength}
59+
/>
60+
) : (
61+
<em>
62+
{`${testPlanRun.testResultsLength} of ` +
63+
`${testPlanReport.runnableTestsLength} tests complete`}
64+
</em>
65+
);
66+
}
7067

7168
return (
72-
<li className="mb-2 text-nowrap">
73-
{renderTesterInfo()}
74-
{renderTestCompletionStatus()}
69+
<li className={testQueueStyles.completionStatusListItem}>
70+
{info}
71+
{completionStatus}
7572
</li>
7673
);
7774
};
7875

7976
TestQueueCompletionStatusListItem.propTypes = {
80-
runnableTestsLength: PropTypes.number.isRequired,
77+
rowId: PropTypes.string.isRequired,
78+
testPlanReport: TestPlanReportPropType.isRequired,
8179
testPlanRun: TestPlanRunPropType.isRequired,
82-
id: PropTypes.string.isRequired
80+
tester: UserPropType.isRequired
8381
};
8482

8583
export default TestQueueCompletionStatusListItem;

client/components/TestRun/index.jsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,9 @@ const TestRun = () => {
580580

581581
// check to see if form was successfully submitted, if so, return to top of summary document
582582
const forceFocusOnSave = await saveForm(true);
583-
if (forceFocusOnSave) if (titleRef.current) titleRef.current.focus();
583+
if (forceFocusOnSave) {
584+
if (titleRef.current) titleRef.current.focus();
585+
}
584586
}
585587
break;
586588
}
@@ -880,13 +882,18 @@ const TestRun = () => {
880882

881883
const handleAtAndBrowserDetailsModalCloseAction = () => {
882884
setIsShowingAtBrowserModal(false);
883-
if (isEditAtBrowserDetailsModalClick)
885+
if (
886+
isEditAtBrowserDetailsModalClick &&
887+
editAtBrowserDetailsButtonRef.current
888+
) {
884889
editAtBrowserDetailsButtonRef.current.focus();
890+
}
885891
};
886892

887893
const onThemedModalClose = () => {
888894
setShowThemedModal(false);
889-
editAtBrowserDetailsButtonRef.current.focus();
895+
if (editAtBrowserDetailsButtonRef.current)
896+
editAtBrowserDetailsButtonRef.current.focus();
890897
};
891898

892899
const renderTestContent = (testPlanReport, currentTest, heading) => {

client/tests/e2e/snapshots/saved/_account_settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h2>Admin Actions</h2>
9898
<button type="button" class="btn btn-primary">
9999
Import Latest Test Plan Versions
100100
</button>
101-
<p>Date of latest test plan version: April 9, 2025 18:39 UTC</p>
101+
<p>Date of latest test plan version: April 22, 2025 14:04 UTC</p>
102102
</section>
103103
</main>
104104
</div>

0 commit comments

Comments
 (0)