@@ -19,3 +19,23 @@ exports.navigateToRunsPerDataPass = async (page, lhcPeriodId, dataPassId, expect
1919 expectUrlParams ( page , { page : 'runs-per-data-pass' , dataPassId, pdpBeamType } ) ;
2020 await waitForTableLength ( page , expectedRowsCount ) ;
2121} ;
22+
23+ /**
24+ * Navigate to Runs per Simulation Pass page
25+ *
26+ * @param {Puppeteer.Page } page page
27+ * @param {number } lhcPeriodId id of lhc period on LHC Period overview page
28+ * @param {number } simulationPassId id of data pass on Data Passes per LHC Period page
29+ * @param {number } expectedRowsCount expected number of rows on runs per data pass page
30+ * @return {Promise<void> } promise
31+ */
32+ exports . navigateToRunsPerSimulationPass = async ( page , lhcPeriodId , simulationPassId , expectedRowsCount ) => {
33+ await waitForNavigation ( page , ( ) => pressElement ( page , 'a#lhc-period-overview' , true ) ) ;
34+ const pdpBeamType = await getInnerText ( await page . waitForSelector ( `#row${ lhcPeriodId } -beamTypes` ) ) ;
35+ await waitForNavigation ( page , ( ) => pressElement ( page , `#row${ lhcPeriodId } -associatedDataPasses a` , true ) ) ;
36+ expectUrlParams ( page , { page : 'simulation-passes-per-lhc-period-overview' , lhcPeriodId } ) ;
37+ await page . waitForSelector ( 'th#description' ) ;
38+ await waitForNavigation ( page , ( ) => pressElement ( page , `#row${ simulationPassId } -associatedRuns a` , true ) ) ;
39+ expectUrlParams ( page , { page : 'runs-per-simulation-pass' , dataPassId : simulationPassId , pdpBeamType } ) ;
40+ await waitForTableLength ( page , expectedRowsCount ) ;
41+ } ;
0 commit comments