Skip to content

Commit d32473e

Browse files
authored
Merge branch 'main' into feature/O2B-1492/Add-filtering-by-the-status-history-to-the-envs-filtering-panel
2 parents f4f4264 + bf9d5f4 commit d32473e

6 files changed

Lines changed: 47 additions & 8 deletions

File tree

.github/workflows/bookkeeping.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
qc-flags]
3838

3939
steps:
40-
- uses: actions/checkout@v5
40+
- uses: actions/checkout@v6
4141
- name: Set up Docker
4242
uses: docker/setup-buildx-action@v3
4343
- name: Create Coverage Directory
@@ -91,7 +91,7 @@ jobs:
9191
timeout-minutes: 5
9292

9393
steps:
94-
- uses: actions/checkout@v5
94+
- uses: actions/checkout@v6
9595
- name: Setup NodeJS
9696
uses: actions/setup-node@v6
9797
with:

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 5
1616

1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- name: Lint Dockerfile
2020
uses: brpaz/hadolint-action@master
2121
with:
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 5
2727

2828
steps:
29-
- uses: actions/checkout@v5
29+
- uses: actions/checkout@v6
3030
- name: Validate docker-compose.yml
3131
run: |
3232
docker compose \

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
outputs:
1414
VERSION: ${{ steps.set-project.outputs.version }}
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
- uses: actions/setup-node@v6
1818
with:
1919
node-version: '22.x'
@@ -43,7 +43,7 @@ jobs:
4343
outputs:
4444
ASSET_URL: ${{ steps.upload.outputs.asset_url }}
4545
steps:
46-
- uses: actions/checkout@v5
46+
- uses: actions/checkout@v6
4747
- uses: actions/setup-node@v6
4848
with:
4949
node-version: '22.x'

lib/public/views/Environments/ActiveColumns/environmentsActiveColumns.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ export const environmentsActiveColumns = {
5454
],
5555
'125px',
5656
),
57+
58+
/**
59+
* Environment IDs filter component
60+
*
61+
* @param {EnvironmentOverviewModel} environmentOverviewModel the environment overview model
62+
* @return {Component} the filter component
63+
*/
64+
filter: (environmentOverviewModel) => rawTextFilter(
65+
environmentOverviewModel.filteringModel.get('ids'),
66+
{ classes: ['w-100'], placeholder: 'e.g. CmCvjNbg, TDI59So3d...' },
67+
),
5768
},
5869
runs: {
5970
name: 'Runs',

lib/public/views/Environments/Overview/EnvironmentOverviewModel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class EnvironmentOverviewModel extends OverviewPageModel {
3030

3131
this._filteringModel = new FilteringModel({
3232
statusHistory: new RawTextFilterModel(),
33+
ids: new RawTextFilterModel(),
3334
});
3435

3536
this._filteringModel.observe(() => this._applyFilters(true));

test/public/envs/overview.test.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ module.exports = () => {
297297
it('should successfully filter environments by their status history', async () => {
298298
/**
299299
* This is the sequence to test filtering the environments on their status history.
300-
*
300+
*
301301
* @param {string} selector the filter input selector
302302
* @param {string} inputValue the value to type in the filter input
303303
* @param {string[]} expectedIds the list of expected environment IDs after filtering
@@ -308,7 +308,7 @@ module.exports = () => {
308308
await waitForTableLength(page, expectedIds.length);
309309
expect(await page.$$eval('tbody tr', (rows) => rows.map((row) => row.id))).to.eql(expectedIds.map(id => `row${id}`));
310310
};
311-
311+
312312
await expectAttributeValue(page, '.historyItems-filter input', 'placeholder', 'e.g. D-R-X');
313313

314314
await filterOnStatusHistory('.historyItems-filter input', 'C-R-D-X', ['TDI59So3d']);
@@ -320,4 +320,31 @@ module.exports = () => {
320320
await filterOnStatusHistory('.historyItems-filter input', 'D-E', ['KGIS12DS']);
321321
await resetFilters(page);
322322
});
323+
324+
it('should successfully filter environments by their IDs', async () => {
325+
/**
326+
* This is the sequence to test filtering the environments on IDs.
327+
*
328+
* @param {string} selector the filter input selector
329+
* @param {string} inputValue the value to type in the filter input
330+
* @param {string[]} expectedIds the list of expected environment IDs after filtering
331+
* @return {void}
332+
*/
333+
const filterOnID = async (selector, inputValue, expectedIds) => {
334+
await fillInput(page, selector, inputValue, ['change']);
335+
await waitForTableLength(page, expectedIds.length);
336+
expect(await page.$$eval('tbody tr', (rows) => rows.map((row) => row.id))).to.eql(expectedIds.map(id => `row${id}`));
337+
};
338+
339+
await expectAttributeValue(page, '.id-filter input', 'placeholder', 'e.g. CmCvjNbg, TDI59So3d...');
340+
341+
await filterOnID('.id-filter input', 'CmCvjNbg', ['CmCvjNbg']);
342+
await resetFilters(page);
343+
344+
await filterOnID('.id-filter input', 'CmCvjNbg, TDI59So3d', ['CmCvjNbg', 'TDI59So3d']);
345+
await resetFilters(page);
346+
347+
await filterOnID('.id-filter input', 'j', ['CmCvjNbg', 'GIDO1jdkD', '8E4aZTjY', 'Dxi029djX']);
348+
await resetFilters(page);
349+
});
323350
};

0 commit comments

Comments
 (0)