Skip to content

Commit 2bc92f1

Browse files
committed
[O2B-1642] Adapt the environments overview tests to its configuration and detectors columns
1 parent bdbaebd commit 2bc92f1

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

‎test/public/envs/overview.test.js‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const {
1818
checkColumnBalloon,
1919
expectLink,
2020
expectInnerText,
21+
expectInnerTextTo,
2122
expectUrlParams,
2223
waitForNavigation,
2324
waitForTableLength,
@@ -100,7 +101,7 @@ module.exports = () => {
100101

101102
it('Should display the correct items counter at the bottom of the page', async () => {
102103
await expectInnerText(page, '#firstRowIndex', '1');
103-
await expectInnerText(page, '#lastRowIndex', '7');
104+
await expectInnerText(page, '#lastRowIndex', '9');
104105
await expectInnerText(page, '#totalRowsCount', '9');
105106
});
106107

@@ -131,20 +132,21 @@ module.exports = () => {
131132
await expectInnerText(page, '#rowTDI59So3d-statusSummary', 'Total 02:55:00\nRunning 01:00:00');
132133
});
133134

134-
it('Should display the configuration of the environment', async () => {
135-
await expectInnerText(page, '#rowCmCvjNbg-runType', 'PHYSICS');
136-
await expectInnerText(page, '#rowCmCvjNbg-beamType', 'pp');
137-
await expectInnerText(page, '#rowCmCvjNbg-detectors', 'FT0, ITS');
138-
await expectInnerText(page, '#rowCmCvjNbg-flps', '2');
139-
await expectInnerText(page, '#rowCmCvjNbg-epns', '2');
135+
it('Should display the configuration of the environment, as for the runs, and its detectors', async () => {
136+
// The CTP readout host is counted in the FLPs
137+
await expectInnerText(page, '#rowCmCvjNbg-nEpns', '2');
138+
await expectInnerText(page, '#rowCmCvjNbg-nFlps', '3');
139+
await expectInnerText(page, '#rowCmCvjNbg-dcs', 'ON');
140+
await expectInnerText(page, '#rowCmCvjNbg-triggerValue', 'CTP');
141+
await expectInnerTextTo(page, '#rowCmCvjNbg-detectors', (text) => text.includes('FT0, ITS') && text.startsWith('2'));
140142
});
141143

142144
it('can set how many environments are available per page', async () => {
143-
// Expect the amount selector to currently be set to 7 (because of the defined page height)
145+
// Expect the amount selector to currently be set to 9 (because of the defined page height)
144146
const amountSelectorId = '#amountSelector';
145147
const amountSelectorButton = await page.waitForSelector(`${amountSelectorId} button`);
146148
const amountSelectorButtonText = await page.evaluate((element) => element.innerText, amountSelectorButton);
147-
expect(amountSelectorButtonText.trim().endsWith('7')).to.be.true;
149+
expect(amountSelectorButtonText.trim().endsWith('9')).to.be.true;
148150

149151
// Expect the dropdown options to be visible when it is selected
150152
await pressElement(page, `${amountSelectorId} button`);

0 commit comments

Comments
 (0)