+
+ Test Queue | ARIA-AT
+
+ Test Queue
+
+ {isSignedIn
+ ? 'Assign yourself a test plan or start executing one that is already assigned to you.'
+ : 'Select a test plan to view. Your results will not be saved.'}
+
+ {isAdmin && (
+
+ )}
+
+ {!testPlans.length
+ ? 'There are currently no test plan reports to show.'
+ : testPlans.map(testPlan => (
+
+ {/* ID needed for recovering focus after deleting a report */}
+
+ {testPlan.title}
+
+ {renderDisclosure({ testPlan })}
+
+ ))}
+
+ );
+};
+
+export default TestQueue;
diff --git a/client/components/TestQueue2/queries.js b/client/components/TestQueue2/queries.js
new file mode 100644
index 000000000..7b5513d36
--- /dev/null
+++ b/client/components/TestQueue2/queries.js
@@ -0,0 +1,175 @@
+import { gql } from '@apollo/client';
+
+export const TEST_QUEUE_PAGE_QUERY = gql`
+ query TestQueuePage {
+ me {
+ id
+ username
+ roles
+ }
+ users {
+ id
+ username
+ roles
+ isBot
+ ats {
+ id
+ key
+ }
+ }
+ ats {
+ id
+ key
+ name
+ atVersions {
+ id
+ name
+ releasedAt
+ }
+ browsers {
+ id
+ key
+ name
+ }
+ }
+ testPlans(testPlanVersionPhases: [DRAFT, CANDIDATE, RECOMMENDED]) {
+ directory
+ title
+ testPlanVersions {
+ id
+ title
+ phase
+ versionString
+ updatedAt
+ gitSha
+ gitMessage
+ testPlanReports(isFinal: false) {
+ id
+ at {
+ id
+ key
+ name
+ }
+ browser {
+ id
+ key
+ name
+ }
+ minimumAtVersion {
+ id
+ name
+ }
+ exactAtVersion {
+ id
+ name
+ }
+ runnableTestsLength
+ conflictsLength
+ metrics
+ draftTestPlanRuns {
+ id
+ testResultsLength
+ initiatedByAutomation
+ tester {
+ id
+ username
+ isBot
+ }
+ testResults {
+ completedAt
+ }
+ }
+ }
+ testPlanReportStatuses {
+ testPlanReport {
+ metrics
+ draftTestPlanRuns {
+ testResults {
+ completedAt
+ }
+ }
+ }
+ }
+ }
+ }
+ testPlanVersions {
+ id
+ title
+ phase
+ gitSha
+ gitMessage
+ testPlan {
+ directory
+ }
+ }
+ testPlanReports {
+ id
+ }
+ }
+`;
+
+export const ASSIGN_TESTER_MUTATION = gql`
+ mutation AssignTester(
+ $testReportId: ID!
+ $testerId: ID!
+ $testPlanRunId: ID
+ ) {
+ testPlanReport(id: $testReportId) {
+ assignTester(userId: $testerId, testPlanRunId: $testPlanRunId) {
+ testPlanReport {
+ draftTestPlanRuns {
+ initiatedByAutomation
+ tester {
+ id
+ username
+ isBot
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+
+export const DELETE_TEST_PLAN_RUN = gql`
+ mutation DeleteTestPlanRun($testReportId: ID!, $testerId: ID!) {
+ testPlanReport(id: $testReportId) {
+ deleteTestPlanRun(userId: $testerId) {
+ testPlanReport {
+ id
+ draftTestPlanRuns {
+ id
+ tester {
+ id
+ username
+ isBot
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+
+export const MARK_TEST_PLAN_REPORT_AS_FINAL_MUTATION = gql`
+ mutation MarkTestPlanReportAsFinal(
+ $testPlanReportId: ID!
+ $primaryTestPlanRunId: ID!
+ ) {
+ testPlanReport(id: $testPlanReportId) {
+ markAsFinal(primaryTestPlanRunId: $primaryTestPlanRunId) {
+ testPlanReport {
+ markedFinalAt
+ }
+ }
+ }
+ }
+`;
+
+export const REMOVE_TEST_PLAN_REPORT_MUTATION = gql`
+ mutation RemoveTestPlanReport($testPlanReportId: ID!) {
+ testPlanReport(id: $testPlanReportId) {
+ deleteTestPlanReport
+ }
+ }
+`;
diff --git a/client/components/TestQueueCompletionStatusListItem/BotTestCompletionStatus/index.js b/client/components/TestQueueCompletionStatusListItem/BotTestCompletionStatus/index.js
index 7319020b1..a395cc48e 100644
--- a/client/components/TestQueueCompletionStatusListItem/BotTestCompletionStatus/index.js
+++ b/client/components/TestQueueCompletionStatusListItem/BotTestCompletionStatus/index.js
@@ -2,7 +2,12 @@ import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useTestPlanRunValidatedAssertionCounts } from '../../../hooks/useTestPlanRunValidatedAssertionCounts';
-const BotTestCompletionStatus = ({ testPlanRun, id, runnableTestsLength }) => {
+const BotTestCompletionStatus = ({
+ testPlanRun,
+ id,
+ runnableTestsLength,
+ fromTestQueueV2 = false // TODO: Remove when Test Queue v1 is removed
+}) => {
const {
totalValidatedAssertions,
totalPossibleAssertions,
@@ -17,14 +22,27 @@ const BotTestCompletionStatus = ({ testPlanRun, id, runnableTestsLength }) => {
}, [testResultsLength, stopPolling]);
return (
-
- {`${numValidatedTests} of ${runnableTestsLength} tests evaluated`}
-
+ <>
+ {fromTestQueueV2 ? (
+
+ {`${numValidatedTests} of ${runnableTestsLength} tests evaluated`}
+
+ )}
+ >
);
};
PreviouslyAutomatedTestCompletionStatus.propTypes = {
runnableTestsLength: PropTypes.number.isRequired,
testPlanRunId: PropTypes.string.isRequired,
- id: PropTypes.string.isRequired
+ id: PropTypes.string.isRequired,
+ fromTestQueueV2: PropTypes.bool
};
export default PreviouslyAutomatedTestCompletionStatus;
diff --git a/client/components/common/AtBrowserVersion/index.jsx b/client/components/common/AtBrowserVersion/index.jsx
new file mode 100644
index 000000000..0d0e49a97
--- /dev/null
+++ b/client/components/common/AtBrowserVersion/index.jsx
@@ -0,0 +1,54 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import styled from '@emotion/styled';
+
+const VersionContainer = styled.div`
+ display: inline-block;
+ flex-wrap: wrap;
+ background: #f5f5f5;
+ border-radius: 4px;
+ padding: 0 5px;
+ font-weight: bold;
+
+ & span {
+ font-weight: initial;
+ display: inline-block;
+ margin-left: 2px;
+ }
+`;
+
+const AtVersion = ({ at, minimumAtVersion, exactAtVersion }) => {
+ const atVersionFormatted = minimumAtVersion
+ ? `${minimumAtVersion.name} or later`
+ : exactAtVersion.name;
+
+ return (
+
+ {decorative ? null : `${progress}%`}
-
@@ -25,7 +32,7 @@ const ProgressBar = ({ progress = 0, label = '', clipped = true }) => {
width: `${progress}%`
}}
>
- {progress}%
+ {decorative ? null : `${progress}%`}
)}
@@ -36,7 +43,8 @@ const ProgressBar = ({ progress = 0, label = '', clipped = true }) => {
ProgressBar.propTypes = {
progress: PropTypes.number,
label: PropTypes.string,
- clipped: PropTypes.bool
+ clipped: PropTypes.bool,
+ decorative: PropTypes.bool
};
export default ProgressBar;
diff --git a/client/components/common/DisclosureComponent/index.jsx b/client/components/common/DisclosureComponent/index.jsx
index 4fcee9a3e..88ac56902 100644
--- a/client/components/common/DisclosureComponent/index.jsx
+++ b/client/components/common/DisclosureComponent/index.jsx
@@ -9,12 +9,10 @@ const DisclosureParent = styled.div`
border-radius: 3px;
width: 100%;
- h1 {
- margin: 0;
- padding: 0;
- }
-
- h3 {
+ h1,
+ h2,
+ h3,
+ h4 {
margin: 0;
padding: 0;
}
@@ -34,7 +32,7 @@ const DisclosureButton = styled.button`
position: relative;
width: 100%;
margin: 0;
- padding: 1.25rem;
+ padding: 1.25rem 40px 1.25rem 1.25rem;
text-align: left;
font-size: 1rem;
font-weight: bold;
@@ -99,6 +97,10 @@ const DisclosureComponent = ({