Bug 2060099

Summary: [RFE] ouia-ID for tile cards in the new host details page
Product: Red Hat Satellite Reporter: Lai <ltran>
Component: HostsAssignee: Lucy Fu <lufu>
Status: CLOSED ERRATA QA Contact: Sam Bible <sbible>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: aruzicka, inecas, jlenz, juwatts, lufu, pcreech, sbible, shwsingh, swadeley
Target Milestone: 6.13.0Keywords: AutomationBlocker, FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-3.3.0.10-1,tfm-rubygem-katello-4.5.0.18-1,foreman-3.5.1.9-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:21:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lai 2022-03-02 17:20:08 UTC
Description of problem:
The tile cards for new host details page does not have ouia-ID.  This is needed for a static id so automation can be written and executed cleanly.  Currently satellite has dynamic ouia component id which makes writing automation difficult due to it's changing id nature.

Version-Release number of selected component (if applicable):
7.0 snap 11

How reproducible:
100%

Steps to Reproduce:
1. create and sync a host
2. go to host details page
3. right click and inspect element

Actual results:
DOM only contains dynamic ouia component ID

Expected results:
DOM should also contain ouia-ID prop for static id

Additional info:
This change will help QE write more stable automation for the PF4 changes

Comment 5 Lucy Fu 2022-08-22 18:10:08 UTC
Created redmine issue https://projects.theforeman.org/issues/35411 from this bug

Comment 6 Bryan Kearney 2022-08-24 16:04:35 UTC
Upstream bug assigned to lufu

Comment 7 Bryan Kearney 2022-08-24 16:04:37 UTC
Upstream bug assigned to lufu

Comment 8 Adam Ruzicka 2022-09-06 12:28:52 UTC
REX changes went out in foreman_remote_execution-7.2.1

Comment 9 Peter Dragun 2022-09-12 08:14:46 UTC
*** Bug 2119076 has been marked as a duplicate of this bug. ***

Comment 10 Bryan Kearney 2022-09-20 04:03:54 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35411 has been resolved.

Comment 11 Lucy Fu 2022-09-21 17:21:07 UTC
Devel Whiteboard: needs_cherrypick

Comment 22 Peter Dragun 2022-10-03 11:52:37 UTC
Failed QA.

`Content` sub-tabs (Packages, Errata, Module streams, and Repo sets), `Edit` button, and `Schedule a job` dropdown (last 2 in the upper right corner) are missing IDs.

Most of the OUIA ids seem to be there, thanks.

Comment 23 Lucy Fu 2022-10-03 18:21:39 UTC
Content sub-tabs (Packages, Errata, Module streams, and Repo sets) are defined as Tab via https://github.com/theforeman/foreman/blob/627118e65fa0cd67628696a748fbb72498afff74/webpack/assets/javascripts/react_app/components/HostDetails/index.js#L245. 
Currently patternfly does not support ouiaId as a prop for Tab elements.
Tab elements have title and key props which could be used for QE automation.

https://github.com/theforeman/foreman_remote_execution/pull/759
https://github.com/theforeman/foreman/pull/9448

Comment 24 Lucy Fu 2022-10-04 14:00:40 UTC
Add one more: https://github.com/Katello/katello/pull/10301

Comment 30 Sam Bible 2023-01-31 18:17:53 UTC
Tested on 6.13 - Snap 8 

After inspecting all the various cards found in the Host -> Overview tab, most have proper ouia-ids.

Status, Content View Details, Errata, Details, Host Collections, System Purpose and Audit

However, Recent Jobs, Recent Communication and Risk Cards all share the same ouia-id, "Card Template".
So I'm going to fail this pending those cards getting ouia-ids added properly.

Comment 31 Lucy Fu 2023-02-01 18:51:04 UTC
Add PR: https://github.com/theforeman/foreman/pull/9612

Comment 32 Adam Ruzicka 2023-02-15 10:47:30 UTC
The PR mentioned in #31 was merged, moving to MODIFIED.

Comment 36 Sam Bible 2023-03-06 21:45:11 UTC
Verified on 6.13 - Snap 13

The missing IDs are present now.

Comment 39 errata-xmlrpc 2023-05-03 13:21:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.13 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2097