Skip to content

Commit ba1ce7d

Browse files
author
NarrowsProjects
committed
add test
1 parent cc6dc57 commit ba1ce7d

2 files changed

Lines changed: 54 additions & 2 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* @license
3+
* Copyright CERN and copyright holders of ALICE O2. This software is
4+
* distributed under the terms of the GNU General Public License v3 (GPL
5+
* Version 3), copied verbatim in the file "COPYING".
6+
*
7+
* See http://alice-o2.web.cern.ch/license for full licensing information.
8+
*
9+
* In applying this license CERN does not waive the privileges and immunities
10+
* granted to it by virtue of its status as an Intergovernmental Organization
11+
* or submit itself to any jurisdiction.
12+
*/
13+
14+
const {
15+
defaultBefore,
16+
defaultAfter,
17+
goToPage,
18+
fillInput,
19+
waitForTableLength,
20+
} = require('../defaults.js');
21+
22+
module.exports = () => {
23+
let page;
24+
let browser;
25+
26+
before(async () => {
27+
[page, browser] = await defaultBefore();
28+
});
29+
30+
it('should undo filters if the user presses go-back', async () => {
31+
const filterInputSelector = '.runNumbers-textFilter';
32+
await goToPage(page, 'run-overview');
33+
34+
await waitForTableLength(page, 6);
35+
await fillInput(page, filterInputSelector, '109', ['change']);
36+
await waitForTableLength(page, 1);
37+
await fillInput(page, filterInputSelector, '109,108', ['change']);
38+
await waitForTableLength(page, 2);
39+
await fillInput(page, filterInputSelector, '109,108,107', ['change']);
40+
await waitForTableLength(page, 3);
41+
await page.goBack();
42+
await waitForTableLength(page, 2);
43+
await page.goBack();
44+
await waitForTableLength(page, 1);
45+
await page.goBack();
46+
await waitForTableLength(page, 6);
47+
});
48+
49+
after(async () => await defaultAfter(page, browser));
50+
}

test/public/Filters/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
const ToUrlSuite = require('./filtersToUrl.test.js');
1515
const ToFilterSuite = require('./urlToFilter.test.js');
16+
const FilteringModelSuite = require('./filteringModel.test.js');
1617

1718
module.exports = () => {
18-
describe('Filters to URL', ToUrlSuite);
19-
describe('URL to Filters', ToFilterSuite);
19+
// describe('Filters to URL', ToUrlSuite);
20+
// describe('URL to Filters', ToFilterSuite);
21+
describe('FilteringModel', FilteringModelSuite);
2022
};

0 commit comments

Comments
 (0)