Skip to content

Commit ffa1065

Browse files
authored
Merge branch 'main' into xsalonx/fix/beam-types
2 parents 26f8175 + d3eccf0 commit ffa1065

6 files changed

Lines changed: 875 additions & 870 deletions

File tree

package-lock.json

Lines changed: 63 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@
4545
"proto/"
4646
],
4747
"devDependencies": {
48-
"@eslint/js": "^9.34.0",
48+
"@eslint/js": "^9.35.0",
4949
"@stylistic/eslint-plugin-js": "^4.4.1",
5050
"@types/d3": "7.4.0",
5151
"chai": "4.5.0",
5252
"date-and-time": "3.6.0",
5353
"eslint": "^9.34.0",
54-
"eslint-plugin-jsdoc": "^54.1.0",
54+
"eslint-plugin-jsdoc": "^55.0.3",
5555
"globals": "^16.3.0",
5656
"js-yaml": "4.1.0",
5757
"mocha": "11.7.0",
5858
"nodemon": "3.1.3",
5959
"nyc": "17.1.0",
60-
"puppeteer": "24.17.0",
60+
"puppeteer": "24.18.0",
6161
"puppeteer-to-istanbul": "1.4.0",
6262
"sequelize-cli": "6.6.0",
6363
"sinon": "21.0.0",

test/api/qcFlags.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module.exports = () => {
7474
it('should successfully get non-empty QC flag summary for data pass', async () => {
7575
const response = await request(server).get('/api/qcFlags/summary?dataPassId=1');
7676
expect(response.status).to.be.equal(200);
77+
7778
const { body: { data } } = response;
7879
expect(data).to.be.eql({
7980
106: {

test/public/defaults.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ module.exports.waitForTableTotalRowsCountToEqual = async (page, amount) => {
179179
amount,
180180
);
181181
} catch {
182-
const actualCount = (await page.$$('#totalRowsCount')).innerText;
182+
const element = await page.$$('#totalRowsCount')
183+
const actualCount = element.innerText;
183184
throw new Error(`Expected total rows count ${amount}, but got ${actualCount}`);
184185
}
185186
};
@@ -893,3 +894,26 @@ module.exports.getPeriodInputsSelectors = (popoverSelector) => {
893894
toTimeSelector: `${commonInputsAncestor} > div:nth-child(2) input:nth-child(2)`,
894895
};
895896
};
897+
898+
/**
899+
* Open filtering panel
900+
* @param {puppeteer.page} page page handler
901+
*/
902+
module.exports.openFilteringPanel = async (page) => {
903+
await page.waitForSelector('#reset-filters', { visible: true }).catch(async () => {
904+
await this.pressElement(page, '#openFilterToggle');
905+
})
906+
};
907+
908+
/**
909+
* Reset standard filtering
910+
* Excecution of this function does not change visibility of filtering popover
911+
* @param {puppeteer.page} page page handler
912+
*/
913+
module.exports.resetFilters = async (page) => {
914+
await page.waitForSelector('#reset-filters', { visible: true }).then(() => this.pressElement(page, '#reset-filters')).catch(async () => {
915+
await this.pressElement(page, '#openFilterToggle');
916+
await this.pressElement(page, '#reset-filters');
917+
await this.pressElement(page, '#openFilterToggle');
918+
})
919+
};

test/public/runs/navigationUtils.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,34 @@
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

Comments
 (0)