Skip to content

Commit

Permalink
Add images exposed column to CVE list table
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo committed Mar 5, 2024
1 parent b12307c commit 26f03bd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/utils/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const itHasTableFunctionsDisabled = () => {
};

export const itHasActiveFilter = (filterName, filterValue) => {
it.only(`has ${filterName}: ${filterValue} filter active by default`, () => {
it(`has ${filterName}: ${filterValue} filter active by default`, () => {
cy.get('.pf-v5-c-chip-group__label').should('have.text', filterName);
cy.get('.pf-v5-c-chip-group__main ul').should('have.text', filterValue);
});
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SmartComponents/CveList/CveListTable.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('CveListTable without items', () => {
it('shows correct empty state depending on whether filters are applied or not', () => {
cy.contains('No matching CVEs found').should('exist');

cy.get('.ins-c-chip-filters .pf-c-chip button').click();
cy.get('.ins-c-chip-filters .pf-v5-c-chip button').click();

cy.contains('No matching CVEs found').should('exist');
cy.contains('Reset filter').should('exist');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/Helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ export const CVE_LIST_TABLE_COLUMNS = [
title: 'Exposed clusters',
sortParam: 'clusters_exposed',
},
{
title: 'Exposed images',
sortParam: 'images_exposed',
},
];

export const CLUSTER_LIST_TABLE_COLUMNS = [
Expand Down Expand Up @@ -290,6 +294,9 @@ export const CVE_LIST_TABLE_MAPPER = (row) => ({
<Link to={'../cves/' + row.synopsis} key={row.synopsis}>
{row.clusters_exposed}
</Link>,
<Link to={'../cves/' + row.synopsis} key={row.synopsis}>
{row.images_exposed}
</Link>,
],
expandableContent: createCveDescription(row),
});
Expand Down

0 comments on commit 26f03bd

Please sign in to comment.