Skip to content

Commit 1b02bd3

Browse files
author
GuustMetz
committed
test: fix mis-spelling issue
1 parent 9f2cbfa commit 1b02bd3

2 files changed

Lines changed: 22 additions & 18 deletions

File tree

test/lib/usecases/lhcFill/GetAllLhcFillsUseCase.test.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ module.exports = () => {
3131
});
3232

3333
it('should only containing lhc fills with stable beams', async () => {
34-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true } };
34+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true } };
3535
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
3636

3737
expect(lhcFills).to.be.an('array');
3838
lhcFills.forEach((lhcFill) => {
39-
// Every lhcFill should have stableBeamssStart
40-
expect(lhcFill.stableBeamssStart).to.not.be.null;
39+
// Every lhcFill should have stableBeamsStart
40+
expect(lhcFill.stableBeamsStart).to.not.be.null;
4141
});
4242
});
4343

4444
// Fill number filter tests
4545

4646
it('should only contain specified fill number', async () => {
47-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, fillNumbers: '6' } };
47+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, fillNumbers: '6' } };
4848
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
4949
expect(lhcFills).to.be.an('array').and.lengthOf(1)
5050

@@ -54,7 +54,7 @@ module.exports = () => {
5454
})
5555

5656
it('should only contain specified fill numbers', async () => {
57-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, fillNumbers: '6,3' } };
57+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, fillNumbers: '6,3' } };
5858
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
5959

6060

@@ -66,7 +66,7 @@ module.exports = () => {
6666
})
6767

6868
it('should only contain specified fill numbers, range', async () => {
69-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, fillNumbers: '1-3,6' } };
69+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, fillNumbers: '1-3,6' } };
7070
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
7171

7272

@@ -78,7 +78,7 @@ module.exports = () => {
7878
})
7979

8080
it('should only contain specified fill numbers, whitespace', async () => {
81-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, fillNumbers: ' 6 , 3 ' } };
81+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, fillNumbers: ' 6 , 3 ' } };
8282
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
8383

8484

@@ -90,7 +90,7 @@ module.exports = () => {
9090
})
9191

9292
it('should only contain specified fill numbers, comma misplacement', async () => {
93-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, fillNumbers: ',6,3,' } };
93+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, fillNumbers: ',6,3,' } };
9494
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
9595

9696

@@ -102,7 +102,7 @@ module.exports = () => {
102102
})
103103

104104
it('should only contain matching scheme name, one precise', async () => {
105-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, schemeName: 'schemename' } };
105+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, schemeName: 'schemename' } };
106106
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
107107

108108
expect(lhcFills).to.be.an('array').and.lengthOf(3)
@@ -129,7 +129,7 @@ module.exports = () => {
129129
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto);
130130
expect(lhcFills).to.be.an('array').and.lengthOf(3)
131131
lhcFills.forEach((lhcFill) => {
132-
expect(lhcFill.stableBeamssDuration).lessThan(43200)
132+
expect(lhcFill.stableBeamsDuration).lessThan(43200)
133133
});
134134
});
135135

@@ -138,7 +138,7 @@ module.exports = () => {
138138
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto)
139139
expect(lhcFills).to.be.an('array').and.lengthOf(4)
140140
lhcFills.forEach((lhcFill) => {
141-
expect(lhcFill.stableBeamssDuration).lessThanOrEqual(43200)
141+
expect(lhcFill.stableBeamsDuration).lessThanOrEqual(43200)
142142
});
143143
})
144144

@@ -147,7 +147,7 @@ module.exports = () => {
147147
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto)
148148
expect(lhcFills).to.be.an('array').and.lengthOf(3)
149149
lhcFills.forEach((lhcFill) => {
150-
expect(lhcFill.stableBeamssDuration).equal(100)
150+
expect(lhcFill.stableBeamsDuration).equal(100)
151151
});
152152
});
153153

@@ -157,7 +157,7 @@ module.exports = () => {
157157

158158
expect(lhcFills).to.be.an('array').and.lengthOf(4)
159159
lhcFills.forEach((lhcFill) => {
160-
expect(lhcFill.stableBeamssDuration).greaterThanOrEqual(100)
160+
expect(lhcFill.stableBeamsDuration).greaterThanOrEqual(100)
161161
});
162162
})
163163

@@ -167,12 +167,12 @@ module.exports = () => {
167167

168168
expect(lhcFills).to.be.an('array').and.lengthOf(1)
169169
lhcFills.forEach((lhcFill) => {
170-
expect(lhcFill.stableBeamssDuration).greaterThan(100)
170+
expect(lhcFill.stableBeamsDuration).greaterThan(100)
171171
});
172172
})
173173

174174
it('should only contain specified stable beam durations, = 00:00:00', async () => {
175-
getAllLhcFillsDto.query = { filter: { hasStableBeamss: true, beamDuration: {limit: '0', operator: '='} } };
175+
getAllLhcFillsDto.query = { filter: { hasStableBeams: true, beamDuration: {limit: '0', operator: '='} } };
176176
const { lhcFills } = await new GetAllLhcFillsUseCase().execute(getAllLhcFillsDto)
177177

178178
expect(lhcFills).to.be.an('array').and.lengthOf(0)

test/public/lhcFills/overview.test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,14 @@ module.exports = () => {
274274
it('should successfully display filter elements', async () => {
275275
const filterSBExpect = { selector: '.stableBeams-filter .w-30', value: 'Stable Beams Only' };
276276
const filterFillNRExpect = {selector: 'div.items-baseline:nth-child(1) > div:nth-child(1)', value: 'Fill #'};
277-
const filterSBDurationExpect = {selector: 'div.items-baseline:nth-child(3) > div:nth-child(1)', value: 'SB Duration'};
277+
const filterSBStartExpect = {selector: 'div.items-baseline:nth-child(2) > div:nth-child(1)', value: 'SB START'};
278+
const filterSBEndExpect = {selector: 'div.items-baseline:nth-child(3) > div:nth-child(1)', value: 'SB END'};
279+
const filterSBDurationExpect = {selector: 'div.items-baseline:nth-child(5) > div:nth-child(1)', value: 'SB Duration'};
278280
const filterSBDurationPlaceholderExpect = {selector: '#beam-duration-filter-operand', value: 'e.g 16:14:15 (HH:MM:SS)'}
279-
const filterRunDurationExpect = {selector: 'div.flex-row:nth-child(4) > div:nth-child(1)', value: 'Total runs duration'}
281+
const filterRunDurationExpect = {selector: 'div.flex-row:nth-child(6) > div:nth-child(1)', value: 'Total runs duration'}
280282
const filterRunDurationPlaceholderExpect = {selector: '#run-duration-filter-operand', value: 'e.g 16:14:15 (HH:MM:SS)'};
281283
const filterSBDurationOperatorExpect = { value: true };
282-
const filterBeamTypeExpect = {selector: 'div.flex-row:nth-child(5) > div:nth-child(1)', value: 'Beam Type'}
284+
const filterBeamTypeExpect = {selector: 'div.flex-row:nth-child(7) > div:nth-child(1)', value: 'Beam Type'}
283285
const filterSchemeNamePlaceholderExpect = {selector: '.fillingSchemeName-filter input', value: 'e.g. Single_12b_8_1024_8_2018'}
284286

285287
await goToPage(page, 'lhc-fill-overview');
@@ -289,6 +291,8 @@ module.exports = () => {
289291
expect(await page.evaluate(() => document.querySelector('#beam-duration-filter-operator > option:nth-child(3)').selected)).to.equal(filterSBDurationOperatorExpect.value);
290292
await expectInnerText(page, filterSBExpect.selector, filterSBExpect.value);
291293
await expectInnerText(page, filterFillNRExpect.selector, filterFillNRExpect.value);
294+
await expectInnerText(page, filterSBStartExpect.selector, filterSBStartExpect.value);
295+
await expectInnerText(page, filterSBEndExpect.selector, filterSBEndExpect.value);
292296
await expectInnerText(page, filterSBDurationExpect.selector, filterSBDurationExpect.value);
293297
await expectAttributeValue(page, filterSBDurationPlaceholderExpect.selector, 'placeholder', filterSBDurationPlaceholderExpect.value);
294298
await expectInnerText(page, filterRunDurationExpect.selector, filterRunDurationExpect.value);

0 commit comments

Comments
 (0)