Skip to content

Commit c6c3a82

Browse files
committed
[O2B-1533] Forgot to commit adjusted tests
Add a test to verify detector columns are rendered in RCT order. Update the CSV export expectations to reflect the new column ordering (CPV/VTX swapped).
1 parent b4acdbd commit c6c3a82

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ module.exports = () => {
152152
.to.be.equal('Missing 3 verifications');
153153
});
154154

155+
it('should display detector columns in RCT order (AOT/MUON after physical)', async () => {
156+
await navigateToRunsPerDataPass(page, 1, 3, 4);
157+
const headers = await page.$$eval(
158+
'table thead th',
159+
(ths) => ths.map((th) => th.id).filter(Boolean),
160+
);
161+
162+
// 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'));
165+
});
166+
155167
it('should ignore QC flags created by services in QC summaries of AOT and MUON ', async () => {
156168
await navigateToRunsPerDataPass(page, 2, 1, 3); // apass
157169
await expectInnerText(page, '#row106-VTX-text', '100');
@@ -394,10 +406,10 @@ module.exports = () => {
394406
const exportContent = fs.readFileSync(path.resolve(downloadPath, targetFileName)).toString();
395407

396408
expect(exportContent.trim()).to.be.eql([
397-
'runNumber;VTX;CPV',
409+
'runNumber;CPV;VTX',
398410
'108;"";""',
399-
'107;"";"Good (from: 1565290800000 to: 1565359260000) | Limited Acceptance MC Reproducible (from: 1565269140000 to: 1565290800000)"',
400-
'106;"Good (from: 1565269200000 to: 1565304200000) | Good (from: 1565324200000 to: 1565359200000)";"Limited Acceptance MC Reproducible (from: 1565304200000 to: 1565324200000) | Limited acceptance (from: 1565329200000 to: 1565334200000) | Bad (from: 1565339200000 to: 1565344200000)"',
411+
'107;"Good (from: 1565290800000 to: 1565359260000) | Limited Acceptance MC Reproducible (from: 1565269140000 to: 1565290800000)";""',
412+
'106;"Limited Acceptance MC Reproducible (from: 1565304200000 to: 1565324200000) | Limited acceptance (from: 1565329200000 to: 1565334200000) | Bad (from: 1565339200000 to: 1565344200000)";"Good (from: 1565269200000 to: 1565304200000) | Good (from: 1565324200000 to: 1565359200000)"',
401413
].join('\r\n'));
402414
fs.unlinkSync(path.resolve(downloadPath, targetFileName));
403415
});

0 commit comments

Comments
 (0)