Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fbf8eef
Author: Stalgia Grigg <[email protected]>
Date:   Thu Dec 14 14:46:48 2023 -0800

    Clean up leftover import

commit 15c594a
Merge: 9c99b4f 56205a3
Author: Stalgia Grigg <[email protected]>
Date:   Thu Dec 14 14:29:54 2023 -0800

    Merge branch 'main' into automation-mvp-merged

commit 9c99b4f
Author: Stalgia Grigg <[email protected]>
Date:   Thu Dec 14 14:20:15 2023 -0800

    Remove aria-at git commit cut off date

commit 56205a3
Author: Howard Edwards <[email protected]>
Date:   Thu Dec 14 11:44:34 2023 -0500

    Update tests (mock data and FilterButtons.test.jsx) and formatting of frontend components (#867)

commit d63609d
Author: Stalgia Grigg <[email protected]>
Date:   Wed Dec 13 16:16:26 2023 -0800

    Fixes after merge

commit 8ff6e6b
Merge: 2e62661 8215cb9
Author: Stalgia Grigg <[email protected]>
Date:   Wed Dec 13 15:03:10 2023 -0800

    Merge branch 'main' into automation-mvp-rebase-attempt

commit 8215cb9
Author: Stalgia Grigg <[email protected]>
Date:   Tue Dec 12 07:59:44 2023 -0800

    Trap backwards navigation from initial focus on header in focus-trapped modals (#851)

    * Add unit test for reverse navigation from initial focused header, FocusTrapper

    * Update unit tests for FocusTrapper, handle backwards navigation from initially focused header

    * Handle focus leaving non-focusable header element backwards in FocusTrapper

commit 918acdd
Author: Alexander Flenniken <[email protected]>
Date:   Mon Dec 11 17:20:55 2023 -0500

    Allow candidate test plans to advance with override (#832)

    * Allow candidate test plans to advance

    * Implement PR feedback

commit 135e61b
Author: Alexander Flenniken <[email protected]>
Date:   Mon Dec 11 16:59:00 2023 -0500

    Polish test review v2 page (#861)

    * Polish test review v2 page

    * Remove unused variable

commit 234a339
Author: Alexander Flenniken <[email protected]>
Date:   Thu Dec 7 14:57:42 2023 -0500

    Update CONTRIBUTING.md (#859)

commit 460b29c
Author: alflennik <[email protected]>
Date:   Thu Dec 7 13:26:17 2023 -0500

    Update contributing.md

commit 457caea
Author: Howard Edwards <[email protected]>
Date:   Tue Dec 5 16:04:23 2023 -0500

    Check for v2 testFormatVersion where applicable and hide link (#855)

commit 6962cef
Author: Howard Edwards <[email protected]>
Date:   Tue Dec 5 15:36:41 2023 -0500

    Support v2 Test Format in import script and page changes (#840)

    * Update client/resources

    * Update import script to support v2 test format import

    * Update import script to include flattened commandsV2.json and add uniquely generated scenario and assertion IDs

    * Updating client and server files to support V2 test format

    * Remove console.log and add TODO

    * Include tokenized assertionStatement in TestPlanVersion.tests[x].assertions

    * Add retrieveCommands utility

    * Update candidate review and datamanagement page

    * Update Reports/queries to also include mayOptionalAssertionResults

    * Add support for AtMode and and referencing appropriate screen text in testsResolver

    * Remove console log

    * Fix edge case issue when saving test result and add priority standardizing utility

    * Add assertions checks for may assertions

    * Update getMetrics utils

    * Update test-import to account for single {at}-focused .collected file

    * Address file error

    * Fix tests

    * Update import branch

    * Fix edge case crash when viewing CandidateTestPlanRun

    * Update tests and prepare support for testing v2 format test plan versions

    * Update tests

    * Update workflow

    * Clarifying comment

    * Update runtest.yml to exclude v2 test format import

    * Update server/resolvers/TestPlanVersion/testsResolver.js

    Remove unnecessary `at.settings` check

    Co-authored-by: Stalgia Grigg <[email protected]>

    * Clearer differences between v1 and v2 test format tests being imported

    * Include typedef for RenderableContent

    * Update thrown error message when missing commands.json (v2)

    * Additional check for flattenObject

    * Fix bug found after rebase and update jsdoc on 'retrieveAttributes'

    * Updating Test Run page to support #743

    * Update Test Run page instructions for v2 test format

    * Add react-html-parser; update InstructionsRenderer

    * Use testPlanVersion.metadata.testFormatVersion

    * Stop defaulting testFormatVersion to 1

    * Stop using NumberedList

    * Update client/components/TestRenderer/utils.js

    Co-authored-by: Stalgia Grigg <[email protected]>

    * Define instructions variables

    * Prepend tests with 'Test {number}' on reports page

    * Address CG comments

    * Address PR feedback

    * Consistency

    * Passed/failed for assertion results in TestRenderer

    * Update test plan report conflict calculation to support pass/fail assertion results

    * Correct assertion legend, margin right for checkbox

    * Update inline snapshot for test queue

    * Remove failedReason

    * Update server/resolvers/TestResultOperations/saveTestResultCommon.js

    Co-authored-by: Howard Edwards <[email protected]>

    * Fix linting issue in saveTestResultCommon

    * Undo change to checkAssertionResult

    * Consistency

    * Do radio group and supporting docs

    * Revert "Do radio group and supporting docs"

    This reverts commit 579f545.

    * Revert aria-at import branch

    ---------

    Co-authored-by: Paul Clue <[email protected]>
    Co-authored-by: Stalgia Grigg <[email protected]>

commit 703b01f
Author: jugglinmike <[email protected]>
Date:   Tue Dec 5 12:25:21 2023 -0500

    Do not render zeros in place of omitted content (#852)

    By relying on the "truthiness" of Number values to short-circuit boolean
    expressions, some rendering logic produced the text "0" instead of
    omitting any markup at all.

    Replace the expressions whose value could be coerced to booleans with
    expressions which directly evaluate to "fallback" values that do not
    produce markup (i.e. `false` or an empty array).

commit 7783342
Author: Stalgia Grigg <[email protected]>
Date:   Mon Dec 4 15:34:10 2023 -0800

    Revert "Handle focus leaving non-focusable header element backwards in FocusTrapper"

    This reverts commit 57012cb.

commit 57012cb
Author: Stalgia Grigg <[email protected]>
Date:   Mon Dec 4 14:05:57 2023 -0800

    Handle focus leaving non-focusable header element backwards in FocusTrapper

commit 477abcb
Author: Howard Edwards <[email protected]>
Date:   Wed Nov 29 10:10:10 2023 -0500

    Remove additional css meant for now removed 'skipped' view (#848)

commit dba7f40
Author: Alexander Flenniken <[email protected]>
Date:   Tue Nov 28 14:37:24 2023 -0500

    Implement Test Review in React (#846)

    * Implement client-side version of test-review

    * PR polish

    * Add additional specification features

    * Additional minor polish

    * PR feedback

commit b98852b
Author: Paul Clue <[email protected]>
Date:   Wed Nov 22 15:48:57 2023 -0500

    No longer mark test plan reports with skipped tests as final (#833)

    * Hide mark as final button

    * No mark as final for skipped tests in graphql

    * Remove skipped tests from the UI

    * Add migration for unfinished tests

    * Simplify necessary files

    * Fix failing tests

    * Add code review fixes

    * Remove no-longer-necessary style class

    * Remove reference

commit c29bea9
Merge: c101ecc c1bf56a
Author: Stalgia Grigg <[email protected]>
Date:   Tue Nov 21 09:41:04 2023 -0800

    Merge pull request #844 from w3c/fix-at-selection-dropdown

    Fix Data management page crash when Adding Test Plans to the Test Queue and Opening Assistive Technology select to pick any option

commit c101ecc
Merge: 878fe80 50cd6c8
Author: Stalgia Grigg <[email protected]>
Date:   Tue Nov 21 09:40:43 2023 -0800

    Merge pull request #837 from w3c/accessible-name-test-plan-report-status-dialog

    Fix aria-labeledby for BasicModal/BasicThemedModal

commit 878fe80
Author: Paul Clue <[email protected]>
Date:   Mon Nov 20 15:08:58 2023 -0500

    Fix empty version strings on Data Management and Test Queue pages (#839)

    * Add versionString to mutation

    * Remove comments

    * Fix similar issue happening on the Test Queue page when assigning and removing testers and also removing test results

    ---------

    Co-authored-by: Howard Edwards <[email protected]>

commit a5f0e80
Author: Alexander Flenniken <[email protected]>
Date:   Mon Nov 20 15:01:45 2023 -0500

    Implement target date modal improvements (#835)

    * Implement target date modal improvements

    * Add esc support to target date modal

commit c1bf56a
Author: Stalgia Grigg <[email protected]>
Date:   Thu Nov 16 11:29:56 2023 -0800

    Update DataManagement test mock

commit 9319e37
Author: Stalgia Grigg <[email protected]>
Date:   Thu Nov 16 11:16:37 2023 -0800

    Remove browsers from query and state in TestQueue and DataManagement in favor of at.browsers

commit 7dd31e1
Author: Stalgia Grigg <[email protected]>
Date:   Thu Nov 16 11:07:46 2023 -0800

    Fix bug that causes crash on DataManagement page ManageTestQueue AT dropdown

commit 50cd6c8
Author: Stalgia Grigg <[email protected]>
Date:   Wed Nov 8 16:01:23 2023 -0800

    Unit test for aria-labeledby on BasicModal

commit c1e7f0f
Author: Stalgia Grigg <[email protected]>
Date:   Wed Nov 8 15:42:55 2023 -0800

    Fix aria-labeledby in both BasicModal and BasicThemedModal
  • Loading branch information
stalgiag committed Dec 14, 2023
1 parent 44386da commit b9a7bb3
Show file tree
Hide file tree
Showing 102 changed files with 4,672 additions and 2,887 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/runtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
yarn sequelize:test db:seed:all
yarn workspace server db-import-tests:test -c ${IMPORT_ARIA_AT_TESTS_COMMIT_1}
yarn workspace server db-import-tests:test -c ${IMPORT_ARIA_AT_TESTS_COMMIT_2}
yarn workspace server db-import-tests:test
yarn workspace server db-import-tests:test -c ${IMPORT_ARIA_AT_TESTS_COMMIT_3}
yarn workspace server db-populate-sample-data:test
- name: test
run: yarn test
Expand Down
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ We want to make contributing to this project as approachable and transparent as
ARIA-AT App is maintained by [Bocoup](https://bocoup.com/) and designed and developed with the [W3C ARIA-AT Community Group](https://www.w3.org/community/aria-at/).

## Code of Conduct
This project is governed by the [Bocoup](https://github.com/w3c/aria-at-app/blob/develop/CODE_OF_CONDUCT.md) and [W3C](https://www.w3.org/Consortium/cepc/) Codes of Conduct
This project is governed by the [Bocoup](https://github.com/w3c/aria-at-app/blob/develop/CODE_OF_CONDUCT.md) and [W3C](https://www.w3.org/Consortium/cepc/) Codes of Conduct.

## Development Process
We use GitHub to host code, track issues and feature requests, and accept pull requests.
Expand All @@ -16,10 +16,11 @@ If your issue relates to a specific ARIA-AT test plan or the behavior of the ARI
## Pull Requests
Pull requests are the best way to propose changes to the codebase. We use [GitHub Flow](https://guides.github.com/introduction/flow/index.html) as a development methodology.

If the pull request is not a bug fix, an implementation proposal should first be submitted via a new issue, in order to reach consensus with the maintainers on scope, technical approach, and design implications.
If the pull request is not a bug fix, an implementation proposal should first be submitted via a new issue, in order to reach consensus with the maintainers on scope, technical approach, and design implications.

Implementation proposals and pull requests that affect the overall design or user experience of the app may require a design review before implementation.

Pull requests should be small and granular, ideally addressing one issue or feature at a time. Try to keep each pull request independently mergeable. Multiple dependent PRs should only be used when absolutely necessary to land a longer term change.
Pull requests should be small and granular, ideally addressing one issue or feature at a time. Try to keep each pull request independently mergeable. Multiple dependent PRs should only be used when absolutely necessary to land a longer-term change.

In order to open a pull request:

Expand All @@ -30,11 +31,14 @@ In order to open a pull request:
1. If the pull request is not a bug fix, please link to the related implementation proposal and consensus issue.
1. Submit a pull request!

Maintainers with write access to the repository will create branches directly within the repository.

## Reviewing pull requests, merging, and deploying
All pull requests, including pull requests opened by maintainers, require code review from two maintainers before merging.

The second maintainer who reviews is responsible for merging the pull request into the protected `main` branch.

All pull requests require code review from a maintainer before merging.
Maintainers are responsible for merging pull requests into the protected `main` branch.
Maintainers will periodically deploy the `main` branch to the [staging environments](https://github.com/w3c/aria-at-app/wiki).

## License
When you submit code changes, your submissions are understood to be under the same [W3C Document License](https://github.com/w3c/aria-at-app/blob/main/LICENSE.md) that covers the project. Feel free to contact the maintainers if that's a concern.
When you submit code changes, your submissions are understood to be under the same [W3C Document License](https://github.com/w3c/aria-at-app/blob/main/LICENSE.md) that covers the project.
11 changes: 8 additions & 3 deletions client/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ const App = () => {
<Nav.Link
as={Link}
to="/data-management"
aria-current={location.pathname.startsWith(
'/data-management'
)}
aria-current={
location.pathname.startsWith(
'/data-management'
) ||
location.pathname.startsWith(
'/test-review'
)
}
>
Data Management
</Nav.Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import nextId from 'react-id-generator';
import styled from '@emotion/styled';
import { Button } from 'react-bootstrap';
import { unescape } from 'lodash';
import { parseListContent } from '../../TestRenderer/utils';
import {
userCloseWindow,
userOpenWindow
Expand All @@ -13,14 +14,8 @@ import {
} from '../../../resources/aria-at-test-io-format.mjs';
import { TestWindow } from '../../../resources/aria-at-test-window.mjs';
import { evaluateAtNameKey } from '../../../utils/aria.js';

const Container = styled.div`
padding: 20px;
`;

const Heading = styled.h2`
margin: 0 0 0.5em 0;
`;
import commandsJson from '../../../resources/commands.json';
import supportJson from '../../../resources/support.json';

const NumberedList = styled.ol`
counter-reset: numbered-list;
Expand Down Expand Up @@ -49,21 +44,16 @@ const NumberedList = styled.ol`
}
`;

const BulletList = styled.ul`
padding-inline-start: 2.5rem;
list-style-type: circle;
> li {
display: list-item;
list-style: circle;
}
`;

const InstructionsRenderer = ({ testResult, testPageUrl, at }) => {
const { test = {} } = testResult;
const InstructionsRenderer = ({
test,
testPageUrl,
at,
headingLevel = 2,
testFormatVersion
}) => {
const { renderableContent } = test;
const [testRunExport, setTestRunExport] = useState();
const [instructionsContent, setInstructionsContent] = useState({
const [pageContent, setPageContent] = useState({
instructions: {
assertions: { assertions: [] },
instructions: {
Expand All @@ -78,6 +68,7 @@ const InstructionsRenderer = ({ testResult, testPageUrl, at }) => {
const testRunIO = new TestRunInputOutput();
const configQueryParams = [['at', evaluateAtNameKey(at.name)]];

testRunIO.setAllCommandsInputFromJSON(commandsJson);
await testRunIO.setInputsFromCollectedTestAsync(renderableContent);
testRunIO.setConfigInputFromQueryParamsAndSupport(configQueryParams);

Expand Down Expand Up @@ -123,117 +114,81 @@ const InstructionsRenderer = ({ testResult, testPageUrl, at }) => {

useEffect(() => {
if (testRunExport) {
setInstructionsContent(testRunExport.instructions());
setPageContent(testRunExport.instructions());
}
}, [testRunExport]);

const parseRichContent = (instruction = []) => {
let content = null;
for (let value of instruction) {
if (typeof value === 'string') {
if (value === '.')
content = (
<>
{content}
{value}
</>
);
else
content = content = (
<>
{content} {value}
</>
);
} else if ('href' in value) {
const { href, description } = value;
content = (
<>
{content} <a href={href}>{description}</a>
</>
);
}
}
return content;
};

const parseListContent = (instructions = [], commandsContent = null) => {
return instructions.map((value, index) => {
if (typeof value === 'string')
return (
<li key={nextId()}>
{value}
{commandsContent &&
index === instructions.length - 1 && (
<BulletList>{commandsContent}</BulletList>
)}
</li>
);
else if (Array.isArray(value))
return (
<li key={nextId()}>
{parseRichContent(value)}
{commandsContent &&
index === instructions.length - 1 && (
<BulletList>{commandsContent}</BulletList>
)}
</li>
);
});
};

const allInstructions = [
...instructionsContent.instructions.instructions.instructions,
...instructionsContent.instructions.instructions.strongInstructions,
instructionsContent.instructions.instructions.commands.description
];

const commands =
instructionsContent.instructions.instructions.commands.commands;
let allInstructions;
const isV2 = testFormatVersion === 2;

if (isV2) {
const commandSettingSpecified = renderableContent.commands.some(
({ settings }) => settings && settings !== 'defaultMode'
);

const defaultInstructions =
renderableContent.target.at.raw
.defaultConfigurationInstructionsHTML;
const setupScriptDescription = `${supportJson.testPlanStrings.openExampleInstruction} ${renderableContent.target.setupScript.scriptDescription}`;
const testInstructions = renderableContent.instructions.instructions;
const settingsInstructions = `${
supportJson.testPlanStrings.commandListPreface
}${
commandSettingSpecified
? ` ${supportJson.testPlanStrings.commandListSettingsPreface}`
: ''
}`;

allInstructions = [
defaultInstructions,
setupScriptDescription + '.',
testInstructions + ' ' + settingsInstructions
].map(e => unescape(e));
} else {
allInstructions = [
...pageContent.instructions.instructions.instructions,
...pageContent.instructions.instructions.strongInstructions,
pageContent.instructions.instructions.commands.description
];
}

const commands = pageContent.instructions.instructions.commands.commands;
const commandsContent = parseListContent(commands);

const allInstructionsContent = parseListContent(
allInstructions,
commandsContent
);

const assertions = [
...instructionsContent.instructions.assertions.assertions
];

const assertions = [...pageContent.instructions.assertions.assertions];
const assertionsContent = parseListContent(assertions);

const Heading = `h${headingLevel}`;

return (
<Container>
<p>{instructionsContent.instructions.description}</p>
<Heading>
{instructionsContent.instructions.instructions.header}
</Heading>
<>
<NumberedList>{allInstructionsContent}</NumberedList>
<Heading>
{instructionsContent.instructions.assertions.header}
</Heading>
{instructionsContent.instructions.assertions.description}
<Heading>{pageContent.instructions.assertions.header}</Heading>
{pageContent.instructions.assertions.description}
<NumberedList>{assertionsContent}</NumberedList>
<Button
disabled={
!instructionsContent.instructions.openTestPage.enabled
}
onClick={instructionsContent.instructions.openTestPage.click}
disabled={!pageContent.instructions.openTestPage.enabled}
onClick={pageContent.instructions.openTestPage.click}
>
{instructionsContent.instructions.openTestPage.button}
{pageContent.instructions.openTestPage.button}
</Button>
</Container>
</>
);
};

InstructionsRenderer.propTypes = {
testResult: PropTypes.shape({
test: PropTypes.object.isRequired
}),
test: PropTypes.object.isRequired,
testPageUrl: PropTypes.string,
at: PropTypes.shape({
name: PropTypes.string.isRequired
})
}),
testFormatVersion: PropTypes.number,
headingLevel: PropTypes.number
};

export default InstructionsRenderer;
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,11 @@ const CandidateTestPlanRun = () => {
<InstructionsRenderer
key={`instructions-${currentTest.id}`}
at={testPlanReport.at}
testResult={{
scenarioResults: {},
test: currentTest,
completedAt: new Date()
}}
test={currentTest}
testPageUrl={testPlanReport.testPlanVersion.testPageUrl}
testFormatVersion={
testPlanVersion.metadata.testFormatVersion
}
/>,
...testPlanReports.map(testPlanReport => {
const testResult =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const CANDIDATE_REPORTS_QUERY = gql`
testPlanVersionPhases: [CANDIDATE]
testPlanVersionId: $testPlanVersionId
testPlanVersionIds: $testPlanVersionIds
isFinal: true
) {
id
vendorReviewStatus
Expand Down Expand Up @@ -113,7 +114,6 @@ export const CANDIDATE_REPORTS_QUERY = gql`
text
}
passed
failedReason
}
requiredAssertionResults: assertionResults(
priority: REQUIRED
Expand All @@ -122,7 +122,6 @@ export const CANDIDATE_REPORTS_QUERY = gql`
text
}
passed
failedReason
}
optionalAssertionResults: assertionResults(
priority: OPTIONAL
Expand All @@ -131,7 +130,12 @@ export const CANDIDATE_REPORTS_QUERY = gql`
text
}
passed
failedReason
}
mayAssertionResults: assertionResults(priority: MAY) {
assertion {
text
}
passed
}
unexpectedBehaviors {
id
Expand Down
Loading

0 comments on commit b9a7bb3

Please sign in to comment.