Skip to content
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

Merged
merged 3 commits into from
Mar 18, 2019
Merged

Conversation

ldjebran
Copy link
Contributor

@ldjebran ldjebran commented Mar 15, 2019

@ldjebran ldjebran self-assigned this Mar 15, 2019
@@ -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
Copy link
Contributor

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

Copy link
Contributor

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):
Copy link
Contributor

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

@ldjebran
Copy link
Contributor Author

output to latest changes SatelliteQE/robottelo#6813 (comment)

oshtaier
oshtaier previously approved these changes Mar 18, 2019
Copy link
Contributor

@oshtaier oshtaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending comments

@ldjebran
Copy link
Contributor Author

@oshtaier changes done and issue #305 created

Copy link
Contributor

@abalakh abalakh left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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())
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@abalakh abalakh merged commit 70e55a3 into SatelliteQE:master Mar 18, 2019
ldjebran added a commit to ldjebran/airgun that referenced this pull request Mar 19, 2019
* Fixes rhai entities

* Fixes rhai entities - 2

* Fixes rhai entities - 3
abalakh pushed a commit that referenced this pull request Mar 25, 2019
* Fixes rhai entities

* Fixes rhai entities - 2

* Fixes rhai entities - 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants