Open jameerpathan111 opened 2 years ago
I've engaged with the UXD team (@Ron-Lavi) and @latran about this PF4 confirmation dialog (which is actually a modal).
This should be addressed not individually on entity views, but within the get_alert
browser method defined in wt.core.
Either UXD team will modify the modal component to be recognized as a JS alert, or we'll override the core widgetastic browser method so that it can find the the modal when looking for alerts.
Following discussion with UX, they're not going to be able to 'spoof' the browser alert for the new confirmation dialog modals.
This means we need to address this by implementing a custom Brower.get_alert
function that can identify not only JS alerts, but confirmation modals.
https://github.com/SatelliteQE/airgun/blob/12c4698ecbfab2faa461594cc53023f21b5670f8/airgun/browser.py#L258 https://github.com/RedHatQE/widgetastic.core/blob/7b228874bdbdbe7dc29436cff718bf8ce34b7e30/src/widgetastic/browser.py#L919
AirgunBrowser.get_alert
should be implemented, in order to override the functionality of Browser.get_alert
in the base class.
get_alert
is the basis for several other functions within the browser, and the overridden method should be compatible with them, returning an element that dismiss
, send_keys
, accept
, and text
can be called against.
This will restore the behavior of handle_alert
kwargs and browser functions, and our direct calls to view.dialog
can be replaced with browser.handle_alert()
calls.
Fix existing Airgun code for entities which use new confirmation dialog(
Pf4ConfirmationDialog
) based on PF4, which is used for deleting entities. See https://github.com/SatelliteQE/airgun/pull/649 and https://github.com/SatelliteQE/airgun/pull/652 for more info.List of UI entities using new confirmation dialog.