@@ -39,11 +39,7 @@ describe('the single contract-leg dispatch', () => {
3939 ] ) ;
4040 expect ( workflow . permissions ) . toEqual ( { } ) ;
4141 expect ( job . permissions ) . toEqual ( { contents : 'read' } ) ;
42- expect ( room . permissions ) . toEqual ( {
43- actions : 'read' ,
44- contents : 'read' ,
45- 'pull-requests' : 'read' ,
46- } ) ;
42+ expect ( room . permissions ) . toEqual ( { actions : 'read' , contents : 'read' } ) ;
4743 } ) ;
4844
4945 it ( 'waits for room under the CI ceiling as a pull-request run does, so a main check or release re-check fits first' , ( ) => {
@@ -67,9 +63,9 @@ describe('the single contract-leg dispatch', () => {
6763 path : '.ci-admission' ,
6864 'persist-credentials' : false ,
6965 } ) ;
70- expect ( step ( 'Stop when CI is full' ) . if ) . toBe (
71- "steps.room.outputs.full == 'true'" ,
72- ) ;
66+ // The action turns away only a pull-request run; a dispatch starts after
67+ // its longest wait, so no step reads `full`.
68+ expect ( JSON . stringify ( workflow ) ) . not . toContain ( 'outputs.full' ) ;
7369 // A standard runner: the wait outlasts a slim job's fifteen minutes.
7470 expect ( room [ 'runs-on' ] ) . toBe ( 'ubuntu-latest' ) ;
7571 } ) ;
@@ -143,6 +139,12 @@ describe('the single contract-leg dispatch', () => {
143139 ) ;
144140 } ) ;
145141
142+ it ( 'gives each repeat of the leg its own time' , ( ) => {
143+ expect ( job [ 'timeout-minutes' ] ) . toBe (
144+ '${{ 20 + 13 * fromJSON(inputs.repeat) }}' ,
145+ ) ;
146+ } ) ;
147+
146148 it ( "keeps the leg's Playwright results, passing or failing" , ( ) => {
147149 const keep = step ( "Keep the leg's Playwright results" ) ;
148150 expect ( keep . if ) . toBe ( "always() && steps.contracts.outcome != 'skipped'" ) ;
0 commit comments