1111 * or submit itself to any jurisdiction.
1212 */
1313
14- const { waitForNavigation, pressElement, getInnerText, expectUrlParams, waitForTableLength } = require ( '../defaults.js' ) ;
14+ const { waitForNavigation, pressElement, expectUrlParams, waitForTableLength } = require ( '../defaults.js' ) ;
15+
16+ /**
17+ * Navigate to runs overview page
18+ *
19+ * @param {Puppeteer.Page } page page
20+ * @return {Promise<void> } promise
21+ */
22+ exports . navigateToRunsOverview = async ( page ) => {
23+ await waitForNavigation ( page , ( ) => pressElement ( page , 'a#run-overview' , true ) ) ;
24+ } ;
25+
26+
27+ /**
28+ * Navigate to Runs per LHC period
29+ *
30+ * @param {Puppeteer.Page } page page
31+ * @param {number } lhcPeriodId id of lhc period on LHC Period overview page
32+ * @param {number } expectedRowsCount expected number of rows on runs per data pass page
33+ * @return {Promise<void> } promise
34+ */
35+ exports . navigateToRunsPerLhcPeriod = async ( page , lhcPeriodId , expectedRowsCount , tabPanel = 'detectorQualities' ) => {
36+ await waitForNavigation ( page , ( ) => pressElement ( page , 'a#lhc-period-overview' , true ) ) ;
37+ await waitForNavigation ( page , ( ) => pressElement ( page , `#row${ lhcPeriodId } -associatedRuns a` , true ) ) ;
38+ await pressElement ( page , `#${ tabPanel } -tab` , true ) ;
39+ expectUrlParams ( page , { page : 'runs-per-lhc-period' , lhcPeriodId, panel : tabPanel } , [ 'pdpBeamType' ] ) ;
40+ await waitForTableLength ( page , expectedRowsCount ) ;
41+ } ;
1542
1643/**
1744 * Navigate to Runs per Data Pass page
@@ -32,6 +59,7 @@ exports.navigateToRunsPerDataPass = async (page, lhcPeriodId, dataPassId, expect
3259 await waitForTableLength ( page , expectedRowsCount ) ;
3360} ;
3461
62+
3563/**
3664 * Navigate to Runs per Simulation Pass page
3765 *
0 commit comments