diff --git a/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js b/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js new file mode 100644 index 000000000..539acb02c --- /dev/null +++ b/src/components/InventoryGroupDetail/GroupDetailInfo.cy.js @@ -0,0 +1,40 @@ +import { mount } from '@cypress/react'; +import React from 'react'; +import GroupDetailInfo from './GroupDetailInfo'; + +const mountPage = () => + mount( + + ); + +before(() => { + cy.window().then( + (window) => + (window.insights = { + chrome: { + isProd: false, + auth: { + getUser: () => { + return Promise.resolve({}); + } + } + } + }) + ); +}); + +describe('group detail information page', () => { + it('Title is rendered', () => { + mountPage(); + cy.get('div[class="pf-c-card__title pf-c-title pf-m-lg card-title"]').should('have.text', 'User access configuration'); + }); + it('button is present', () => { + mountPage(); + cy.get('button[class="pf-c-button pf-m-secondary"]').should('have.text', 'Manage access'); + }); + it('card text is present', () => { + mountPage(); + cy.get('div[class="pf-c-card__body"]').should + ('have.text', 'Manage your inventory group user access configuration under Identity & Access Management > User Access.'); + }); +}); diff --git a/src/components/InventoryGroupDetail/GroupDetailInfo.js b/src/components/InventoryGroupDetail/GroupDetailInfo.js index 01a935077..24229e050 100644 --- a/src/components/InventoryGroupDetail/GroupDetailInfo.js +++ b/src/components/InventoryGroupDetail/GroupDetailInfo.js @@ -1,19 +1,34 @@ -import { EmptyState, EmptyStateBody, Spinner } from '@patternfly/react-core'; -import { InvalidObject } from '@redhat-cloud-services/frontend-components'; +import { + Button, + Card, + CardTitle, + CardBody, + CardHeader, + CardActions } from '@patternfly/react-core'; import React from 'react'; -import { useSelector } from 'react-redux'; const GroupDetailInfo = () => { - const { uninitialized, loading } = useSelector((state) => state.groupDetail); - - // TODO: implement according to mocks + const address = window.location.href.includes('beta') ? '/beta/iam/user-access' : '/iam/user-access'; return ( - - - {uninitialized || loading ? : } - - + + + + + + User access configuration + + + Manage your inventory group user access configuration under + Identity & Access Management {'>'} User Access. + + ); };