Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Enable automation support for VoiceOver/Safari/MacOS #1101

Merged
merged 10 commits into from
May 22, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ StopRunningCollectionButton.propTypes = {
'CANCELLED',
'COMPLETED',
'ERROR'
])
]).isRequired
}),
onClick: PropTypes.func
};
Expand Down
32 changes: 28 additions & 4 deletions client/components/TestQueue/AssignTesterDropdown/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,28 @@ const AssignTesterDropdown = ({
<Dropdown.Menu role="menu" className="assign-menu">
{possibleTesters?.length ? (
possibleTesters.map(tester => {
const { username } = tester;
const { username, isBot, ats } = tester;
const testerIsAssigned = isTesterAssigned(username);
const classname = [
testerIsAssigned ? 'assigned' : 'not-assigned',
tester.isBot ? 'bot' : 'human'
isBot ? 'bot' : 'human'
].join(' ');
let icon;
if (testerIsAssigned) {
icon = faCheck;
} else if (tester.isBot) {
} else if (isBot) {
// if our bot doesn't have a link to the at - hide it from the list
if (
!ats.find(
({ id }) =>
id ===
testPlanReportAtBrowserQuery
?.testPlanReport.at.id
)
) {
return null;
}

const supportedByBot =
isSupportedByResponseCollector(
testPlanReportAtBrowserQuery?.testPlanReport
Expand Down Expand Up @@ -192,7 +204,19 @@ const AssignTesterDropdown = ({

AssignTesterDropdown.propTypes = {
testPlanReportId: PropTypes.string.isRequired,
possibleTesters: PropTypes.array.isRequired,
possibleTesters: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string.isRequired,
username: PropTypes.string.isRequired,
isBot: PropTypes.bool.isRequired,
ats: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string.isRequired,
key: PropTypes.string.isRequired
})
)
})
).isRequired,
onChange: PropTypes.func.isRequired,
testPlanRun: PropTypes.object,
label: PropTypes.string,
Expand Down
11 changes: 11 additions & 0 deletions client/components/TestQueue/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ export const TEST_QUEUE_PAGE_QUERY = gql`
username
roles
isBot
ats {
id
key
}
}
ats {
id
name
key
atVersions {
id
name
Expand Down Expand Up @@ -55,10 +60,12 @@ export const TEST_QUEUE_PAGE_QUERY = gql`
markedFinalAt
at {
id
key
name
}
browser {
id
key
name
}
testPlanVersion {
Expand Down Expand Up @@ -106,10 +113,12 @@ export const TEST_PLAN_REPORT_QUERY = gql`
runnableTestsLength
at {
id
key
name
}
browser {
id
key
name
}
testPlanVersion {
Expand Down Expand Up @@ -151,10 +160,12 @@ export const TEST_PLAN_REPORT_AT_BROWSER_QUERY = gql`
id
at {
id
key
name
}
browser {
id
key
name
}
}
Expand Down
Loading
Loading