Skip to content

Commit 4e0fa66

Browse files
committed
[O2B-1533] Add RCT detector order tests
Add tests to verify detector columns are rendered in RCT order on runs-per-lhc-period and runs-per-simulation-pass pages.
1 parent c6c3a82 commit 4e0fa66

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

test/public/runs/runsPerDataPass.overview.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,14 @@ module.exports = () => {
153153
});
154154

155155
it('should display detector columns in RCT order (AOT/MUON after physical)', async () => {
156-
await navigateToRunsPerDataPass(page, 1, 3, 4);
157156
const headers = await page.$$eval(
158157
'table thead th',
159158
(ths) => ths.map((th) => th.id).filter(Boolean),
160159
);
161160

162161
// see DetectorOrders.RCT in detectorsProvider.js
163-
expect(headers.indexOf('VTX')).to.be.greaterThan(headers.indexOf('EMC'));
164-
expect(headers.indexOf('MUD')).to.be.greaterThan(headers.indexOf('EMC'));
162+
expect(headers.indexOf('VTX')).to.be.greaterThan(headers.indexOf('ZDC'));
163+
expect(headers.indexOf('MUD')).to.be.greaterThan(headers.indexOf('ZDC'));
165164
});
166165

167166
it('should ignore QC flags created by services in QC summaries of AOT and MUON ', async () => {

test/public/runs/runsPerLhcPeriod.overview.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ module.exports = () => {
130130
await expectInnerText(page, '#row56-FT0', '83');
131131
});
132132

133+
it('should display detector columns in RCT order (AOT/MUON after physical) for synchronous flags', async () => {
134+
// Note test starts already on synchronous flags tab
135+
const headers = await page.$$eval(
136+
'table thead th',
137+
(ths) => ths.map((th) => th.id).filter(Boolean),
138+
);
139+
140+
// see DetectorOrders.RCT in detectorsProvider.js
141+
expect(headers.indexOf('MUD')).to.be.greaterThan(headers.indexOf('ZDC'));
142+
});
143+
133144
it('should successfully sort by runNumber in ascending and descending manners', async () => {
134145
await testTableSortingByColumn(page, 'runNumber');
135146
});

test/public/runs/runsPerSimulationPass.overview.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ module.exports = () => {
137137
await qcFlagService.delete(tmpQcFlag.id);
138138
});
139139

140+
it('should display detector columns in RCT order (AOT/MUON after physical)', async () => {
141+
const headers = await page.$$eval(
142+
'table thead th',
143+
(ths) => ths.map((th) => th.id).filter(Boolean),
144+
);
145+
146+
// see DetectorOrders.RCT in detectorsProvider.js
147+
expect(headers.indexOf('VTX')).to.be.greaterThan(headers.indexOf('ZDC'));
148+
expect(headers.indexOf('MUD')).to.be.greaterThan(headers.indexOf('ZDC'));
149+
});
150+
140151
it('should successfully sort by runNumber in ascending and descending manners', async () => {
141152
await testTableSortingByColumn(page, 'runNumber');
142153
});

0 commit comments

Comments
 (0)