Skip to content

Commit 033ff35

Browse files
author
NarrowsProjects
committed
update tests to function with the new textInput components
1 parent e095876 commit 033ff35

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

lib/public/components/Filters/common/filters/textInputFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ import { rawTextFilter } from './rawTextFilter.js';
2323
* @return {Component} the filter
2424
*/
2525
export const textInputFilter = (filteringModel, key, placeholder, widthClass = 'w-100') =>
26-
rawTextFilter(filteringModel.get(key), { classes: [widthClass, `${key}-filter`], placeholder });
26+
rawTextFilter(filteringModel.get(key), { classes: [widthClass, `${key}-textFilter`], placeholder });

test/public/logs/overview.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ module.exports = () => {
364364
})
365365

366366
it('can filter by log title', async () => {
367-
await fillInput(page, '#titleFilterText', 'first', ['change']);
367+
await fillInput(page, '.title-textFilter', 'first', ['change']);
368368
await waitForTableLength(page, 1);
369369

370-
await fillInput(page, '#titleFilterText', 'bogusbogusbogus', ['change']);
370+
await fillInput(page, '.title-textFilter', 'bogusbogusbogus', ['change']);
371371
await waitForEmptyTable(page);
372372
});
373373

@@ -384,10 +384,10 @@ module.exports = () => {
384384
});
385385

386386
it('should successfully provide an input to filter on log content', async () => {
387-
await fillInput(page, '#contentFilterText', 'particle', ['change']);
387+
await fillInput(page, '.content-textFilter', 'particle', ['change']);
388388
await waitForTableLength(page, 2);
389389

390-
await fillInput(page, '#titleFilterText', 'this-content-do-not-exists-anywhere', ['change']);
390+
await fillInput(page, '.title-textFilter', 'this-content-do-not-exists-anywhere', ['change']);
391391
await waitForEmptyTable(page);
392392
});
393393

@@ -485,24 +485,24 @@ module.exports = () => {
485485

486486
it('can filter by run number', async () => {
487487
// Insert some text into the filter
488-
await fillInput(page, '.runNumbers-filter', '1, 2', ['change']);
488+
await fillInput(page, '.runNumbers-textFilter', '1, 2', ['change']);
489489
await waitForTableLength(page, 2);
490490
await resetFilters(page);
491491

492492
await waitForTableLength(page, 10);
493493

494-
await fillInput(page, '.runNumbers-filter', '1234567890', ['change']);
494+
await fillInput(page, '.runNumbers-textFilter', '1234567890', ['change']);
495495
await waitForEmptyTable(page);
496496
});
497497

498498
it('can filter by lhc fill number', async () => {
499-
await fillInput(page, '#lhcFillsFilterText', '1, 6', ['change']);
499+
await fillInput(page, '.fillNumbers-textFilter', '1, 6', ['change']);
500500
await waitForTableLength(page, 1);
501501
await resetFilters(page);
502502

503503
await waitForTableLength(page, 10);
504504

505-
await fillInput(page, '#lhcFillsFilterText', '1234567890', ['change']);
505+
await fillInput(page, '.fillNumbers-textFilter', '1234567890', ['change']);
506506
await waitForEmptyTable(page);
507507
});
508508
})

test/public/runs/overview.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,15 +706,15 @@ module.exports = () => {
706706

707707
it('should successfully filter on a list of fill numbers and inform the user about it', async () => {
708708
await page.evaluate(() => window.model.disableInputDebounce());
709-
const filterInputSelector = '.fill-numbers-filter';
709+
const filterInputSelector = '.fillNumbers-textFilter';
710710
expect(await page.$eval(filterInputSelector, (input) => input.placeholder)).to.equal('e.g. 7966, 7954, 7948...');
711711

712712
await fillInput(page, filterInputSelector, '1, 3', ['change']);
713713
await waitForTableLength(page, 6);
714714
});
715715

716716
it('should successfully filter on a list of environment ids and inform the user about it', async () => {
717-
const filterInputSelector = '.environment-ids-filter';
717+
const filterInputSelector = '.environmentIds-textFilter';
718718
expect(await page.$eval(filterInputSelector, (input) => input.placeholder)).to.equal('e.g. Dxi029djX, TDI59So3d...');
719719

720720
await fillInput(page, filterInputSelector, 'Dxi029djX, TDI59So3d', ['change']);

0 commit comments

Comments
 (0)