Skip to content

Commit

Permalink
Add support for isBot
Browse files Browse the repository at this point in the history
  • Loading branch information
alflennik committed May 16, 2024
1 parent a66a407 commit 9908f00
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions client/components/TestQueue2/AssignTesters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import styled from '@emotion/styled';
import { Button, Dropdown } from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCheck, faRobot, faUser } from '@fortawesome/free-solid-svg-icons';
import { isBot } from '../../utils/automation';
import useConfirmationModal from '../../hooks/useConfirmationModal';
import BasicThemedModal from '../common/BasicThemedModal';
import { LoadingStatus, useTriggerLoad } from '../common/LoadingStatus';
Expand Down Expand Up @@ -224,7 +223,7 @@ const AssignTesters = ({ me, testers, testPlanReport }) => {
let icon;
if (isAssigned) {
icon = faCheck;
} else if (isBot(tester)) {
} else if (tester.isBot) {
icon = faRobot;
}

Expand Down Expand Up @@ -290,7 +289,7 @@ const AssignTesters = ({ me, testers, testPlanReport }) => {
const { username } = tester;

let userLink;
if (isBot(tester)) {
if (tester.isBot) {
userLink = (
<span>
<FontAwesomeIcon icon={faRobot} />
Expand Down
3 changes: 2 additions & 1 deletion client/components/TestQueue2/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const MetadataContainer = styled.div`
gap: 1.25em;
margin: 0.5rem 1.25rem;
align-items: center;
min-height: 40px; /* temp because the status dialog button keeps disappearing */
& button {
margin-bottom: 0;
Expand Down Expand Up @@ -168,7 +169,7 @@ const TestQueue = () => {
return [...testPlanVersions]
.filter(testPlanVersion => testPlanVersion.testPlanReports.length)
.sort((a, b) => {
return a.versionString.localeCompare(b.versionString);
return b.versionString.localeCompare(a.versionString);
})
.map(testPlanVersion => {
return {
Expand Down
1 change: 1 addition & 0 deletions client/components/TestQueue2/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const TEST_QUEUE_PAGE_QUERY = gql`
users {
id
username
isBot
roles
}
ats {
Expand Down
2 changes: 1 addition & 1 deletion client/components/TestQueueRow/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const TestQueueRow = ({
testPlanRunId: run.id,
...run.tester
}))
.filter(tester => !isBot(tester));
.filter(tester => !tester.isBot);

const getTestPlanRunIdByUserId = userId => {
return draftTestPlanRuns.find(({ tester }) => tester.id === userId).id;
Expand Down

0 comments on commit 9908f00

Please sign in to comment.