diff --git a/src/components/InventoryTable/InventoryTable.cy.js b/src/components/InventoryTable/InventoryTable.cy.js index ffe26cb43..ccd254ffe 100644 --- a/src/components/InventoryTable/InventoryTable.cy.js +++ b/src/components/InventoryTable/InventoryTable.cy.js @@ -7,6 +7,7 @@ import { CHIP, CHIP_GROUP, CONDITIONAL_FILTER, + PT_CONDITIONAL_FILTER_TOGGLE, DROPDOWN_ITEM, PAGINATION_VALUES, PRIMARY_TOOLBAR, @@ -199,7 +200,7 @@ describe('with default parameters', () => { }); it('has correct list of default filters', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); AVAILABLE_FILTER_NAMES.forEach((filterName, index) => { cy.get(DROPDOWN_ITEM).eq(index).should('have.text', filterName); }); @@ -207,7 +208,7 @@ describe('with default parameters', () => { describe('groups filter', () => { it('options are populated correctly', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').should( @@ -219,7 +220,7 @@ describe('with default parameters', () => { const firstGroupName = shorterGroupsFixtures.results[0].name; it('creates a chip', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').eq(0).click(); @@ -227,7 +228,7 @@ describe('with default parameters', () => { }); it('triggers new request', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').eq(0).click(); @@ -255,42 +256,42 @@ describe('hiding filters', () => { it('can hide groups filter', () => { mountTable({ hasAccess: true, hideFilters: { hostGroupFilter: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'Group'); }); it('can hide name filter', () => { mountTable({ hasAccess: true, hideFilters: { name: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'Name'); }); it('can hide data collector filter', () => { mountTable({ hasAccess: true, hideFilters: { registeredWith: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'Data Collector'); }); it('can hide rhcd filter', () => { mountTable({ hasAccess: true, hideFilters: { rhcdFilter: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'RHC status'); }); it('can hide os filter', () => { mountTable({ hasAccess: true, hideFilters: { operatingSystem: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'Operating System'); }); it('can hide last seen filter', () => { mountTable({ hasAccess: true, hideFilters: { lastSeen: true } }); waitForTable(); - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).should('not.contain', 'Last seen'); }); }); @@ -307,14 +308,14 @@ describe('with no group filter option', () => { }); it('no group is the first option', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').first().should('have.text', 'No group'); }); it('creates no group chip', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').eq(0).click(); @@ -322,7 +323,7 @@ describe('with no group filter option', () => { }); it('triggers new request with empty parameter', () => { - cy.get(CONDITIONAL_FILTER).click(); + cy.get(PT_CONDITIONAL_FILTER_TOGGLE).click(); cy.get(DROPDOWN_ITEM).contains('Group').click(); cy.ouiaId('FilterByGroup').click(); cy.ouiaId('FilterByGroupOption').eq(0).click();