@@ -90,6 +90,50 @@ test('correctly ignores test results from a human-submitted test plan run', asyn
90
90
} ) ;
91
91
} ) ;
92
92
93
+ // See gh-1237 - Check if user is a bot, to include in Bot Status calculation on Test Queue page
94
+ // https://github.com/w3c/aria-at-app/pull/1237
95
+ test ( 'correctly ignores test results from a human-submitted test plan run with a collectionJob attribute' , async ( ) => {
96
+ const testPlanRuns = [
97
+ {
98
+ id : '0' ,
99
+ testResults : new Array ( 3 ) . fill ( null ) ,
100
+ tester : { username : 'bot' , isBot : true } ,
101
+ collectionJob : {
102
+ status : COLLECTION_JOB_STATUS . COMPLETED ,
103
+ testStatus : [
104
+ { status : COLLECTION_JOB_STATUS . COMPLETED } ,
105
+ { status : COLLECTION_JOB_STATUS . COMPLETED } ,
106
+ { status : COLLECTION_JOB_STATUS . COMPLETED }
107
+ ]
108
+ }
109
+ } ,
110
+ {
111
+ id : '1' ,
112
+ testResults : new Array ( 3 ) . fill ( null ) ,
113
+ tester : { username : 'human' , isBot : false } ,
114
+ status : COLLECTION_JOB_STATUS . COMPLETED ,
115
+ testStatus : [
116
+ { status : COLLECTION_JOB_STATUS . COMPLETED } ,
117
+ { status : COLLECTION_JOB_STATUS . COMPLETED } ,
118
+ { status : COLLECTION_JOB_STATUS . COMPLETED }
119
+ ]
120
+ }
121
+ ] ;
122
+
123
+ const mocks = getMocks ( testPlanRuns ) ;
124
+
125
+ const { getByText } = render (
126
+ < MockedProvider mocks = { mocks } addTypename = { false } >
127
+ < BotRunTestStatusList testPlanReportId = "1" />
128
+ </ MockedProvider >
129
+ ) ;
130
+
131
+ await waitFor ( async ( ) => {
132
+ expect ( getByText ( '3 Tests Completed' ) ) . toBeInTheDocument ( ) ;
133
+ expect ( getByText ( '0 Tests Queued' ) ) . toBeInTheDocument ( ) ;
134
+ } ) ;
135
+ } ) ;
136
+
93
137
test ( 'correctly displays statuses for CANCELLED test run' , async ( ) => {
94
138
const testPlanRuns = [
95
139
{
0 commit comments