Skip to content

Commit a63a253

Browse files
authored
Merge pull request #1239 from w3c/releases
October 10, 2024 Production Release Includes changes recently included in the [releases branch](https://github.com/w3c/aria-at-app/tree/releases) through #1238. [Latest CHANGELOG.md update: v1.9.1](https://github.com/w3c/aria-at-app/blob/releases/CHANGELOG.md#191-2024-10-10)
2 parents 1f87b26 + 9c4e1e9 commit a63a253

File tree

6 files changed

+68
-10
lines changed

6 files changed

+68
-10
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### [1.9.1](https://github.com/w3c/aria-at-app/compare/v1.9.0...v1.9.1) (2024-10-10)
2+
3+
4+
### Bug Fixes
5+
6+
* Only include CollectionJob metrics in Bot Status calculation on Test Queue page when `tester.isBot` is true ([#1237](https://github.com/w3c/aria-at-app/issues/1237)) ([84e0bd0](https://github.com/w3c/aria-at-app/commit/84e0bd0b46e80bea8c5c43eae3b5b4e6ffdce5b9))
7+
18
## [1.9.0](https://github.com/w3c/aria-at-app/compare/v1.8.1...v1.9.0) (2024-10-09)
29

310

client/components/BotRunTestStatusList/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ const BotRunTestStatusList = ({ testPlanReportId }) => {
6060
};
6161
let anyPossibleUpdates = false;
6262
if (testPlanRunsQueryResult?.testPlanRuns) {
63-
for (const { collectionJob } of testPlanRunsQueryResult.testPlanRuns) {
64-
if (collectionJob?.testStatus) {
63+
for (const {
64+
collectionJob,
65+
tester
66+
} of testPlanRunsQueryResult.testPlanRuns) {
67+
if (collectionJob?.testStatus && tester?.isBot) {
6568
for (const { status } of collectionJob.testStatus) {
6669
counter[status]++;
6770
if (status === 'QUEUED' || status === 'RUNNING') {

client/components/BotRunTestStatusList/queries.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const TEST_PLAN_RUNS_TEST_RESULTS_QUERY = gql`
66
id
77
tester {
88
username
9+
isBot
910
}
1011
testResults {
1112
id

client/tests/BotRunTestStatusList.test.jsx

+52-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('correctly displays statuses for single COMPLETED test run', async () => {
2626
{
2727
id: '0',
2828
testResults: new Array(3).fill(null),
29-
tester: { username: 'bot' },
29+
tester: { username: 'bot', isBot: true },
3030
collectionJob: {
3131
status: COLLECTION_JOB_STATUS.COMPLETED,
3232
testStatus: [
@@ -59,7 +59,7 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
5959
{
6060
id: '0',
6161
testResults: new Array(2).fill(null),
62-
tester: { username: 'bot' },
62+
tester: { username: 'bot', isBot: true },
6363
collectionJob: {
6464
status: COLLECTION_JOB_STATUS.COMPLETED,
6565
testStatus: [
@@ -71,7 +71,7 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
7171
{
7272
id: '1',
7373
testResults: new Array(2).fill(null),
74-
tester: { username: 'human' },
74+
tester: { username: 'human', isBot: false },
7575
collectionJob: null
7676
}
7777
];
@@ -90,12 +90,58 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
9090
});
9191
});
9292

93+
// See gh-1237 - Check if user is a bot, to include in Bot Status calculation on Test Queue page
94+
// https://github.com/w3c/aria-at-app/pull/1237
95+
test('correctly ignores test results from a human-submitted test plan run with a collectionJob attribute', async () => {
96+
const testPlanRuns = [
97+
{
98+
id: '0',
99+
testResults: new Array(3).fill(null),
100+
tester: { username: 'bot', isBot: true },
101+
collectionJob: {
102+
status: COLLECTION_JOB_STATUS.COMPLETED,
103+
testStatus: [
104+
{ status: COLLECTION_JOB_STATUS.COMPLETED },
105+
{ status: COLLECTION_JOB_STATUS.COMPLETED },
106+
{ status: COLLECTION_JOB_STATUS.COMPLETED }
107+
]
108+
}
109+
},
110+
{
111+
id: '1',
112+
testResults: new Array(3).fill(null),
113+
tester: { username: 'human', isBot: false },
114+
collectionJob: {
115+
status: COLLECTION_JOB_STATUS.COMPLETED,
116+
testStatus: [
117+
{ status: COLLECTION_JOB_STATUS.COMPLETED },
118+
{ status: COLLECTION_JOB_STATUS.COMPLETED },
119+
{ status: COLLECTION_JOB_STATUS.COMPLETED }
120+
]
121+
}
122+
}
123+
];
124+
125+
const mocks = getMocks(testPlanRuns);
126+
127+
const { getByText } = render(
128+
<MockedProvider mocks={mocks} addTypename={false}>
129+
<BotRunTestStatusList testPlanReportId="1" />
130+
</MockedProvider>
131+
);
132+
133+
await waitFor(async () => {
134+
expect(getByText('3 Tests Completed')).toBeInTheDocument();
135+
expect(getByText('0 Tests Queued')).toBeInTheDocument();
136+
});
137+
});
138+
93139
test('correctly displays statuses for CANCELLED test run', async () => {
94140
const testPlanRuns = [
95141
{
96142
id: '0',
97143
testResults: new Array(2).fill(null),
98-
tester: { username: 'bot' },
144+
tester: { username: 'bot', isBot: true },
99145
collectionJob: {
100146
status: COLLECTION_JOB_STATUS.CANCELLED,
101147
testStatus: [
@@ -127,7 +173,7 @@ test('correctly displays statuses for multiple RUNNING and QUEUED test runs', as
127173
{
128174
id: '0',
129175
testResults: new Array(2).fill(null),
130-
tester: { username: 'bot' },
176+
tester: { username: 'bot', isBot: true },
131177
collectionJob: {
132178
status: COLLECTION_JOB_STATUS.RUNNING,
133179
testStatus: [
@@ -140,7 +186,7 @@ test('correctly displays statuses for multiple RUNNING and QUEUED test runs', as
140186
{
141187
id: '1',
142188
testResults: new Array(2).fill(null),
143-
tester: { username: 'bot' },
189+
tester: { username: 'bot', isBot: true },
144190
collectionJob: {
145191
status: COLLECTION_JOB_STATUS.CANCELLED,
146192
testStatus: [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aria-at-app",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "Run ARIA-AT tests and report results",
55
"main": "server/index.js",
66
"private": true,

testers.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ stevefaulkner
3535
stalgiag
3636
gnarf
3737
Paul-Clue
38-
tactics2
38+
tactics2
39+
thinkbulecount2

0 commit comments

Comments
 (0)