Skip to content

Commit

Permalink
Show Tags filter in the filters dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarat committed Apr 3, 2023
1 parent c5ad5ce commit 840e5f1
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/components/InventoryGroups/Modals/AddSystemsToGroupModal.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mount } from '@cypress/react';
import {
checkTableHeaders,
DROPDOWN_ITEM,
MODAL,
ouiaId,
TABLE
@@ -32,6 +33,17 @@ const TABLE_HEADERS = [
'Last seen'
];

const AVAILABLE_FILTER_NAMES = [
'Name',
'Status',
'Operating System',
'Data Collector',
'RHC status',
'Last seen',
'Group',
'Tags'
];

const ALERT = '[data-ouia-component-type="PF4/Alert"]';

before(() => {
@@ -156,4 +168,17 @@ describe('AddSystemsToGroupModal', () => {
host_ids: ['host-1', 'host-2', 'anim commodo'] // sends the merged list of hosts
});
});

describe('filters', () => {
it('has correct list of filters', () => {
groupDetailInterceptors['successful with hosts']();
mountModal();

cy.wait('@getHosts');
cy.get('button[data-ouia-component-id="ConditionalFilter"]').click();
cy.get(DROPDOWN_ITEM).each(($item, i) => {
expect($item.text()).to.equal(AVAILABLE_FILTER_NAMES[i]);
});
});
});
});
Original file line number Diff line number Diff line change
@@ -150,6 +150,7 @@ const AddSystemsToGroupModal = ({
}}
bulkSelect={bulkSelectConfig(dispatch, selected.size, noneSelected, pageSelected, rows.length)}
initialLoading={true}
showTags
/>
</Modal>
</>

0 comments on commit 840e5f1

Please sign in to comment.