@@ -111,7 +111,7 @@ module.exports = () => {
111111 } ) ;
112112 } ) ;
113113
114- it ( 'should only contain specified stable beam durations, <= 12:00:00' , async ( ) => {
114+ it ( 'should only contain specified stable beam durations, <= 12:00:00' , async ( ) => {
115115 getAllLhcFillsDto . query = { filter : { beamDuration : { limit : '43200' , operator : '<=' } } } ;
116116 const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
117117 expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 4 )
@@ -129,32 +129,70 @@ module.exports = () => {
129129 } ) ;
130130 } ) ;
131131
132- it ( 'should only contain specified stable beam durations, >= 00:01:40' , async ( ) => {
132+ it ( 'should only contain specified stable beam durations, >= 00:01:40' , async ( ) => {
133133 getAllLhcFillsDto . query = { filter : { beamDuration : { limit : '100' , operator : '>=' } } } ;
134134 const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
135135
136136 expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 4 )
137137 lhcFills . forEach ( ( lhcFill ) => {
138138 expect ( lhcFill . stableBeamsDuration ) . greaterThanOrEqual ( 100 )
139139 } ) ;
140- } )
140+ } )
141141
142- it ( 'should only contain specified stable beam durations, > 00:01:40' , async ( ) => {
142+ it ( 'should only contain specified stable beam durations, > 00:01:40' , async ( ) => {
143143 getAllLhcFillsDto . query = { filter : { beamDuration : { limit : '100' , operator : '>' } } } ;
144144 const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
145145
146146 expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 1 )
147147 lhcFills . forEach ( ( lhcFill ) => {
148148 expect ( lhcFill . stableBeamsDuration ) . greaterThan ( 100 )
149149 } ) ;
150- } )
150+ } )
151151
152- it ( 'should only contain specified stable beam durations, = 00:00:00' , async ( ) => {
152+ it ( 'should only contain specified stable beam durations, = 00:00:00' , async ( ) => {
153153 getAllLhcFillsDto . query = { filter : { hasStableBeams : true , beamDuration : { limit : '0' , operator : '=' } } } ;
154154 const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
155155
156156 expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 0 )
157- } )
157+ } )
158+
159+ it ( 'should only contain specified total run duration, < 00:00:00' , async ( ) => {
160+ getAllLhcFillsDto . query = { filter : { runDuration : { limit : '0' , operator : '<' } } } ;
161+ const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
162+
163+ expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 0 )
164+ } ) ;
165+
166+ it ( 'should only contain specified total run duration, > 00:00:00' , async ( ) => {
167+ getAllLhcFillsDto . query = { filter : { runDuration : { limit : '0' , operator : '>' } } } ;
168+ const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
169+
170+ expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 1 )
171+ lhcFills . forEach ( ( lhcFill ) => {
172+ expect ( lhcFill . statistics . runsCoverage ) . greaterThan ( 0 )
173+ } ) ;
174+ } ) ;
175+
176+ it ( 'should only contain specified total run duration, <= 00:00:00' , async ( ) => {
177+ getAllLhcFillsDto . query = { filter : { runDuration : { limit : '0' , operator : '<=' } } } ;
178+ const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
179+
180+ expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 4 )
181+ lhcFills . forEach ( ( lhcFill ) => {
182+ expect ( lhcFill . statistics . runsCoverage ) . equals ( 0 )
183+ } ) ;
184+ } ) ;
185+
186+ it ( 'should only contain specified total run duration, >= 00:00:00' , async ( ) => {
187+ getAllLhcFillsDto . query = { filter : { runDuration : { limit : '0' , operator : '>=' } } } ;
188+ const { lhcFills } = await new GetAllLhcFillsUseCase ( ) . execute ( getAllLhcFillsDto )
189+
190+ expect ( lhcFills ) . to . be . an ( 'array' ) . and . lengthOf ( 5 )
191+ lhcFills . forEach ( ( lhcFill ) => {
192+ expect ( lhcFill . statistics . runsCoverage ) . greaterThanOrEqual ( 0 )
193+ } ) ;
194+ } ) ;
195+
158196
159197 it ( 'should only contain specified total run duration, > 04:00:00' , async ( ) => {
160198 getAllLhcFillsDto . query = { filter : { runDuration : { limit : '14400' , operator : '>' } } } ;
0 commit comments