Skip to content

Commit 5fa4e42

Browse files
authored
Merge pull request #1373 from w3c/development
Create April 10, 2025 Release Includes the following changes: * #1361 * #1372, which addresses #1371
2 parents 591d7cf + 0d1c2ee commit 5fa4e42

File tree

16 files changed

+182
-198
lines changed

16 files changed

+182
-198
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
.bot-run-test-container {
22
font-size: var(--14px) !important;
3-
padding: 0.5rem 0;
3+
padding: 0.5rem;
44
margin: 0.5rem 0;
55

66
background: var(--bg-lighter-gray);
77
border-radius: 0.25rem;
88

9+
text-align: left;
910
white-space: nowrap;
11+
12+
ul {
13+
margin: 0;
14+
}
1015
}

client/components/BotRunTestStatusList/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useMemo } from 'react';
22
import PropTypes from 'prop-types';
3+
import clsx from 'clsx';
34
import { TEST_PLAN_RUNS_TEST_RESULTS_QUERY } from './queries';
45
import { useQuery } from '@apollo/client';
56
import ReportStatusDot, { REPORT_STATUSES } from '../common/ReportStatusDot';
@@ -79,9 +80,9 @@ const BotRunTestStatusList = ({ testPlanReportId }) => {
7980

8081
return (
8182
<>
82-
<div className={styles.botRunTestContainer}>
83+
<div className={clsx(styles.botRunTestContainer, 'text-secondary')}>
8384
Bot Status:
84-
<ul className="text-secondary">
85+
<ul>
8586
{RUNNING > 0 && (
8687
<li>
8788
<ReportStatusDot status={REPORT_STATUSES.TESTS_RUNNING} />

client/components/ManageBotRunDialog/ManageBotRunDialog.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.manage-bot-run-dialog {
2+
.assign-testers-dropdown-button {
3+
margin-right: 0;
4+
}
5+
6+
.modal-footer button:not([role='menuitemcheckbox']) {
7+
font-size: var(--12px);
8+
}
9+
}

client/components/ManageBotRunDialog/RetryCanceledCollectionsButton/index.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ const RetryCanceledCollectionsButton = ({
99
collectionJob,
1010
onClick = () => {}
1111
}) => {
12+
const [retryCanceledCollections] = useMutation(RETRY_CANCELED_COLLECTIONS, {
13+
variables: { collectionJobId: collectionJob.id },
14+
skip: !collectionJob
15+
});
16+
1217
if (!collectionJob) {
1318
return null;
1419
}
1520

16-
const [retryCanceledCollections] = useMutation(RETRY_CANCELED_COLLECTIONS, {
17-
variables: { collectionJobId: collectionJob.id }
18-
});
19-
2021
const handleClick = async () => {
2122
await retryCanceledCollections();
2223
await onClick();

client/components/ManageBotRunDialog/StopRunningCollectionButton/index.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ import { LoadingStatus, useTriggerLoad } from '../../common/LoadingStatus';
77
import { CollectionJobPropType } from '../../common/proptypes';
88

99
const StopRunningCollectionButton = ({ collectionJob, onClick = () => {} }) => {
10-
if (!collectionJob) {
11-
return null;
12-
}
13-
1410
const { triggerLoad, loadingMessage } = useTriggerLoad();
1511

1612
const [cancelCollectionJob] = useMutation(CANCEL_COLLECTION_JOB, {
1713
variables: {
1814
collectionJobId: collectionJob.id
19-
}
15+
},
16+
skip: !collectionJob
2017
});
2118

19+
if (!collectionJob) {
20+
return null;
21+
}
22+
2223
const handleClick = async () => {
2324
await triggerLoad(async () => {
2425
await cancelCollectionJob();

client/components/ManageBotRunDialog/index.jsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useMemo, useState } from 'react';
22
import PropTypes from 'prop-types';
3+
import clsx from 'clsx';
34
import BasicModal from '../common/BasicModal';
45
import AssignTesterDropdown from '../common/AssignTesterDropdown';
56
import { useMutation, useQuery } from '@apollo/client';
@@ -10,14 +11,13 @@ import {
1011
} from './queries';
1112
import DeleteButton from '../common/DeleteButton';
1213
import BotRunTestStatusList from '../BotRunTestStatusList';
13-
14-
import './ManageBotRunDialog.css';
1514
import MarkBotRunFinishedButton from './MarkBotRunFinishedButton';
1615
import RetryCanceledCollectionsButton from './RetryCanceledCollectionsButton';
1716
import StopRunningCollectionButton from './StopRunningCollectionButton';
1817
import ViewLogsButton from './ViewLogsButton';
1918
import { TestPlanRunPropType, UserPropType } from '../common/proptypes';
2019
import { COLLECTION_JOB_STATUS } from '../../utils/collectionJobStatus';
20+
import styles from './ManageBotRunDialog.module.css';
2121

2222
const ManageBotRunDialog = ({
2323
testPlanReportId,
@@ -103,14 +103,18 @@ const ManageBotRunDialog = ({
103103
}
104104
},
105105
{
106-
component: StopRunningCollectionButton,
106+
component: collectionJobQuery?.collectionJobByTestPlanRunId
107+
? StopRunningCollectionButton
108+
: null,
107109
props: {
108110
collectionJob: collectionJobQuery?.collectionJobByTestPlanRunId,
109111
onClick: onChange
110112
}
111113
},
112114
{
113-
component: RetryCanceledCollectionsButton,
115+
component: collectionJobQuery?.collectionJobByTestPlanRunId
116+
? RetryCanceledCollectionsButton
117+
: null,
114118
props: {
115119
collectionJob: collectionJobQuery?.collectionJobByTestPlanRunId,
116120
onClick: onChange
@@ -151,10 +155,13 @@ const ManageBotRunDialog = ({
151155
</>
152156
);
153157
const content = (
154-
<BotRunTestStatusList
155-
testPlanReportId={testPlanReportId}
156-
runnableTestsLength={runnableTestsLength}
157-
/>
158+
<>
159+
View the bot&apos;s status and perform administrative bot actions.
160+
<BotRunTestStatusList
161+
testPlanReportId={testPlanReportId}
162+
runnableTestsLength={runnableTestsLength}
163+
/>
164+
</>
158165
);
159166

160167
return (
@@ -185,7 +192,7 @@ const ManageBotRunDialog = ({
185192
title={`Manage ${testPlanRun.tester?.username} Run`}
186193
cancelButton={false}
187194
content={content}
188-
dialogClassName="manage-bot-run-dialog"
195+
dialogClassName={clsx(styles.manageBotRunDialog, 'modal-60w')}
189196
actions={actions}
190197
/>
191198
</>

client/components/TestQueue/TestQueue.module.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ table.test-queue {
108108
.assign-testers-container {
109109
display: flex;
110110

111+
.dropdown-button-label {
112+
margin-right: var(--8px);
113+
}
114+
111115
[role='menu'] {
112-
width: 15.625rem;
113-
max-height: 12.5rem;
116+
width: 15rem;
117+
max-height: 8rem;
114118
overflow-y: scroll;
115119
}
116120

client/components/common/AssignTesterDropdown/AssignTesterDropdown.css

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

0 commit comments

Comments
 (0)