Skip to content

Commit 260d04b

Browse files
authored
Merge pull request #1341 from w3c/development
Create March 17, 2025 Release Includes the following changes: * #1337, addresses #1306 * #1329 * #1327 * #1317 * #1318
2 parents ad777fa + a705888 commit 260d04b

File tree

17 files changed

+290
-155
lines changed

17 files changed

+290
-155
lines changed

.github/workflows/runtest.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@ on: [push]
44
jobs:
55
runtest_task:
66
name: Using NodeJS and Postgres 12
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout the repository
1010
uses: actions/checkout@v4
11-
- name: Install NodeJS 18
11+
- name: Install NodeJS 20
1212
uses: actions/setup-node@v4
1313
with:
14-
node-version: '18'
15-
cache: 'npm'
14+
node-version: 20
15+
cache: npm
1616
- run: yarn --version
17+
- name: Remove pre-bundled versions of postgres to avoid version clashes
18+
run: |
19+
sudo DEBIAN_FRONTEND=noninteractive apt-get purge -y postgresql\*
20+
sudo apt-get autoremove -y
21+
sudo rm -rf /var/lib/postgresql/
22+
sudo rm -rf /etc/postgresql/
1723
- name: Install PostgreSQL 12
1824
run: |
1925
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
20-
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list
26+
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2127
sudo apt-get -y update
2228
sudo apt-get -y install postgresql-12
2329
sudo apt-get -y install postgresql-client-12

.github/workflows/version-changelog-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
steps:
1818
- name: Checkout the repository
1919
uses: actions/checkout@v4
20-
- name: Install NodeJS 18
20+
- name: Install NodeJS 20
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 18
23+
node-version: 20
2424
cache: npm
2525
- name: Conventional Changelog Action
2626
uses: TriPSs/conventional-changelog-action@v3

client/components/ManageTestQueue/AddTestPlans.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const AddTestPlans = ({
162162
{matchingTestPlanVersions.length ? (
163163
matchingTestPlanVersions.map(item => (
164164
<option key={`${item.gitSha}-${item.id}`} value={item.id}>
165-
{dates.gitUpdatedDateToString(item.updatedAt)}{' '}
165+
{dates.convertDateToString(item.updatedAt, 'MMM D, YYYY')}{' '}
166166
{item.gitMessage} ({item.gitSha.substring(0, 7)})
167167
</option>
168168
))

client/components/TestPlanReportStatusDialog/index.jsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useMemo } from 'react';
22
import PropTypes from 'prop-types';
33
import AddTestToQueueWithConfirmation from '../AddTestToQueueWithConfirmation';
44
import { useQuery } from '@apollo/client';
@@ -26,9 +26,21 @@ const TestPlanReportStatusDialog = ({
2626

2727
const { testPlanReportStatuses } = testPlanVersion;
2828

29-
let requiredReports = 0;
29+
const { requiredReportsCount, sortedStatuses } = useMemo(() => {
30+
let requiredCount = 0;
3031

31-
const tableRows = testPlanReportStatuses.map(status => {
32+
const sorted = [...testPlanReportStatuses].sort(
33+
(a, b) => Number(b.isRequired) - Number(a.isRequired)
34+
);
35+
36+
sorted.forEach(status => {
37+
if (status.isRequired) requiredCount += 1;
38+
});
39+
40+
return { requiredReportsCount: requiredCount, sortedStatuses: sorted };
41+
}, [testPlanReportStatuses]);
42+
43+
const tableRows = sortedStatuses.map(status => {
3244
const {
3345
isRequired,
3446
at,
@@ -38,8 +50,6 @@ const TestPlanReportStatusDialog = ({
3850
testPlanReport
3951
} = status;
4052

41-
if (isRequired) requiredReports += 1;
42-
4353
const key =
4454
`${at.name}-${browser.name}-` +
4555
`${minimumAtVersion?.id ?? exactAtVersion?.id}-` +
@@ -105,7 +115,7 @@ const TestPlanReportStatusDialog = ({
105115
{phase[0] + phase.slice(1).toLowerCase()}
106116
</span>
107117
&nbsp;{reviewDescription}.&nbsp;
108-
<strong>{requiredReports} AT/browser&nbsp;</strong>
118+
<strong>{requiredReportsCount} AT/browser&nbsp;</strong>
109119
pairs {requirementNeedsDescription}.
110120
</p>
111121
)}

client/components/TestRun/TestNavigator.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ const TestNavigator = ({
3434
);
3535

3636
const shouldShowFailingAssertionsSummary = useMemo(() => {
37-
return isVendor && testPlanReport.metrics.assertionsFailedCount > 0;
37+
return (
38+
isVendor &&
39+
(testPlanReport.metrics.mustAssertionsFailedCount > 0 ||
40+
testPlanReport.metrics.shouldAssertionsFailedCount > 0)
41+
);
3842
}, [isVendor, testPlanReport]);
3943

4044
return (

client/hooks/useFailingAssertions.js

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,61 @@ export const useFailingAssertions = testPlanReport => {
99
return testPlanReport.finalizedTestResults.flatMap(
1010
(testResult, testIndex) => {
1111
return testResult.scenarioResults.flatMap(scenarioResult => {
12-
return (
13-
scenarioResult.assertionResults
14-
.filter(assertionResult => !assertionResult.passed)
15-
// We only want to show MUST and SHOULD assertions
16-
.filter(
17-
assertionResult =>
18-
assertionResult.assertion.priority !== 'MAY' &&
19-
assertionResult.assertion.priority !== 'EXCLUDE'
20-
)
21-
.map(assertionResult => ({
22-
testResultId: testResult.id,
23-
testIndex,
24-
testTitle: testResult.test.title,
25-
scenarioCommands: scenarioResult.scenario.commands
26-
.map(cmd => cmd.text)
27-
.join(', '),
28-
assertionText: assertionResult.assertion.text,
29-
priority: assertionResult.assertion.priority,
30-
output: scenarioResult.output
31-
}))
12+
const commonResult = {
13+
testResultId: testResult.id,
14+
testIndex,
15+
testTitle: testResult.test.title,
16+
scenarioCommands: scenarioResult.scenario.commands
17+
.map((cmd, index) => {
18+
if (index === scenarioResult.scenario.commands.length - 1) {
19+
return cmd.text;
20+
}
21+
// Prevent instances of duplicated setting in brackets.
22+
// eg. Down Arrow (virtual cursor active) then Down Arrow (virtual cursor active)
23+
//
24+
// Expectation is Down Arrow then Down Arrow (virtual cursor active), because the setting will always be
25+
// the same for the listed key combination.
26+
//
27+
// Some revision of how that key combination + setting is rendered may be useful
28+
return cmd.text.split(' (')[0];
29+
})
30+
.join(' then ')
31+
};
32+
33+
const assertionResults = scenarioResult.assertionResults
34+
.filter(assertionResult => !assertionResult.passed)
35+
// We only want to show MUST and SHOULD assertions
36+
.filter(
37+
assertionResult =>
38+
assertionResult.assertion.priority !== 'MAY' &&
39+
assertionResult.assertion.priority !== 'EXCLUDE'
40+
)
41+
.map(assertionResult => ({
42+
...commonResult,
43+
assertionText: assertionResult.assertion.text,
44+
priority: assertionResult.assertion.priority,
45+
output: scenarioResult.output
46+
}));
47+
48+
const unexpectedResults = scenarioResult.unexpectedBehaviors.map(
49+
unexpectedBehavior => ({
50+
...commonResult,
51+
assertionText:
52+
unexpectedBehavior.impact.toLowerCase() === 'moderate'
53+
? 'Other behaviors that create moderate negative impacts are not exhibited'
54+
: unexpectedBehavior.impact.toLowerCase() === 'severe'
55+
? 'Other behaviors that create severe negative impacts are not exhibited'
56+
: 'N/A',
57+
priority:
58+
unexpectedBehavior.impact.toLowerCase() === 'moderate'
59+
? 'SHOULD'
60+
: unexpectedBehavior.impact.toLowerCase() === 'severe'
61+
? 'MUST'
62+
: 'N/A',
63+
output: unexpectedBehavior.text
64+
})
3265
);
66+
return [...assertionResults, ...unexpectedResults];
3367
});
3468
}
3569
);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ <h2>Admin Actions</h2>
9999
<button type="button" class="btn btn-primary">
100100
Import Latest Test Plan Versions
101101
</button>
102-
<p>
103-
Date of latest test plan version: January 23, 2025 20:56 UTC
104-
</p>
102+
<p>Date of latest test plan version: March 6, 2025 19:25 UTC</p>
105103
</section>
106104
</div>
107105
</main>

client/tests/e2e/snapshots/saved/_candidate-review.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ <h3>
167167
style="justify-content: center"
168168
><i
169169
><b>3 assertions</b> failed across
170-
<b>2 tests</b> run with <b>1 browser</b></i
170+
<b>3 tests</b> run with <b>1 browser</b></i
171171
></span
172172
>
173173
</td>
@@ -241,7 +241,7 @@ <h3>
241241
style="justify-content: center"
242242
><i
243243
><b>3 assertions</b> failed across
244-
<b>2 tests</b> run with <b>1 browser</b></i
244+
<b>3 tests</b> run with <b>1 browser</b></i
245245
></span
246246
>
247247
</td>
@@ -317,7 +317,7 @@ <h3>
317317
style="justify-content: center"
318318
><i
319319
><b>3 assertions</b> failed across
320-
<b>2 tests</b> run with <b>1 browser</b></i
320+
<b>3 tests</b> run with <b>1 browser</b></i
321321
></span
322322
>
323323
</td>

client/tests/e2e/snapshots/saved/_candidate-test-plan_24_1#summary.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ <h1 id="failing-assertions-heading">
305305
<div
306306
class="failing-assertions-summary-table-container">
307307
<p>
308-
2 assertions failed across 26 commands in 2 tests.
308+
3 assertions failed across 26 commands in 3 tests.
309309
</p>
310310
<div class="table-responsive">
311311
<table
@@ -344,6 +344,21 @@ <h1 id="failing-assertions-heading">
344344
<td>Role 'button' is conveyed</td>
345345
<td>automatically seeded sample output</td>
346346
</tr>
347+
<tr>
348+
<td>
349+
<a href="/candidate-test-plan/24/1#5"
350+
>Close a modal dialog using a button in
351+
reading mode</a
352+
>
353+
</td>
354+
<td>Space</td>
355+
<td>SHOULD</td>
356+
<td>
357+
Other behaviors that create moderate
358+
negative impacts are not exhibited
359+
</td>
360+
<td>Other</td>
361+
</tr>
347362
</tbody>
348363
</table>
349364
</div>

0 commit comments

Comments
 (0)