diff --git a/packages/react-integration/cypress/integration/card.spec.ts b/packages/react-integration/cypress/integration/card.spec.ts index 19a8adc49fd..a82a0fafe00 100644 --- a/packages/react-integration/cypress/integration/card.spec.ts +++ b/packages/react-integration/cypress/integration/card.spec.ts @@ -61,9 +61,9 @@ describe('Card Demo Test', () => { }); it('Verify clickable only card action is triggered', () => { - cy.get('#clickable-card-drawer').should('not.have.class', 'pf-m-expanded'); + cy.get('#clickable-card-example-1').should('not.have.class', 'pf-m-current'); cy.get('#clickable-card-example-1').click(); - cy.get('#clickable-card-drawer').should('have.class', 'pf-m-expanded'); + cy.get('#clickable-card-example-1').should('have.class', 'pf-m-current'); }); it('Verify clickable only card link is navigated to', () => { diff --git a/packages/react-integration/demo-app-ts/src/components/demos/CardDemo/CardDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/CardDemo/CardDemo.tsx index c9914db2178..9cf4c53ccd8 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/CardDemo/CardDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/CardDemo/CardDemo.tsx @@ -28,7 +28,7 @@ interface CardDemoState { selectableChecked1: boolean; selectableChecked2: boolean; singleSelectableChecked: string; - drawerIsExpanded: boolean; + isCardClicked: boolean; selectableClickableChecked: boolean; selectableClickableSelected: boolean; selectaleClickableDrawerIsExpanded: boolean; @@ -44,7 +44,7 @@ class CardDemo extends Component { selectableChecked1: false, selectableChecked2: false, singleSelectableChecked: '', - drawerIsExpanded: false, + isCardClicked: false, selectableClickableChecked: false, selectableClickableSelected: false, selectaleClickableDrawerIsExpanded: false @@ -117,7 +117,7 @@ class CardDemo extends Component { selectableChecked1, selectableChecked2, singleSelectableChecked, - drawerIsExpanded, + isCardClicked, selectableClickableChecked, selectableClickableSelected, selectaleClickableDrawerIsExpanded @@ -259,35 +259,21 @@ class CardDemo extends Component { This card is single selectable.

-
- - - Clickable card drawer panel - - } - > - - - { - this.setState({ drawerIsExpanded: !drawerIsExpanded }); - }, - selectableActionId: 'clickable-card-input-1', - selectableActionAriaLabelledby: 'clickable-card-example-1', - name: 'clickable-card-example-1' - }} - > - Clickable card with action - - This card performs an action on click. - - - - -
+ + { + this.setState({ isCardClicked: !isCardClicked }); + }, + selectableActionId: 'clickable-card-input-1', + selectableActionAriaLabelledby: 'clickable-card-example-1', + name: 'clickable-card-example-1' + }} + > + Clickable card with action + + This card performs an action on click. +