Skip to content

Commit

Permalink
Merge pull request #1239 from w3c/releases
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
howard-e authored Oct 10, 2024
2 parents 1f87b26 + 9c4e1e9 commit a63a253
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### [1.9.1](https://github.com/w3c/aria-at-app/compare/v1.9.0...v1.9.1) (2024-10-10)


### Bug Fixes

* 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))

## [1.9.0](https://github.com/w3c/aria-at-app/compare/v1.8.1...v1.9.0) (2024-10-09)


Expand Down
7 changes: 5 additions & 2 deletions client/components/BotRunTestStatusList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ const BotRunTestStatusList = ({ testPlanReportId }) => {
};
let anyPossibleUpdates = false;
if (testPlanRunsQueryResult?.testPlanRuns) {
for (const { collectionJob } of testPlanRunsQueryResult.testPlanRuns) {
if (collectionJob?.testStatus) {
for (const {
collectionJob,
tester
} of testPlanRunsQueryResult.testPlanRuns) {
if (collectionJob?.testStatus && tester?.isBot) {
for (const { status } of collectionJob.testStatus) {
counter[status]++;
if (status === 'QUEUED' || status === 'RUNNING') {
Expand Down
1 change: 1 addition & 0 deletions client/components/BotRunTestStatusList/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const TEST_PLAN_RUNS_TEST_RESULTS_QUERY = gql`
id
tester {
username
isBot
}
testResults {
id
Expand Down
58 changes: 52 additions & 6 deletions client/tests/BotRunTestStatusList.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('correctly displays statuses for single COMPLETED test run', async () => {
{
id: '0',
testResults: new Array(3).fill(null),
tester: { username: 'bot' },
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.COMPLETED,
testStatus: [
Expand Down Expand Up @@ -59,7 +59,7 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
{
id: '0',
testResults: new Array(2).fill(null),
tester: { username: 'bot' },
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.COMPLETED,
testStatus: [
Expand All @@ -71,7 +71,7 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
{
id: '1',
testResults: new Array(2).fill(null),
tester: { username: 'human' },
tester: { username: 'human', isBot: false },
collectionJob: null
}
];
Expand All @@ -90,12 +90,58 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
});
});

// See gh-1237 - Check if user is a bot, to include in Bot Status calculation on Test Queue page
// https://github.com/w3c/aria-at-app/pull/1237
test('correctly ignores test results from a human-submitted test plan run with a collectionJob attribute', async () => {
const testPlanRuns = [
{
id: '0',
testResults: new Array(3).fill(null),
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.COMPLETED,
testStatus: [
{ status: COLLECTION_JOB_STATUS.COMPLETED },
{ status: COLLECTION_JOB_STATUS.COMPLETED },
{ status: COLLECTION_JOB_STATUS.COMPLETED }
]
}
},
{
id: '1',
testResults: new Array(3).fill(null),
tester: { username: 'human', isBot: false },
collectionJob: {
status: COLLECTION_JOB_STATUS.COMPLETED,
testStatus: [
{ status: COLLECTION_JOB_STATUS.COMPLETED },
{ status: COLLECTION_JOB_STATUS.COMPLETED },
{ status: COLLECTION_JOB_STATUS.COMPLETED }
]
}
}
];

const mocks = getMocks(testPlanRuns);

const { getByText } = render(
<MockedProvider mocks={mocks} addTypename={false}>
<BotRunTestStatusList testPlanReportId="1" />
</MockedProvider>
);

await waitFor(async () => {
expect(getByText('3 Tests Completed')).toBeInTheDocument();
expect(getByText('0 Tests Queued')).toBeInTheDocument();
});
});

test('correctly displays statuses for CANCELLED test run', async () => {
const testPlanRuns = [
{
id: '0',
testResults: new Array(2).fill(null),
tester: { username: 'bot' },
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.CANCELLED,
testStatus: [
Expand Down Expand Up @@ -127,7 +173,7 @@ test('correctly displays statuses for multiple RUNNING and QUEUED test runs', as
{
id: '0',
testResults: new Array(2).fill(null),
tester: { username: 'bot' },
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.RUNNING,
testStatus: [
Expand All @@ -140,7 +186,7 @@ test('correctly displays statuses for multiple RUNNING and QUEUED test runs', as
{
id: '1',
testResults: new Array(2).fill(null),
tester: { username: 'bot' },
tester: { username: 'bot', isBot: true },
collectionJob: {
status: COLLECTION_JOB_STATUS.CANCELLED,
testStatus: [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aria-at-app",
"version": "1.9.0",
"version": "1.9.1",
"description": "Run ARIA-AT tests and report results",
"main": "server/index.js",
"private": true,
Expand Down
3 changes: 2 additions & 1 deletion testers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ stevefaulkner
stalgiag
gnarf
Paul-Clue
tactics2
tactics2
thinkbulecount2

0 comments on commit a63a253

Please sign in to comment.