@@ -192,23 +192,29 @@ module.exports = () => {
192192
193193 await page . waitForTimeout ( 100 ) ;
194194
195+ const countsPerLhcPeriod = {
196+ LHC22b : 1 ,
197+ LHC22a : 3 ,
198+ LHC23f : 0 ,
199+ } ;
200+
195201 /**
196202 * As @see getAllDataFields returns innerText from cells, in case of lhcPeriod.name column, text from inner buttons is also taken.
197203 * @param {string[] } periodNames list of names
198204 * @return {string[] } cells content
199205 */
200- const appendButtonsText = ( periodNames ) => periodNames . map ( ( p ) => `${ p } \nruns` ) ;
206+ const appendButtonsText = ( periodNames ) => periodNames . map ( ( name ) => `${ name } \nruns[ ${ countsPerLhcPeriod [ name ] } ] ` ) ;
201207
202- let allLhcPeriodNames = await getAllDataFields ( page , 'name' ) ;
203- expect ( allLhcPeriodNames ) . to . has . all . deep . members ( appendButtonsText ( [ 'LHC22a' ] ) ) ;
208+ let allLhcPeriodNameCellsContent = await getAllDataFields ( page , 'name' ) ;
209+ expect ( allLhcPeriodNameCellsContent ) . to . has . all . deep . members ( appendButtonsText ( [ 'LHC22a' ] ) ) ;
204210
205211 const resetFiltersButton = await page . $ ( '#reset-filters' ) ;
206212 expect ( resetFiltersButton ) . to . not . be . null ;
207213 await resetFiltersButton . evaluate ( ( button ) => button . click ( ) ) ;
208214 await page . waitForTimeout ( 100 ) ;
209215
210- allLhcPeriodNames = await getAllDataFields ( page , 'name' ) ;
211- expect ( allLhcPeriodNames ) . to . has . all . deep . members ( appendButtonsText ( [ 'LHC22a' , 'LHC22b' , 'LHC23f' ] ) ) ;
216+ allLhcPeriodNameCellsContent = await getAllDataFields ( page , 'name' ) ;
217+ expect ( allLhcPeriodNameCellsContent ) . to . has . all . deep . members ( appendButtonsText ( [ 'LHC22a' , 'LHC22b' , 'LHC23f' ] ) ) ;
212218 } ) ;
213219
214220 it ( 'should successfuly apply lhc period year filter' , async ( ) => {
0 commit comments