Skip to content

Commit

Permalink
feat(HMS-3574): add additional ouiaId attributes
Browse files Browse the repository at this point in the history
- [x] Tag the pending components that are complaint with ouiaId.
- [x] Could works wrap some components in a div tag when they are not
      complaint with ouiaId? discarded.
- [x] Are there another way to retrieve the components based on the
      Type? discarded.

It is agreed only the components that are compliant will add the ouiaId
attribute.

Co-authored-by: Akshay Adhikari <[email protected]>
Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo and aadhikar committed Feb 12, 2024
1 parent 533930e commit fec7aef
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Components/DomainList/DomainList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const DomainList = () => {
<>
<TableComposable>
<Thead>
<Tr>
<Tr ouiaId="TrDomainListHeader">
<Th sort={getSortParams(0)}>Name</Th>
<Th>Type</Th>
<Th sort={getSortParams(3)}>Domain auto-join on launch</Th>
Expand All @@ -241,7 +241,7 @@ export const DomainList = () => {
onClick={() => {
onShowDetails(domain);
}}
ouiaId="LinkListDomainDetails"
ouiaId="LinkDomainListDetails"
>
{domain.title}
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/Routes/DefaultPage/DefaultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Header = () => {

return (
<PageHeader>
<PageHeaderTitle title={title} ouiaId="TextDefaultTitle" />
<PageHeaderTitle title={title} />
<p>
Manage registered identity domains to leverage host access controls from your existing identity and access management.{' '}
<Button
Expand Down Expand Up @@ -77,7 +77,7 @@ const EmptyContent = () => {
<Bullseye>
<EmptyState variant={EmptyStateVariant.full}>
<EmptyStateIcon icon={RegistryIcon} />
<Title headingLevel="h2" size="lg" className="pf-u-pt-sm">
<Title headingLevel="h2" size="lg" className="pf-u-pt-sm" ouiaId="TitleEmptyContent">
No identity domains registered
</Title>
<EmptyStateBody>
Expand Down
13 changes: 11 additions & 2 deletions src/Routes/DetailPage/Components/FilterField/filter-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const InputFilterServer = (props: InputFilterServerProps) => {
key="Name"
value="Name"
component="button"
ouiaId="DropitemFilterFieldName"
onClick={() => {
setFilter('Name');
}}
Expand All @@ -46,6 +47,7 @@ export const InputFilterServer = (props: InputFilterServerProps) => {
key="Location"
value="Location"
component="button"
ouiaId="DropitemFilterFieldLocation"
onClick={() => {
setFilter('Location');
}}
Expand All @@ -70,9 +72,16 @@ export const InputFilterServer = (props: InputFilterServerProps) => {
}
isOpen={isOpen}
dropdownItems={dropdownItems}
ouiaId="DropdownFilterField"
/>
<TextInput id="input-filter-dropdown" aria-label="input with dropdown and button" value={value} onChange={onChange} />
<Button id="input-filter-button" variant="control" icon={<SearchIcon />} />
<TextInput
id="input-filter-dropdown"
aria-label="input with dropdown and button"
value={value}
onChange={onChange}
ouiaId="TextinputFilterField"
/>
<Button id="input-filter-button" variant="control" icon={<SearchIcon />} ouiaId="ButtonFilterField" />
</InputGroup>
</>
);
Expand Down
3 changes: 2 additions & 1 deletion src/Routes/DetailPage/DetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const DetailPage = () => {
isPlain
dropdownItems={dropdownItems}
position="right"
ouiaId=""
/>
</FlexItem>
</Flex>
Expand All @@ -148,7 +149,7 @@ const DetailPage = () => {
</Tabs>
</PageHeader>
<PageSection>
<Card>
<Card ouiaId="CardDetailPage">
<CardBody>
{activeTabKey === 0 && (
<DetailGeneral
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const PagePreparation = (props: PagePreparationProps) => {

return (
<>
<Title headingLevel={'h2'} ouiaId="TextWizardPagePreparationTitle">
<Title headingLevel={'h2'} ouiaId="TextPagePreparationTitle">
Preparation for your identity domain registration
</Title>
<Form
Expand All @@ -88,7 +88,7 @@ const PagePreparation = (props: PagePreparationProps) => {
title={'Only Red Hat Identity Management (IdM) is currently supported.'}
variant="info"
isInline
ouiaId="AlertWizardPagePrepare"
ouiaId="AlertPagePreparationPrepare"
></Alert>
</FormGroup>
<FormGroup label="Identity domain prerequisites">
Expand All @@ -103,7 +103,7 @@ const PagePreparation = (props: PagePreparationProps) => {
iconPosition="right"
isInline
href={prerequisitesLink}
ouiaId="ButtonWizardPagePreparePrerequisites"
ouiaId="ButtonPagePreparationPrerequisites"
>
prerequisites
</Button>
Expand All @@ -126,11 +126,11 @@ const PagePreparation = (props: PagePreparationProps) => {
iconPosition="right"
isInline
href={installServerPackagesLink}
ouiaId="LinkWizardPagePrepareInstall"
ouiaId="LinkPagePreparationInstall"
>
steps to install the server packages
</Button>
<ClipboardCopy hoverTip="copy" clickTip="Copied" isReadOnly ouiaId="TextWizardPagePrepareInstallPackage">
<ClipboardCopy hoverTip="copy" clickTip="Copied" isReadOnly ouiaId="TextPagePreparationInstallPackage">
dnf copr enable @podengo/ipa-hcc && dnf install ipa-hcc-server
</ClipboardCopy>
</TextContent>
Expand Down
2 changes: 1 addition & 1 deletion src/Routes/WizardPage/Components/PageReview/PageReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { TableComposable, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-tab
const PageReviewIpaServersHead = () => {
return (
<Thead>
<Tr>
<Tr ouiaId="TrPageReviewIpaServers">
<Th>Name</Th>
<Th>UUID</Th>
</Tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const PageServiceDetails = (props: PageServiceDetailsProps) => {
return (
<>
<Form onSubmit={(e) => e.preventDefault()}>
<Title headingLevel={'h2'} ouiaId="TextWizardDetailsTitle">
<Title headingLevel={'h2'} ouiaId="TitleWizardDetailsTitle">
Add your identity domain information
</Title>
<FormGroup label="Display name" isRequired fieldId="register-title">
Expand All @@ -79,7 +79,7 @@ const PageServiceDetails = (props: PageServiceDetailsProps) => {
value={title}
onChange={onChangeTitle}
className="pf-u-w-100 pf-u-w-50-on-md pf-u-w-50-on-xl"
ouiaId="TextWizardDetailsDomainTitle"
ouiaId="TextinputWizardDetailsDomainTitle"
/>
</FormGroup>
<FormGroup label="Description" fieldId="register-description">
Expand Down Expand Up @@ -113,7 +113,7 @@ const PageServiceDetails = (props: PageServiceDetailsProps) => {
isChecked={isAutoEnrollmentEnabled}
hasCheckIcon
onChange={onChangeAutoEnrollment}
ouiaId="ButtonWizardDetailsDomainAutoenrollment"
ouiaId="SwitchWizardDetailsDomainAutoenrollment"
/>
</FormGroup>
</Form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const PageServiceRegistration = (props: PageServiceRegistrationProp) => {

return (
<>
<Title headingLevel={'h2'} ouiaId="TextWizardRegistrationTitle">
<Title headingLevel={'h2'} ouiaId="TitleWizardRegistration">
Register your identity domain
</Title>
<Form onSubmit={(e) => e.preventDefault()}>
Expand Down

0 comments on commit fec7aef

Please sign in to comment.