-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes rhai entities #304
Fixes rhai entities #304
Conversation
@@ -35,9 +58,22 @@ def is_displayed(self): | |||
return self.title.is_displayed and self.search.is_displayed | |||
|
|||
|
|||
class InventoryHostRule(GenericRemovableWidgetItem): | |||
"""Insights inventory host rule widget""" | |||
# There is no remove button in this widget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds weird. GenericRemovableWidgetItem
and There is no remove button in this widget
. Removable
, but no remove button
. That is not logical. Any alternative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can create an issue per our discussion? To create better architecture for such kind of widgets?
from airgun.views.rhai import InsightsOrganizationErrorView | ||
|
||
|
||
class InsightsNavigateStep(NavigateStep): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propose to not use that navigation at all
output to latest changes SatelliteQE/robottelo#6813 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending questions
|
||
@property | ||
def is_displayed(self): | ||
return (self.browser.wait_for_element(self.title, exception=False) is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this condition is specific enought? By looking at locator, it seems that any page with title and some text (h1
and p
tags) will match this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1- This has a very specific usage in insight
2- If you look at the locators
title = Text("//article[@id='content']/section/h1")
message = Text("//article[@id='content']/section/p")
you will never fiver find a normal page with these 2 element at the same time for forman / kattelo there is not page like this even with only title, in the insight also there is no page with locator except this error page
and self.browser.wait_for_element(self.message, exception=False) is not None) | ||
|
||
def read(self, widget_names=None): | ||
return '{0}: {1}'.format(self.title.read(), self.message.read()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should mess with custom read, especially as there's no real need to - both title and message will be returned correctly with default read implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really has no importance, is used in one place to get that error message, if we do not pack it here , we will pack else where, but really do not see, why we should have them separated, it is an error message.
* Fixes rhai entities * Fixes rhai entities - 2 * Fixes rhai entities - 3
* Fixes rhai entities * Fixes rhai entities - 2 * Fixes rhai entities - 3
test output SatelliteQE/robottelo#6813